brand banner

The Gaussian Integral

Evaluating the integral of exp(-x^2) over the real line by squaring it and switching to polar coordinates.

Updated Β· 2 min read Β· #calculus Β· #probability

The Gaussian Integral

Evaluating the integral of exp(-x^2) over the real line by squaring it and switching to polar coordinates.

We want to evaluate

𝐼=βˆ«βˆ’βˆžβˆžπ‘’βˆ’π‘₯2dπ‘₯.

The function π‘’βˆ’π‘₯2 has no elementary antiderivative, so the usual fundamental theorem of calculus approach does not work. The trick is to compute 𝐼2 instead.

Squaring the integral

Since the variable of integration is a dummy variable, write the second copy with 𝑦:

𝐼2=(βˆ«βˆ’βˆžβˆžπ‘’βˆ’π‘₯2dπ‘₯)(βˆ«βˆ’βˆžβˆžπ‘’βˆ’π‘¦2d𝑦)=βˆ«βˆ’βˆžβˆžβˆ«βˆ’βˆžβˆžπ‘’βˆ’(π‘₯2+𝑦2)dπ‘₯d𝑦.

The integrand is now a function of π‘₯2+𝑦2 alone: it is radially symmetric, which suggests polar coordinates.

Switching to polar coordinates

Let π‘₯=π‘Ÿcosπœƒ and 𝑦=π‘Ÿsinπœƒ. Then π‘₯2+𝑦2=π‘Ÿ2, and the whole plane is covered by π‘Ÿβˆˆ[0,∞) and πœƒβˆˆ[0,2πœ‹).

The area element picks up the Jacobian determinant:

πœ•(π‘₯,𝑦)πœ•(π‘Ÿ,πœƒ)=det(cosπœƒβˆ’π‘Ÿsinπœƒsinπœƒπ‘Ÿcosπœƒ)=π‘Ÿcos2πœƒ+π‘Ÿsin2πœƒ=π‘Ÿ,

so dπ‘₯d𝑦=π‘Ÿdπ‘Ÿdπœƒ. Geometrically, a small polar patch is approximately a rectangle with sides dπ‘Ÿ and π‘Ÿdπœƒ.

Therefore

𝐼2=∫02πœ‹βˆ«0βˆžπ‘’βˆ’π‘Ÿ2π‘Ÿdπ‘Ÿdπœƒ.

The extra factor of π‘Ÿ is exactly what makes the inner integral elementary.

Evaluating

Substitute 𝑒=π‘Ÿ2, so d𝑒=2π‘Ÿdπ‘Ÿ:

∫0βˆžπ‘’βˆ’π‘Ÿ2π‘Ÿdπ‘Ÿ=12∫0βˆžπ‘’βˆ’π‘’d𝑒=12[βˆ’π‘’βˆ’π‘’]0∞=12.

The outer integral contributes a factor of 2πœ‹:

𝐼2=∫02πœ‹12dπœƒ=πœ‹.

Since π‘’βˆ’π‘₯2>0, we have 𝐼>0, so

βˆ«βˆ’βˆžβˆžπ‘’βˆ’π‘₯2dπ‘₯=πœ‹.

Why the manipulation is valid

The integrand π‘’βˆ’(π‘₯2+𝑦2) is positive and continuous, so by Tonelli’s theorem the iterated integrals equal the double integral over ℝ2, and the order and choice of coordinates do not matter. Equivalently, integrate over discs of radius 𝑅, which gives πœ‹(1βˆ’π‘’βˆ’π‘…2), and let π‘…β†’βˆž.

Consequence: the normal distribution

Substituting π‘₯=π‘‘βˆ’πœ‡πœŽ2 in Eq.Β 1 gives

βˆ«βˆ’βˆžβˆž1𝜎2πœ‹π‘’βˆ’(π‘‘βˆ’πœ‡)22𝜎2d𝑑=1,

which is why 1𝜎2πœ‹ is the normalizing constant of the normal density.


  • Some random stats facts (53%) β€” Bessel's Correction, adding in quadrature, SEM
  • Why e^(it) Traces the Unit Circle (50%) β€” Reading e^(it) as motion: the velocity is always a 90 degree rotation of the position, so the point moves around the unit circle at unit speed and t is arc length.
  • Integration by Parts (49%) β€” Compare integration by parts with substitution and use LIATE to choose the factors in a worked example.
  • Why the Multivariate Chain Rule Is a Sum (48%) β€” As t moves, x and y move at once. The rate of change of f is the directional derivative along the velocity (x'(t), y'(t)), and a dot product is a sum β€” so each intermediate variable contributes its own term.
  • Notes (47%)
  • Maximum Likelihood and Cross-Entropy (47%) β€” A mathematical textbook connecting likelihood, entropy, KL divergence, statistical estimation, and probabilistic machine learning, with worked examples and solved exercises.
  • Background (47%) β€” Recap of prereq knowledge for COMP 3804 (Fall 2025).
  • Integration by Substitution (46%) β€” Rewrite every factor in terms of the substitution variable, even when a factor does not match the substitution’s derivative.

Β© 2026 James Yap

Personal Website and Knowledge Base