All Posts
Mathematics

The Gaussian Integral — The Most Beautiful Result in Analysis

A comprehensive exploration of the Gaussian integral — its history from de Moivre to Gauss, the celebrated polar-coordinates proof, alternative derivations via the Gamma function and Feynman’s technique, and its extraordinary applications across probability, quantum mechanics, and number theory.

April 14, 20269 min read
The Gaussian Integral — The Most Beautiful Result in Analysis

Few results in mathematics carry the same weight of elegance and surprise as the evaluation of the Gaussian integral. At first glance, the function ex2e^{-x^2} seems utterly ordinary — a smooth, symmetric bell curve decaying rapidly to zero. Yet when we ask for the total area beneath it, from -\infty to ++\infty, the answer is breathtaking:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}

How does π\pi — the ratio of a circle's circumference to its diameter — appear in the integral of an exponential function that has nothing obviously to do with circles? This is the mystery, and the proof is one of the most beautiful arguments in all of analysis.

In this article, we will explore the history, the proof, several alternative derivations, important generalizations, and the far-reaching applications of this remarkable integral.


A Brief History

The Gaussian integral has roots reaching deep into the 18th century. The first known evaluation is attributed to Abraham de Moivre around 1733, who encountered a form of this integral while studying the normal approximation to the binomial distribution. However, it was Pierre-Simon Laplace who, in 1774, published the elegant polar-coordinates proof that we still teach today.

Historical mathematical manuscripts from the era of Gauss and Laplace

The integral later became inseparably linked with Carl Friedrich Gauss, who used it extensively in his monumental work Theoria motus corporum coelestium (1809) on celestial mechanics and the method of least squares. Gauss recognized that the function ex2e^{-x^2} describes the distribution of errors in astronomical observations — what we now call the normal distribution or Gaussian distribution.

The integral has since become a cornerstone of probability theory, statistical mechanics, quantum mechanics, and signal processing.


The Function ex2e^{-x^2}

Before diving into the proof, let us appreciate the function itself.

The Gaussian function and its integral over the real line

The function f(x)=ex2f(x) = e^{-x^2} has several remarkable properties:

  • Symmetry: It is an even function, f(x)=f(x)f(-x) = f(x), so its graph is symmetric about the yy-axis.
  • Maximum: It achieves its maximum value of 11 at x=0x = 0.
  • Rapid decay: It decreases faster than any polynomial as xo|x| o \infty, making it a member of the Schwartz space of rapidly decreasing functions.
  • No elementary antiderivative: Despite its simple form, ex2e^{-x^2} has no antiderivative expressible in terms of elementary functions. The error function erf(x)=2π0xet2dt\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2}\,dt was invented precisely to give it one.

This last point is what makes the evaluation of the integral so surprising: we cannot find a closed-form antiderivative, yet the definite integral over the entire real line has a beautiful exact value.


The Classical Proof: Squaring the Integral

This is the most celebrated proof — often called the "trick of squaring the integral" or the Poisson method (sometimes attributed to Laplace or Poisson).

Setting Up the Square

Let us define:

I=ex2dxI = \int_{-\infty}^{\infty} e^{-x^2}\,dx

We want to find II. The key insight is to compute I2I^2 instead. Since the variable of integration is a dummy variable, we can write:

I2=(ex2dx)(ey2dy)I^2 = \left(\int_{-\infty}^{\infty} e^{-x^2}\,dx\right)\left(\int_{-\infty}^{\infty} e^{-y^2}\,dy\right)

By Fubini's theorem (justified because ex2y2e^{-x^2-y^2} is absolutely integrable over R2\mathbb{R}^2), we combine these into a double integral:

I2=e(x2+y2)dxdyI^2 = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-(x^2+y^2)}\,dx\,dy

The Polar Coordinate Transformation

Now comes the beautiful geometric insight. The expression x2+y2=r2x^2 + y^2 = r^2 is the equation of a circle of radius rr. This suggests converting to polar coordinates:

x=rcosheta,y=rsinheta,dxdy=rdrdhetax = r\cos heta, \quad y = r\sin heta, \quad dx\,dy = r\,dr\,d heta

The transformation from Cartesian to polar coordinates with the Gaussian surface

The double integral becomes:

I2=02π0er2rdrdhetaI^2 = \int_0^{2\pi}\int_0^{\infty} e^{-r^2}\,r\,dr\,d heta

The integral separates beautifully:

I2=(02πdheta)(0rer2dr)I^2 = \left(\int_0^{2\pi} d heta\right)\left(\int_0^{\infty} r\,e^{-r^2}\,dr\right)

Evaluating Each Factor

The angular integral is immediate:

02πdheta=2π\int_0^{2\pi} d heta = 2\pi

For the radial integral, we use the substitution u=r2u = r^2, so du=2rdrdu = 2r\,dr:

0rer2dr=120eudu=12[eu]0=12(0(1))=12\int_0^{\infty} r\,e^{-r^2}\,dr = \frac{1}{2}\int_0^{\infty} e^{-u}\,du = \frac{1}{2}\left[-e^{-u}\right]_0^{\infty} = \frac{1}{2}(0 - (-1)) = \frac{1}{2}

The Final Result

Combining both factors:

I2=2π12=πI^2 = 2\pi \cdot \frac{1}{2} = \pi

Since I>0I > 0 (as ex2>0e^{-x^2} > 0 for all xx), we take the positive square root:

I=ex2dx=π\boxed{I = \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}}

This is where π\pi comes from — it enters through the rotational symmetry of the two-dimensional Gaussian. The conversion to polar coordinates introduces the factor 2π2\pi from the full angular sweep, and the circle hidden in x2+y2=r2x^2 + y^2 = r^2 brings π\pi into the answer.


The 2D Gaussian Surface

To better understand why polar coordinates work so naturally, let us visualize the two-dimensional Gaussian e(x2+y2)e^{-(x^2+y^2)}.

The 2D Gaussian surface showing circular symmetry

This surface is a perfect solid of revolution — its level curves are circles centered at the origin. This radial symmetry is exactly what makes polar coordinates the ideal tool. The Jacobian factor rr in rdrdhetar\,dr\,d heta accounts for the increasing circumference of circles at larger radii, and the exponential er2e^{-r^2} ensures convergence.


Alternative Proof: Using the Gamma Function

There is an elegant connection to the Gamma function, defined by:

Γ(s)=0ts1etdt\Gamma(s) = \int_0^{\infty} t^{s-1} e^{-t}\,dt

The Half-Integral

The Gaussian integral over [0,)[0,\infty) can be transformed into a Gamma function evaluation. Starting with:

0ex2dx\int_0^{\infty} e^{-x^2}\,dx

we substitute t=x2t = x^2, so x=tx = \sqrt{t} and dx=12tdtdx = \frac{1}{2\sqrt{t}}\,dt:

0ex2dx=0et12tdt=120t1/2etdt=12Γ ⁣(12)\int_0^{\infty} e^{-x^2}\,dx = \int_0^{\infty} e^{-t} \cdot \frac{1}{2\sqrt{t}}\,dt = \frac{1}{2}\int_0^{\infty} t^{-1/2} e^{-t}\,dt = \frac{1}{2}\,\Gamma\!\left(\frac{1}{2}\right)

Since the full integral is twice the half-line integral (by symmetry):

ex2dx=Γ ⁣(12)\int_{-\infty}^{\infty} e^{-x^2}\,dx = \Gamma\!\left(\frac{1}{2}\right)

The fact that Γ(1/2)=π\Gamma(1/2) = \sqrt{\pi} is one of the most beautiful identities in analysis. It can be proved independently using the polar coordinates method above, or via the Beta function and the reflection formula:

Γ(s)Γ(1s)=πsin(πs)\Gamma(s)\,\Gamma(1-s) = \frac{\pi}{\sin(\pi s)}

Setting s=1/2s = 1/2:

Γ ⁣(12)2=πsin(π/2)=π\Gamma\!\left(\frac{1}{2}\right)^2 = \frac{\pi}{\sin(\pi/2)} = \pi

and therefore Γ(1/2)=π\Gamma(1/2) = \sqrt{\pi}.


Alternative Proof: Differentiation Under the Integral Sign

This method — beloved by Feynman — evaluates a parametric family of integrals.

The Setup

Define:

I(a)=eax2dx,a>0I(a) = \int_{-\infty}^{\infty} e^{-ax^2}\,dx, \quad a > 0

We know that if we can find I(a)I(a) for general aa, then I(1)I(1) gives us our answer.

A Scaling Argument

Substitute u=axu = \sqrt{a}\,x, so du=adxdu = \sqrt{a}\,dx:

I(a)=eu2dua=1aeu2du=I(1)aI(a) = \int_{-\infty}^{\infty} e^{-u^2}\,\frac{du}{\sqrt{a}} = \frac{1}{\sqrt{a}}\int_{-\infty}^{\infty} e^{-u^2}\,du = \frac{I(1)}{\sqrt{a}}

This tells us I(a)=CaI(a) = \frac{C}{\sqrt{a}} for some constant CC. The polar coordinates proof shows C=πC = \sqrt{\pi}, so:

eax2dx=πa\int_{-\infty}^{\infty} e^{-ax^2}\,dx = \sqrt{\frac{\pi}{a}}

Differentiating Under the Integral

Now the power of this formula becomes clear. Differentiating both sides with respect to aa:

ddaeax2dx=x2eax2dx=12πa3/2\frac{d}{da}\int_{-\infty}^{\infty} e^{-ax^2}\,dx = -\int_{-\infty}^{\infty} x^2 e^{-ax^2}\,dx = -\frac{1}{2}\sqrt{\pi}\,a^{-3/2}

Therefore:

x2eax2dx=12πa3\int_{-\infty}^{\infty} x^2 e^{-ax^2}\,dx = \frac{1}{2}\sqrt{\frac{\pi}{a^3}}

Repeated differentiation yields the Gaussian moment formulas:

x2neax2dx=(2n)!4nn!πa2n+1\int_{-\infty}^{\infty} x^{2n} e^{-ax^2}\,dx = \frac{(2n)!}{4^n\,n!}\sqrt{\frac{\pi}{a^{2n+1}}}

This single integral thus generates an infinite family of exact results.


Important Generalizations

The General Gaussian Integral

The most general form of the Gaussian integral is:

eax2+bx+cdx=πaeb2/(4a)+c,a>0\int_{-\infty}^{\infty} e^{-ax^2 + bx + c}\,dx = \sqrt{\frac{\pi}{a}}\,e^{b^2/(4a)+c}, \quad a > 0

This is proved by completing the square in the exponent:

ax2+bx+c=a(xb2a)2+b24a+c-ax^2 + bx + c = -a\left(x - \frac{b}{2a}\right)^2 + \frac{b^2}{4a} + c

and then shifting the variable of integration.

Multidimensional Gaussian Integrals

In nn dimensions, if AA is a positive-definite nimesnn imes n matrix, then:

RnexTAxdx=πn/2detA\int_{\mathbb{R}^n} e^{-\mathbf{x}^T A\,\mathbf{x}}\,d\mathbf{x} = \frac{\pi^{n/2}}{\sqrt{\det A}}

This formula is fundamental in statistical mechanics and quantum field theory.

Fresnel Integrals

Replacing the real parameter with a purely imaginary one leads to the Fresnel integrals:

eix2dx=πi=πeiπ/4=π2(1i)\int_{-\infty}^{\infty} e^{ix^2}\,dx = \sqrt{\frac{\pi}{i}} = \sqrt{\pi}\,e^{-i\pi/4} = \sqrt{\frac{\pi}{2}}(1 - i)

These appear in the theory of diffraction and wave optics.


Applications Across Mathematics and Science

The Gaussian distribution appears throughout nature and science

The Gaussian integral is not merely a beautiful result — it is a workhorse across the sciences:

  • Probability and Statistics: The normal distribution 1σ2πex2/(2σ2)\frac{1}{\sigma\sqrt{2\pi}}\,e^{-x^2/(2\sigma^2)} is normalized precisely because of the Gaussian integral. The Central Limit Theorem guarantees that sums of independent random variables converge to this distribution — making the Gaussian integral the foundation of all of statistics.

  • Quantum Mechanics: The path integral formulation of quantum mechanics, due to Feynman, is built entirely on Gaussian integrals. The free-particle propagator, the harmonic oscillator, and perturbative quantum field theory all reduce to Gaussian integrations.

  • Statistical Mechanics: The partition function for the ideal gas and the Maxwell-Boltzmann distribution of molecular velocities both depend on the Gaussian integral.

  • Signal Processing: The Fourier transform of a Gaussian is another Gaussian — a unique property called self-reciprocity. Specifically:

F{eπx2}(ξ)=eπξ2\mathcal{F}\{e^{-\pi x^2}\}(\xi) = e^{-\pi \xi^2}

This makes Gaussians the ideal window functions in time-frequency analysis.

  • Number Theory: The Jacobi theta function ϑ(t)=n=eπn2t\vartheta(t) = \sum_{n=-\infty}^{\infty} e^{-\pi n^2 t} is intimately connected to the Gaussian integral and plays a central role in the proof of the functional equation of the Riemann zeta function.

  • Heat Equation: The fundamental solution of the heat equation on R\mathbb{R} is the heat kernel:

K(x,t)=14πtex2/(4t)K(x,t) = \frac{1}{\sqrt{4\pi t}}\,e^{-x^2/(4t)}

which is normalized to 11 for all t>0t > 0 thanks to the Gaussian integral.


Why This Integral Matters

The Gaussian integral is a perfect example of what makes mathematics beautiful: a question that seems impossible to answer by direct methods yields to an inspired change of perspective. The passage from one dimension to two dimensions — squaring the integral and converting to polar coordinates — is a technique that rewards geometric intuition and reveals hidden symmetry.

It is also a gateway: mastering this integral opens the door to the Gamma function, Fourier analysis, probability theory, and mathematical physics. Every student of mathematics encounters it, and every mathematician remembers the first time the proof "clicked."

As Lord Kelvin reportedly said: "A mathematician is one to whom the Gaussian integral equals the square root of pi is as obvious as that twice two makes four is to you."

We may not all reach that level of familiarity — but in understanding the proof, we touch something genuinely profound about the structure of mathematics itself.


Written by Abdelouahab Mostafa — Notes on Mathematics from Mila, Algeria.