Steven R. Dunbar
Department of Mathematics
203 Avery Hall
Lincoln, NE 68588-0130
http://www.math.unl.edu
Voice: 402-472-3731
Fax: 402-472-8466

Topics in
Probability Theory and Stochastic Processes
Steven R. Dunbar

__________________________________________________________________________

Evaluation of the Gaussian Density Integral

_______________________________________________________________________

Note: To read these pages properly, you will need the latest version of the Mozilla Firefox browser, with the STIX fonts installed. In a few sections, you will also need the latest Java plug-in, and JavaScript must be enabled. If you use a browser other than Firefox, you should be able to access the pages and run the applets. However, mathematical expressions will probably not display correctly. Firefox is currently the only browser that supports all of the open standards.

_______________________________________________________________________________________________ ### Rating

Mathematically Mature: may contain mathematics beyond calculus with proofs.

_______________________________________________________________________________________________ ### Section Starter Question

Is it possible to evaluate

$\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }{e}^{-\frac{{x}^{2}}{2}}\phantom{\rule{0em}{0ex}}dx$

directly by standard integration techniques?

_______________________________________________________________________________________________ ### Key Concepts

1. $\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }{e}^{-\frac{{x}^{2}}{2}}\phantom{\rule{0em}{0ex}}dx=1.$

2. Several proofs use double integration in clever ways.
3. Another proof uses interpolation between two standard integrals.
4. Yet another proof uses an approximation which can be evaluated using standard integration techniques. The approximate evaluations lead to a sequence with a limit related to Wallis’ Formula.

__________________________________________________________________________ ### Vocabulary

1. The standard Gaussian density function is
$\frac{1}{\sqrt{2\pi }}{e}^{-\frac{{x}^{2}}{2}},\phantom{\rule{2em}{0ex}}-\infty

__________________________________________________________________________ ### Mathematical Ideas

#### The Gaussian density integral

The standard Gaussian density function is

$\frac{1}{\sqrt{2\pi }}{e}^{-\frac{{x}^{2}}{2}},\phantom{\rule{2em}{0ex}}-\infty

In order to claim this is truly a probability density function, we must show that the total area under this function is $1$.

Theorem 1.

$\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }{e}^{-\frac{{x}^{2}}{2}}\phantom{\rule{0em}{0ex}}dx=1.$

We provide several proofs of this evaluation.

According to Peter Lee, , the first complete evaluation of this integral was by P. S. Laplace in 1774 starting from a more complicated integral, using some changes of variables and limits, and finally reaching a special case which can be reduced to the Gaussian integral. Lee  gives 8 methods of evaluation, including 3 cited here along with other methods using contour integration and the Gamma Function.

#### Evaluation with double integration

The first proof is the usual proof, relying on integration in polar coordinates.

Proof. Set $J={\int }_{-\infty }^{\infty }{e}^{-\frac{{x}^{2}}{2}}\phantom{\rule{0em}{0ex}}dx={\int }_{-\infty }^{\infty }{e}^{-\frac{{y}^{2}}{2}}\phantom{\rule{0em}{0ex}}dy$. Then we find that

$\begin{array}{llll}\hfill {J}^{2}& ={\int }_{-\infty }^{\infty }{\int }_{-\infty }^{\infty }{e}^{-\frac{\left({x}^{2}+{y}^{2}\right)}{2}}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{0em}{0ex}}dy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={\int }_{0}^{2\pi }{\int }_{0}^{\infty }{e}^{-\frac{{r}^{2}}{2}}r\phantom{\rule{0em}{0ex}}dr\phantom{\rule{0em}{0ex}}d\theta \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2\pi .\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Then $J=\sqrt{2\pi }$. □

According to Peter Lee, , this method is due to S. D. Poisson and was popularized by J. K. F. Sturm.

A second proof using double integrals is also due to P. S. Laplace, .

Proof. Note that

$K={\int }_{0}^{\infty }{e}^{-{z}^{2}∕2}\phantom{\rule{0em}{0ex}}dz={\int }_{0}^{\infty }{e}^{-{\left(xy\right)}^{2}∕2}y\phantom{\rule{0em}{0ex}}dx$

for any $y$ by setting $z=xy$. Putting $z$ in place of $y$, it follows that for any $z$

$K={\int }_{0}^{\infty }{e}^{-{\left(zx\right)}^{2}∕2}z\phantom{\rule{0em}{0ex}}dx$

so that

$\begin{array}{llll}\hfill {K}^{2}& =\left({\int }_{0}^{\infty }{e}^{-{z}^{2}∕2}\phantom{\rule{0em}{0ex}}dz\right)\left({\int }_{0}^{\infty }{e}^{-{\left(zx\right)}^{2}∕2}z\phantom{\rule{0em}{0ex}}dx\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={\int }_{0}^{\infty }{\int }_{0}^{\infty }{e}^{-\left({x}^{2}+1\right){z}^{2}∕2}z\phantom{\rule{0em}{0ex}}dz\phantom{\rule{0em}{0ex}}dx.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Now set $\left(1+{x}^{2}\right){z}^{2}=2t$ so that $z\phantom{\rule{0em}{0ex}}dz=\phantom{\rule{0em}{0ex}}dt∕\left(1+{x}^{2}\right)$ to get

$\begin{array}{llll}\hfill {K}^{2}& ={\int }_{0}^{\infty }{\int }_{0}^{\infty }{e}^{-t}\frac{\phantom{\rule{0em}{0ex}}dt}{\left(1+{x}^{2}\right)}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\left({\int }_{0}^{\infty }{e}^{-t}\phantom{\rule{0em}{0ex}}dt\right)\left({\int }_{0}^{\infty }\frac{\phantom{\rule{0em}{0ex}}dx}{\left(1+{x}^{2}\right)}\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\left({-{e}^{-t}|}_{0}^{\infty }\right)\left({arctanx|}_{0}^{\infty }\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\frac{\pi }{2}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

and hence $K=\sqrt{\pi ∕2}$. Finally double the integral using symmetry

${\int }_{-\infty }^{\infty }{e}^{-{y}^{2}∕2}\phantom{\rule{0em}{0ex}}dy=\sqrt{2\pi }.$

A third double-integration method due to S. P. Eveson in 2005 is cited by P. S. Lee .

Proof. Consider the volume under the surface $z={e}^{-\left({x}^{2}+{y}^{2}\right)}$, which is given by

$\begin{array}{llll}\hfill V& ={\int }_{-\infty }^{\infty }{\int }_{-\infty }^{\infty }{e}^{-\left({x}^{2}+{y}^{2}\right)}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{0em}{0ex}}dy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={\left({\int }_{-\infty }^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)}^{2}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

However $V$ can also be thought of as a volume of revolution created by revolving ${e}^{-{x}^{2}}$ about the $z$ axis. Use the disk method of evaluation for a volume of revolution. Since $z={e}^{-{x}^{2}}$ we have $x\left(z\right)=\sqrt{-logz}$ is the radius of a disk at level $z$.

$V=\pi {\int }_{0}^{1}{x}^{2}\phantom{\rule{0em}{0ex}}dz=\pi {\int }_{0}^{1}-logz\phantom{\rule{0em}{0ex}}dz=\pi {\left[z-zlogz\right]}_{0}^{1}=\pi .$

and hence

${\int }_{-\infty }^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx=\sqrt{\pi }.$

Changing variables $x=y∕\sqrt{2}$,

${\int }_{-\infty }^{\infty }{e}^{-{y}^{2}∕2}\phantom{\rule{0em}{0ex}}dy=\sqrt{2\pi }.$

#### Evaluation by interpolation between two integrals

Another proof uses an interpolation between two integrals.

Proof. Define

$H\left(t\right)={\left({\int }_{0}^{t}{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)}^{2}+{\int }_{0}^{1}\frac{{e}^{-{t}^{2}\left({x}^{2}+1\right)}}{{x}^{2}+1}\phantom{\rule{0em}{0ex}}dx$

for $t>0$. Compute the derivative

$\begin{array}{llll}\hfill {H}^{\prime }\left(t\right)& =2\left({\int }_{0}^{t}{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)\cdot {e}^{-{t}^{2}}+{\int }_{0}^{1}\frac{{e}^{-{t}^{2}\left({x}^{2}+1\right)}}{{x}^{2}+1}\cdot -2t\left({x}^{2}+1\right)\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2\left({\int }_{0}^{t}{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)\cdot {e}^{-{t}^{2}}+{\int }_{0}^{1}\left(-2t\right){e}^{-{t}^{2}\left({x}^{2}+1\right)}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{2em}{0ex}}& \hfill \end{array}$

Change variables in the first integral $x=ty$, so the new limits of integration are $0$ and $1$ and $\phantom{\rule{0em}{0ex}}dx=t\phantom{\rule{0em}{0ex}}dy$. After this change of variables

$\begin{array}{llll}\hfill {H}^{\prime }\left(t\right)& =2t\left({\int }_{0}^{1}{e}^{-{t}^{2}{y}^{2}}\phantom{\rule{0em}{0ex}}dy\right)\cdot {e}^{-{t}^{2}}+{\int }_{0}^{1}\left(-2t\right){e}^{-{t}^{2}\left({x}^{2}+1\right)}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2t\left({\int }_{0}^{1}{e}^{-{t}^{2}{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)\cdot {e}^{-{t}^{2}}-2t{e}^{-{t}^{2}}{\int }_{0}^{1}{e}^{-{t}^{2}{x}^{2}}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =0.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Evaluating $H$ at $0$,

$H\left(0\right)={\int }_{0}^{1}\frac{1}{{x}^{2}+1}\phantom{\rule{0em}{0ex}}dx=\frac{\pi }{4}.$

As $t\to \infty$,

$\underset{t\to \infty }{lim}H\left(t\right)={\left({\int }_{0}^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\right)}^{2}.$

Putting these all together,

${\int }_{0}^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx=\frac{\sqrt{\pi }}{2}.$

Changing variables again, $x=y∕\sqrt{2}$,

${\int }_{0}^{\infty }{e}^{-{y}^{2}∕2}\phantom{\rule{0em}{0ex}}dy=\frac{\sqrt{\pi }}{\sqrt{2}}.$

Finally double the integral using symmetry

${\int }_{-\infty }^{\infty }{e}^{-{y}^{2}∕2}\phantom{\rule{0em}{0ex}}dy=\sqrt{2\pi }.$

#### Evaluation using Wallis’ Formula

Lemma 2. For $n>1$ and all $x\in \left[0,n\right]$,

$0\le {e}^{-x}-{\left(1-\frac{x}{n}\right)}^{n}\le \frac{{e}^{-1}}{n}.$

Proof. To prove the left inequality is equivalent to showing

${\left(1-\frac{x}{n}\right)}^{n}\le {\left({e}^{-x∕n}\right)}^{n}$

for $x\in \left[0,n\right]$. It suffices to show

$0\le \left(1-\frac{x}{n}\right)\le {e}^{-x∕n}$

or

$0\le \left(1-t\right)\le {e}^{-t}$

for $t\in \left[0,1\right]$. This follows immediately since $1-t$ is the expression for the tangent line to ${e}^{-t}$ at the point $\left(0,1\right)$ and ${e}^{-t}$ is concave up.

To prove the right inequality, let $F\left(x\right)={e}^{-x}-{\left(1-\frac{x}{n}\right)}^{n}$. Note that $F\left(0\right)=0$, $F\left(n\right)={e}^{-n}$, and ${F}^{\prime }\left(0\right)=-{e}^{-n}$. The function $F$ attains a maximum at some point ${x}_{0}$ of the interval $\left[0,n\right]$. The maximum is positive, since $F\left(n\right)>F\left(0\right)=0$. The maximum does not occur at $n$ since ${F}^{\prime }\left(n\right)<0$. At the maximum

${e}^{-{x}_{0}}={\left(1-\frac{{x}_{0}}{n}\right)}^{n-1}.$

Then using this we can rewrite

$F\left({x}_{0}\right)={e}^{-{x}_{0}}-{e}^{-{x}_{0}}\left(1-\frac{{x}_{0}}{n}\right)=\frac{{x}_{0}{e}^{-{x}_{0}}}{n}$

The function $x{e}^{-x}$ has a maximum value of ${e}^{-1}$ at $x=1$, so

$F\left(x\right)\le F\left({x}_{0}\right)\le \frac{{e}^{-1}}{n}.$

Now we use this lemma to approximate the Gaussian density integral.

Proof. Approximate the integrand ${e}^{-{x}^{2}}$ in the Gaussian density integral with ${\left(1-{x}^{2}∕n\right)}^{n}$ on the interval $\left[0,\sqrt{n}\right]$.

$0\le {\int }_{0}^{\sqrt{n}}\left[{e}^{-{x}^{2}}-{\left(1-\frac{{x}^{2}}{n}\right)}^{n}\right]\phantom{\rule{0em}{0ex}}dx\le {\int }_{0}^{\sqrt{n}}\frac{{e}^{-1}}{n}\phantom{\rule{0em}{0ex}}dx.$

Rewrite this as

$0\le {\int }_{0}^{\sqrt{n}}{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx-{\int }_{0}^{\sqrt{n}}{\left(1-\frac{{x}^{2}}{n}\right)}^{n}\phantom{\rule{0em}{0ex}}dx\le \frac{{e}^{-1}}{\sqrt{n}}.$

Therefore, taking the limit as $n\to \infty$,

${\int }_{0}^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx=\underset{n\to \infty }{lim}{\int }_{0}^{\sqrt{n}}{\left(1-\frac{{x}^{2}}{n}\right)}^{n}\phantom{\rule{0em}{0ex}}dx.$

Now evaluate the integral on the right side using the substitution $x=\sqrt{n}sint$

${\int }_{0}^{\sqrt{n}}{\left(1-\frac{{x}^{2}}{n}\right)}^{n}\phantom{\rule{0em}{0ex}}dx=\sqrt{n}{\int }_{0}^{\pi ∕2}{cos}^{2n+1}t\phantom{\rule{0em}{0ex}}dt.$

Consider ${J}_{k}={\int }_{0}^{\pi ∕2}{cos}^{k}\left(x\right)\phantom{\rule{0em}{0ex}}dx$. Then integrating by parts just as in Wallis Formula. we get $k{J}_{k}=\left(k-1\right){J}_{k-2}$. Now ${J}_{1}=1$ so recursively ${J}_{3}=\frac{2}{3}$, ${J}_{5}=\frac{2\cdot 4}{3\cdot 5}$ and inductively

${J}_{2n+1}=\frac{2\cdot 4\cdots \left(2n-2\right)\cdot \left(2n\right)}{1\cdot 3\cdots \left(2n-1\right)\cdot \left(2n+1\right)}.$

Hence,

${\int }_{0}^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx=\underset{n\to \infty }{lim}\sqrt{n}\frac{2\cdot 4\cdots \left(2n-2\right)\cdot \left(2n\right)}{1\cdot 3\cdots \left(2n-1\right)\cdot \left(2n+1\right)}.$

Now use Wallis’ Formula

$\underset{n\to \infty }{lim}\left(\frac{2\cdot 2\cdot 4\cdot 4\cdot 6\cdot 6\dots \left(2n\right)\cdot \left(2n\right)}{1\cdot 3\cdot 3\cdot 5\cdot 5\dots \left(2n-1\right)\cdot \left(2n+1\right)}\right)=\frac{\pi }{2}.$

Then

$\begin{array}{llll}\hfill & {\int }_{0}^{\infty }{e}^{-{x}^{2}}\phantom{\rule{0em}{0ex}}dx\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{1em}{0ex}}=\underset{n\to \infty }{lim}\frac{\sqrt{n}}{\sqrt{2n+1}}\sqrt{\frac{2\cdot 2\cdot 4\cdot 4\cdot 6\cdot 6\dots \left(2n\right)\cdot \left(2n\right)}{1\cdot 3\cdot 3\cdot 5\cdot 5\dots \left(2n-1\right)\cdot \left(2n+1\right)}}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & \phantom{\rule{1em}{0ex}}=\frac{1}{\sqrt{2}}\sqrt{\frac{\pi }{2}}.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Finally changing variables and using symmetry as before

$\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }{e}^{-\frac{{y}^{2}}{2}}\phantom{\rule{0em}{0ex}}dy=1.$

#### Sources

The first double-integral proof is standard and occurs in many sources. The interpolation proof is from a footnote in the article by Michel, , where it is credited to exercises in Apostol, . The proof using Wallis’ Formula is from the short article by Levrie and Daems, .

_______________________________________________________________________________________________ ### Problems to Work for Understanding

__________________________________________________________________________ ### References

   Tom M. Apostol. Mathematical Analysis. Addison-Wesley, second edition, 1974.

   Peter M. Lee. The probability integral. http://www.york.ac.uk/depts/maths/histstat/normal_history.pdf. [Online; accessed 15-October-2011].

   Paul Levrie and Walter Daems. Evaluating the probability integral using Wallis product formula for $\pi$. American Mathematical Monthly, 116(6):538–541, June-July 2009.

   Reinhard Michel. On Stirling’s formula. American Mathematical Monthly, 109(4):388–390, April 2002.

__________________________________________________________________________ __________________________________________________________________________

I check all the information on each page for correctness and typographical errors. Nevertheless, some errors may occur and I would be grateful if you would alert me to such errors. I make every reasonable effort to present current and accurate information for public use, however I do not guarantee the accuracy or timeliness of information on this website. Your use of the information from this website is strictly voluntary and at your risk.

I have checked the links to external sites for usefulness. Links to external websites are provided as a convenience. I do not endorse, control, monitor, or guarantee the information contained in any external website. I don’t guarantee that the links are active at all times. Use the links here with the same caution as you would all information on the Internet. This website reflects the thoughts, interests and opinions of its author. They do not explicitly represent official positions or policies of my employer.

Information on this website is subject to change without notice.