info prev up next book cdrom email home

Gaussian Integral

The Gaussian integral, also called the Probability Integral, is the integral of the 1-D Gaussian over $(-\infty,\infty)$. It can be computed using the trick of combining two 1-D Gaussians

$\displaystyle \int_{-\infty}^\infty e^{-x^2}\,dx$ $\textstyle =$ $\displaystyle \sqrt{\left({\int_{-\infty}^\infty e^{-y^2}\,dy}\right)\left({\int_{-\infty}^\infty e^{-x^2}\,dx}\right)}$  
  $\textstyle =$ $\displaystyle \sqrt{\int_{-\infty}^\infty \int_{-\infty}^\infty e^{-(x^2+y^2)}\,dy\,dx}$ (1)

and switching to Polar Coordinates,
$\displaystyle \int_{-\infty}^\infty e^{-x^2}\,dx$ $\textstyle =$ $\displaystyle \sqrt{ \int^{2\pi}_0 \int^\infty_0 e^{-r^2}r\,dr\,d\theta}$  
  $\textstyle =$ $\displaystyle \sqrt{ 2\pi\left[{-{\textstyle{1\over 2}}e^{-r^2}}\right]_0^\infty} = \sqrt{\pi}.$ (2)

However, a simple proof can also be given which does not require transformation to Polar Coordinates (Nicholas and Yates 1950).


The integral from 0 to a finite upper limit $a$ can be given by the Continued Fraction

\begin{displaymath}
\int_0^a e^{-x^2}\,dx = {\sqrt{\pi}\over 2} {1\over a+} {2\over 2a+} {3\over a+} {4\over 2a+\ldots}.
\end{displaymath} (3)


The general class of integrals of the form

\begin{displaymath}
I_n(a)\equiv \int_0^\infty e^{-ax^2}x^n\,dx
\end{displaymath} (4)

can be solved analytically by setting
$\displaystyle x$ $\textstyle \equiv$ $\displaystyle a^{-1/2}y$ (5)
$\displaystyle dx$ $\textstyle =$ $\displaystyle a^{-1/2}\,dy$ (6)
$\displaystyle y^2$ $\textstyle =$ $\displaystyle ax^2.$ (7)

Then
$\displaystyle I_n(a)$ $\textstyle =$ $\displaystyle a^{-1/2}\int_0^\infty e^{-y^2}(a^{-1/2})^n\,dy$  
  $\textstyle =$ $\displaystyle a^{-(1+n)/2} \int_0^\infty e^{-y^2} y^n\,dy.$ (8)

For $n=0$, this is just the usual Gaussian integral, so
\begin{displaymath}
I_0(a)= {\sqrt{\pi}\over 2} a^{-1/2} = {1\over 2}\sqrt{\pi\over a}.
\end{displaymath} (9)

For $n=1$, the integrand is integrable by quadrature,
\begin{displaymath}
I_1(a)= a^{-1} \int_0^\infty e^{-y^2}y\,dy = a^{-1}[-{\textstyle{1\over 2}}e^{-y^2}]^\infty_0 = {\textstyle{1\over 2}}a^{-1}.
\end{displaymath} (10)

To compute $I_n(a)$ for $n>1$, use the identity
$\displaystyle -{\partial\over\partial a}I_{n-2}(a)$ $\textstyle =$ $\displaystyle -{\partial\over\partial a} \int_0^\infty e^{-ax^2}x^{n-2}\,dx$  
  $\textstyle =$ $\displaystyle -\int_0^\infty -x^2e^{-ax^2}x^{n-2}\,dx$  
  $\textstyle =$ $\displaystyle \int_0^\infty e^{-ax^2}x^n\,dx = I_n(a).$ (11)

For $n=2s$ Even,
$\displaystyle I_n(a)$ $\textstyle =$ $\displaystyle \left({-{\partial\over\partial a}}\right)I_{n-2}(a) = \left({-{\partial\over\partial a}}\right)^2 I_{n-4}$  
  $\textstyle =$ $\displaystyle \ldots = \left({-{\partial\over\partial a}}\right)^{n/2} I_0(a)$  
  $\textstyle =$ $\displaystyle {\partial^{n/2}\over\partial a^{n/2}} I_0(a)
= {\sqrt{\pi}\over 2} {\partial^{n/2}\over\partial a^{n/2}} a^{-1/2},$ (12)

so
\begin{displaymath}
\int^\infty_0 x^{2s}e^{-ax^2}\,dx = {(s-{\textstyle{1\over 2...
...ver 2a^{s+1/2}}= {(2s-1)!!\over 2^{s+1}a^s} \sqrt{\pi\over a}.
\end{displaymath} (13)

If $n=2s+1$ is Odd, then
$\displaystyle I_n(a)$ $\textstyle =$ $\displaystyle \left({-{\partial\over\partial a}}\right)I_{n-2}(a)
= \left({-{\partial\over\partial a}}\right)^2 I_{n-4}(a)$  
  $\textstyle =$ $\displaystyle \ldots = \left({-{\partial\over\partial a}}\right)^{(n-1)/2} I_1(a)$  
  $\textstyle =$ $\displaystyle {\partial^{(n-1)/2}\over\partial a^{(n-1)/2}} I_1(a)
= {1\over 2} {\partial^{(n-1)/2}\over\partial a^{(n-1)/2}} a^{-1},$ (14)

so
\begin{displaymath}
\int^\infty_0 x^{2s+1}e^{-ax^2}\,dx = { s!\over 2a^{s+1}}.
\end{displaymath} (15)

The solution is therefore
\begin{displaymath}
\int_0^\infty e^{-ax^2}x^n\,dx =\cases{
{(n-1)!!\over 2^{n/...
...$\ even\cr
{[(n+1)/2]!\over 2a^{(n+1)/2}} & for $n$\ odd.\cr}
\end{displaymath} (16)

The first few values are therefore
$\displaystyle I_0(a)$ $\textstyle =$ $\displaystyle {1\over 2}\sqrt{\pi\over a}$ (17)
$\displaystyle I_1(a)$ $\textstyle =$ $\displaystyle {1\over 2a}$ (18)
$\displaystyle I_2(a)$ $\textstyle =$ $\displaystyle {1\over 4a}\sqrt{\pi\over a}$ (19)
$\displaystyle I_3(a)$ $\textstyle =$ $\displaystyle {1\over 2a^2}$ (20)
$\displaystyle I_4(a)$ $\textstyle =$ $\displaystyle {3\over 8a^2}\sqrt{\pi\over a}$ (21)
$\displaystyle I_5(a)$ $\textstyle =$ $\displaystyle {1\over a^3}$ (22)
$\displaystyle I_6(a)$ $\textstyle =$ $\displaystyle {15\over 16a^3}\sqrt{\pi\over a}.$ (23)


A related, often useful integral is

\begin{displaymath}
H_n(a)\equiv {1\over\sqrt{\pi}}\int_{-\infty}^\infty e^{-ax^2}x^n\,dx,
\end{displaymath} (24)

which is simply given by
\begin{displaymath}
H_n=\cases{
{2I_n(a)\over\sqrt{\pi}} & for $n$\ even\cr
0 & for $n$\ odd.\cr}
\end{displaymath} (25)


References

Nicholas, C. B. and Yates, R. C. ``The Probability Integral.'' Amer. Math. Monthly 57, 412-413, 1950.



info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein
1999-05-25