Gaussian integral

Required math: calculus

Required physics: none

Many mathematicians have remarked that the simple formula

\displaystyle  e^{i\pi}=-1 \ \ \ \ \ (1)

is amazing since it relates four of the fundamental constants of mathematics that, at first glance, would seem to have no relation to each other at all.

Perhaps not quite on the same level as this formula, but still remarkable, is another relatively simple formula, known as the Gaussian integral:

\displaystyle  \int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi} \ \ \ \ \ (2)

Although it contains only two of the fundamental constants ({e} and {\pi}), it relates these two constants in another unexpected way.

It is known as the Gaussian integral since it integrates the Gaussian function {e^{-x^{2}}}, which is the standard bell-shaped curve found in many mathematical and physical applications, especially in statistics, where the Gaussian or normal distribution is one of the common distributions of random data.

We’ll leave its applications for another post. Here we are interested in how such a remarkable formula can be proved. Many students learning calculus have tried (unsuccessfully) to find the indefinite integral of {e^{-x^{2}}}. It seems that it should be possible, since the function {e^{-x}} has a simple indefinite integral ({\int e^{-x}dx=-e^{-x}+C}). However, despite the many hours spent on the problem by frustrated undergraduates, the unfortunate answer is that there is no simple formula for the integral of {e^{-x^{2}}}. So we can’t just find the indefinite integral and then plug in the limits to find the answer.

There are several ways to evaluate the integral but probably the easiest to understand uses a change of coordinate system. Suppose that instead of calculating the integral in one dimension as in 2, we calculate a similar integral in two dimensions. That is, we want to find

\displaystyle  I_{2}\equiv\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^{2}+y^{2})}dx\; dy \ \ \ \ \ (3)

This seems counter-intuitive since it looks like we have just made the problem harder. However, we can decouple the two integrals like this:

\displaystyle   I_{2} \displaystyle  \equiv \displaystyle  \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^{2}+y^{2})}dx\; dy\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-x^{2}}e^{-y^{2}}dx\; dy\ \ \ \ \ (5)
\displaystyle  \displaystyle  = \displaystyle  \int_{-\infty}^{\infty}e^{-x^{2}}dx\int_{-\infty}^{\infty}e^{-y^{2}}dy\ \ \ \ \ (6)
\displaystyle  \displaystyle  = \displaystyle  \left(\int_{-\infty}^{\infty}e^{-x^{2}}dx\right)^{2} \ \ \ \ \ (7)

Now for the coordinate transformation. The original integral {I_{2}} integrates a function over the entire {xy} plane. We can use polar coordinates {(r,\theta)} to do the same integral. The area element {dxdy} transforms to {rdrd\theta} in polar coordinates, and the limits of integration are {0\rightarrow\infty} for {r}, and {0\rightarrow2\pi} for {\theta}. Furthermore, since {x=r\cos\theta} and {y=r\sin\theta}, the quantity in the exponent becomes {x^{2}+y^{2}=r^{2}}. Thus the integral transforms to

\displaystyle   I_{2} \displaystyle  \equiv \displaystyle  \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^{2}+y^{2})}dx\; dy\ \ \ \ \ (8)
\displaystyle  \displaystyle  = \displaystyle  \int_{0}^{\infty}\int_{0}^{2\pi}e^{-r^{2}}rd\theta dr\ \ \ \ \ (9)
\displaystyle  \displaystyle  = \displaystyle  2\pi\int_{0}^{\infty}re^{-r^{2}}dr\ \ \ \ \ (10)
\displaystyle  \displaystyle  = \displaystyle  2\pi(-e^{-r^{2}}/2)\big|_{0}^{\infty}\ \ \ \ \ (11)
\displaystyle  \displaystyle  = \displaystyle  \pi \ \ \ \ \ (12)

The extra factor of {r} that occurs in the area element allows the integral to be done. Since we saw above that this result is the square of the integral that we want, we get the final result:

\displaystyle  \int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi} \ \ \ \ \ (13)

Since {e^{-x^{2}}} is an even function (it is symmetric about the {y}-axis), we also have the formula

\displaystyle  \int_{0}^{\infty}e^{-x^{2}}dx=\sqrt{\pi}/2 \ \ \ \ \ (14)

As a footnote, we can note that the Gaussian integral is a special case of the error function, which is defined as

\displaystyle  erf(x)\equiv\frac{2}{\sqrt{\pi}}\int_{0}^{x}e^{-t^{2}}dt \ \ \ \ \ (15)

Although this integral cannot be evaluated in a closed form, it can be approximated by expanding the exponential as a Taylor series and integrating term-by-term. In light of our earlier results, we can also see why the factor of {2/\sqrt{\pi}} occurs in the definition of {erf(x)}: it cancels the factor of {\sqrt{\pi}/2} that turns up in the Gaussian integral, so we get {erf(\infty)=1}.

5 thoughts on “Gaussian integral

  1. Pingback: Hermite polynomials « Physics tutorials

  2. Pingback: Harmonic oscillator – Hermite polynomials « Physics tutorials

  3. Pingback: Harmonic oscillator – Hermite polynomials « Physics tutorials

  4. Pingback: Stirling’s approximation for large factorials | Physics pages

  5. Pingback: Propagator for a Gaussian wave packet for the free particle | Physics pages

Leave a Reply

Your email address will not be published. Required fields are marked *