# Integrating $e^{-(x^2+y^2+z^2)/a^2}$ over $\mathbb{R}^3$

I want to compute the following integral $$\int_{\mathbb{R}^3}e^{-(x^2+y^2+z^2)/a^2}\,dxdydz$$ and I thought that using spherical coordinates could make it easier, since $$r^2=x^2+y^2+z^2$$. With this in mind, I tried $$\int_{\mathbb{R}^3}e^{-(x^2+y^2+z^2)/a^2}\,dxdydz=\int_0^\infty\int_0^{2\pi}\int_0^\pi r^2\sin \theta \,d\theta d\phi dr=4\pi\int_0^\infty r^2e^{-r^2/a^2}\,dr$$ but I am stuck. Any ideas? Should I simply try to integrate it in cartesian coordinates?

• Do you know $\int_{\Bbb R} e^{-x^2}dx$? Mar 4 at 17:46

This integral factors as

$$\left(\int_\mathbb{R}e^{-x^2/a^2}dx\right)^3$$

The integral in the parentheses is well-known, and is called a Gaussian integral. Here it is explained many methods of how to calculate it. A particularly nice way to calculate it is in fact to use polar coordinates to calculate the integral

$$\int_{\mathbb{R}^2}e^{-(x^2+y^2)/a^2}dx dy$$

first. This two dimensional integral evaluates to $$\pi a^2$$, and it is the square of the Gaussian integral. Therefore, the desired integral is $$\pi^{3/2} a^3$$.

If you really want to use spherical coodinates, then you can proceed as follows.

\begin{align} I&=\int_{\mathbb{R^3}}e^{-(x^2+y^2+z^2)/a^2}\,dx\,dy\,dz=\int_0^{2\pi}\int_0^\pi \int_0^\infty e^{-(r/a)^2}\,r^2\,\sin(\theta)\,dr\,d\theta\,d\phi\\\\ &=4\pi \int_0^\infty r^2 e^{-(r/a)^2}\,dr\\\\ &=4\pi a^3 \int_0^\infty x^2 e^{-x^2}\,dx\tag1 \end{align}

Now, integrating by parts with $$u=x$$ and $$v=-\frac12 e^{-x^2}$$, we find that

\begin{align} \int_0^\infty x^2 e^{-x^2}\,dx&=\frac12 \int_0^\infty e^{-x^2}\,dx\\\\ &=\sqrt\pi/4 \end{align}

Hence, we find that

$$I=\pi^{3/2}a^3$$

Integration by parts is possible, also letting $$\frac{r^2}{a^2}=u$$ we have $$4\pi\int_0^\infty r^2e^{-\tfrac{r^2}{a^2}}dr=2\pi a^3\int_0^\infty u^{\tfrac12}e^{-u}du=2\pi a^3\Gamma(\tfrac32)=\pi a^3\Gamma(\tfrac12)=\pi^{\tfrac32} a^3$$ using some properties of the Gamma function.