| The standard trick is to take the integral of a product of two
integrals of that form; since the integrand is even you can change
the limits to -inf to +inf and divide by 2 when you're through.
I = int(0, inf) exp(-x^2) dx
I = 1/2 * int(-inf, inf) exp(-x^2) dx
I^2 = 1/4 * int(-inf, inf) int(-inf, inf) exp(-x^2)*exp(-y^2) dx dy
I^2 = 1/4 * int(-inf, inf) int(-inf, inf) exp(-(x^2+y^2)) dx dy
Now the hack is to change to polar coordinates,
dx dy = r dr dt,
x^2 + y^2 = r^2,
I^2 = 1/4 * int(0, 2*pi) int(0, inf) exp(-r^2) dr r dt,
and you can do int(0, inf) exp(-r^2) r dr in closed form and get
I^2 = 1/4 * int(0, 2*pi) * 1/2,
so I = sqrt(pi)/2.
You'll come across this integral in probability in connection with the
Gaussian distribution; the analysis can be extended to N dimensions to
get the Chi-squared and other so called 'gamma' distributions.
It also gives a nice formula for the volume of an N dimensional sphere.
- Jim
|