The bell curve has a mysterious \(\pi\) in its formula, even though it looks nothing like a circle. The reason is one famous integral, the Gaussian integral:
\[ I = \int_{-\infty}^{\infty} e^{-x^2}\, dx = \sqrt{\pi} \]
In this post we prove it, then see how it explains the constant in the normal density.
Part 1: Proving \(I = \sqrt{\pi}\)
The function \(e^{-x^2}\) has no elementary antiderivative, so we cannot integrate it directly. The classic trick (due to Poisson) is to square the integral. That turns it into a double integral over the plane, where polar coordinates make it easy.
Step 1: Square the integral
First, \(I > 0\) because \(e^{-x^2} > 0\) everywhere. The integral also converges: for \(|x| \ge 1\) we have \(e^{-x^2} \le e^{-|x|}\), and the tail of \(e^{-|x|}\) has a finite integral.
The name of the integration variable does not matter, so we write \(I\) once with \(x\) and once with \(y\), then multiply:
\[ I^2 = \left(\int_{-\infty}^{\infty} e^{-x^2}\, dx\right) \left(\int_{-\infty}^{\infty} e^{-y^2}\, dy\right) \]
The integrand is positive, so we may combine the product into one double integral over the whole \(xy\)-plane (Fubini–Tonelli):
\[ I^2 = \iint_{\mathbb{R}^2} e^{-(x^2 + y^2)}\, dx\, dy \]
Step 2: Switch to polar coordinates
The exponent contains \(x^2 + y^2\), the squared distance from the origin, so polar coordinates are the natural choice:
- \(x = r\cos\theta\) and \(y = r\sin\theta\)
- \(x^2 + y^2 = r^2\)
- the area element becomes \(dx\, dy = r\, dr\, d\theta\)
- the whole plane is covered by \(r \in [0, \infty)\) and \(\theta \in [0, 2\pi]\)
The factor \(r\) in the area element is the Jacobian determinant of this change of variables (see the Jacobian explained). Therefore:
\[ I^2 = \int_{0}^{2\pi} \int_{0}^{\infty} e^{-r^2}\, r\, dr\, d\theta \]
Step 3: Do the radial integral
The extra factor \(r\) from the area element is what makes this integral easy. Let \(u = r^2\), so \(r\, dr = \tfrac{1}{2}\, du\):
\[ \begin{aligned} \int_{0}^{\infty} e^{-r^2}\, r\, dr &= \int_{0}^{\infty} \tfrac{1}{2}\, e^{-u}\, du \\ &= \left[-\tfrac{1}{2}\, e^{-u}\right]_{0}^{\infty} \\ &= 0 - \left(-\tfrac{1}{2}\right) = \tfrac{1}{2} \end{aligned} \]
Step 4: Do the angular integral and take the root
The radial part does not depend on \(\theta\), so:
\[ I^2 = \int_{0}^{2\pi} \tfrac{1}{2}\, d\theta = \tfrac{1}{2}\cdot 2\pi = \pi \]
Since \(I > 0\), we take the positive root:
\[ \boxed{\,I = \sqrt{\pi}\,} \]
The \(\pi\) comes from the angular integral: going once around a circle contributes \(2\pi\).
A quick numerical check
We can confirm the answer by integrating numerically.
integrate(function(x) exp(-x^2), lower = -Inf, upper = Inf)
sqrt(pi)1.772454 with absolute error < 4.3e-06
[1] 1.772454The numerical value and \(\sqrt{\pi}\) agree.
Part 2: Other scalings
Often the exponent has a constant in it. For any \(a > 0\), substitute \(t = \sqrt{a}\,x\), so \(dx = dt/\sqrt{a}\):
\[ \int_{-\infty}^{\infty} e^{-a x^2}\, dx = \frac{1}{\sqrt{a}} \int_{-\infty}^{\infty} e^{-t^2}\, dt = \sqrt{\frac{\pi}{a}} \]
Two cases are worth remembering:
| \(a\) | Integral | Where it appears |
|---|---|---|
| \(1\) | \(\sqrt{\pi}\) | the basic Gaussian integral |
| \(\dfrac{1}{2}\) | \(\sqrt{2\pi}\) | the standard normal density |
| \(\dfrac{1}{2\sigma^2}\) | \(\sigma\sqrt{2\pi}\) | any normal density |
Part 3: Why \(\pi\) appears in the normal distribution
The normal density is proportional to \(e^{-(x-\mu)^2/(2\sigma^2)}\). That shape is not a probability density yet, because its total area is not \(1\). To fix this, we divide by the area. By Part 2 with \(a = \frac{1}{2\sigma^2}\), that area is \(\sigma\sqrt{2\pi}\). Hence:
\[ f(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \]
So the \(\sqrt{2\pi}\) is nothing but the normalizing constant.
We can also run the polar trick directly on \(e^{-x^2/2}\). Then \(I^2 = \int_0^{2\pi}\int_0^\infty e^{-r^2/2}\, r\, dr\, d\theta\). The radial part is \(\int_0^\infty e^{-u}\, du = 1\) (with \(u = r^2/2\)), and the angular part is \(2\pi\). So \(I^2 = 2\pi\) and \(I = \sqrt{2\pi}\).
The geometry behind it
There is a deeper reason this works. Take two independent standard normal variables \(X\) and \(Y\). Their joint density is proportional to \(e^{-(x^2+y^2)/2}\), which depends only on the distance from the origin. So:
- the level curves of the joint density are circles;
- the distribution is rotationally symmetric;
- the angle of the point \((X, Y)\) is uniformly distributed around the full circle of \(2\pi\).
Any argument that uses this rotational symmetry naturally brings in \(\pi\). The bell curve is not a circle, but a pair of bell curves, one per axis, is.
Summary
- \(\displaystyle\int_{-\infty}^{\infty} e^{-x^2}\, dx = \sqrt{\pi}\), proved by squaring and switching to polar coordinates.
- The angular integral gives \(2\pi\), and the radial integral is easy because of the extra factor \(r\).
- More generally, \(\displaystyle\int_{-\infty}^{\infty} e^{-a x^2}\, dx = \sqrt{\pi/a}\).
- The normal density has \(\sigma\sqrt{2\pi}\) in its denominator because that is the area under the unnormalized curve \(e^{-(x-\mu)^2/(2\sigma^2)}\).
References
- Wikipedia, Gaussian integral.