MathipediaThe free math encyclopedia

The Gaussian Integral

Take a look at the following integral:

ex2dx\int_{-\infty}^{\infty}e^{-x^2}dx

You may recall that f(x)=ex2f(x)=e^{-x^2} is a famous function which has no anti-derivative, which is true. However, just because it is not integratable does not mean that the function cannot be evaluated between bounds.

When inspecting the graph visually it does appear to converge (as opposed to an obvious divergence) so it is at least feasible that it may converge to a specific value.

Inspect the graph of ex2e^{-x^2}

Open in Desmos

The solution to solving this integral was discovered by Carl Friedrich Gauss, and is as follows:

Let I=ex2dx\begin{align} \text{Let }I=\int_{-\infty}^{\infty} e^-x^2 \, dx \\ \end{align}

We now have the most peculiar first step:

Therefore let I2=ex2dxey2dy\begin{align} \text{Therefore let }I^2=\int_{-\infty}^{\infty} e^-x^2 \, dx \int_{-\infty}^{\infty} e^-y^2 \, dy \\ \end{align}

Here we use the new variable yy for simplicity and convention.

ex2dxey2dy=I2ex2ey2dxdy=I2e(x2+y2)dxdy=I2\begin{align} \int_{-\infty}^{\infty} e^-x^2 \, dx \int_{-\infty}^{\infty} e^-y^2 \, dy = I^2\\ \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-x^2}e^{-y^2} \, dx \, dy = I^2 \\ \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2+y^2)} \, dx \, dy = I^2 \end{align}

Recall the polar coordinate conversion below, and that the bounds over rr are [0,][0,\infty] and over θ\theta are [0,2π][0, 2\pi].

{r2=x2+y2dydx=rdrdθ\begin{cases} r^2=x^2+y^2 \\ dy\,dx=r\,dr\,d\theta \\ \end{cases}

We now convert our integral to polar coordinates.

02π0er2rdrdθ=I2\begin{align} \int_{0}^{2\pi}\int_{0}^{\infty} e^{-r^2} r \, dr \, d\theta = I^2 \end{align}

In form we now have a very similar integral to that which we started with, but we have the critically important extra rr variable present. This now gives us the ability to integrate this function, which can be done easily by inspecting the derivative of ex2e^{-x^2}. This is done simply with the chain rule.

ddx[ex2]=2xex2\begin{align} \frac{d}{dx}[e^{-x^2}]=-2xe^{-x^2} \end{align}

This derivative is a simple factor of 2-2 difference from our current function value of I2I^2, so when we integrate over rr it will be simple to do so by including the reciprocal factor of 12-\frac{1}{2}. First we should integrate over theta because it will help keep the equation simple.

002πrer2dθdr=I22π0rer2dr=I2(2π12)er20=I2π (e2e02)=I2π (1e1)=I2π (01)=I2π=I2π=I  \begin{align} \int_{0}^{\infty}\int_{0}^{2\pi} r e^{-r^2} \, d\theta \, dr = I^2 \\ 2\pi \int_{0}^{\infty} re^{-r^{2}} \, dr = I^2 \\ \left( 2\pi*-\frac{1}{2} \right)*e^{-r^2}\Big|_{0}^{\infty}=I^2 \\ -\pi\ * (e^{-\infty^2}-e^{-0^2})=I^2 \\ -\pi\ * \left( \frac{1}{e^{\infty}} -1 \right)=I^2 \\ -\pi\ * \left( 0 -1 \right)=I^2 \\ \pi =I^2 \\ \sqrt{ \pi }=I\ \ \end{align}

Therefore:

ex2d=π\int_{-\infty}^{\infty} e^{-x^2} \, d =\sqrt{ \pi }

This is a quite surprising and pleasant result, and yet another area of mathematics where ee and pipi magically appear next to each other.

External Resources

A visual walkthrough of the Gaussian integral trick.

Watch on YouTube