Gaussian Integral
Gaussian Integral
KEITH CONRAD
Let Z ∞ Z ∞ Z ∞
− 21 x2 −x2 2
I= e e dx, J =
dx, and K = e−πx dx.
−∞ 0 −∞
√ √
These positive numbers are related: J = I/(2 2) and K = I/ 2π.
√ √
Theorem. With notation as above, I = 2π, or equivalently J = π/2, or equivalently K = 1.
We will give multiple proofs of this. (Other lists of proofs are in [4] and [9].) It is subtle
1 2 R∞ 1 2
since e− 2 x has no simple antiderivative. For comparison, 0 xe− 2 x dx can be computed with the
1 2
antiderivative −e− 2 x and equals 1. In the last section, the Gaussian integral’s history is presented.
1For a visualization of this calculation as a volume, in terms of R ∞ e−x2 dx instead of J, see https://www.
−∞
youtube.com/watch?v=cy8r7WSuT1I. We’ll do a volume calculation for I 2 in Section 5.
1
2 KEITH CONRAD
Instead of using polar coordinates, set x = yt in the inner integral (y is fixed). Then dx = y dt and
Z ∞ Z ∞ Z ∞ Z ∞
2 −y 2 (t2 +1) −y 2 (t2 +1)
(2.1) J = e y dt dy = ye dy dt,
0 0 0 0
where the interchange of integrals is justified by Fubini’s theorem for improper Riemann integrals.
(The appendix
Z ∞ gives an approach using Fubini’s theorem for Riemann integrals on rectangles.)
2 1
Since ye−ay dy = for a > 0, we have
0 2a
Z ∞
2 dt 1 π π
J = 2
= · = ,
0 2(t + 1) 2 2 4
√
so J = π/2. This proof is due to Laplace [7, pp. 94–96] and historically precedes the widely used
technique of the previous proof. We will see in Section 9 what Laplace’s first proof was.
the right side tends to − dx/(1 + x2 ) + C = −π/4 + C. Thus C = π/4, so (3.1) becomes
0
2 2 2
t
e−t (1+x ) 1
Z Z
−x2 π
e dx = − dx.
0 0 1 + x2
4
√
Letting t → ∞ in this equation, we obtain J 2 = π/4, so J = π/2.
A comparison of this proof with the first proof is in [21].
THE GAUSSIAN INTEGRAL 3
For b > 0, integrate both sides from 0 to b and use the Fundamental Theorem of Calculus:
Z b Z b Z b
0 −t2 2
F (t) dt = −2J e dt =⇒ F (b) − F (0) = −2J e−t dt.
0 0 0
Z ∞
V = A(x) dx, where A(x) is the area of the x-slice:
−∞
Z ∞ 1 1 2
Z ∞ 1 2 1 2
2 +y 2 )
A(x) = e− 2 (x dy = e− 2 x e− 2 y dy = e− 2 x I.
−∞ −∞
Z ∞ Z ∞ 1 2
Z ∞ 1 2
Thus V = A(x) dx = e− 2 x I dx = I
e− 2 x dx = I 2 .
−∞ −∞ −∞ √
Comparing the two formulas for V , we have 2π = I 2 , so I = 2π.
Set x = y = 1/2:
2 Z 1
1 dt
Γ = p .
2 0 t(1 − t)
Note
Z ∞
√ −t dt Z ∞ e−t Z ∞ −x2 Z ∞
1 e 2
Γ = te = √ dt = 2x dx = 2 e−x dx = 2J,
2 0 t 0 t 0 x 0
2
R1 p 2
so 4J = 0 dt/ t(1 − t). With the substitution t = sin θ,
Z π/2
2 2 sin θ cos θ dθ π
4J = = 2 = π,
0 sin θ cos θ 2
√ √ √
so J = π/2. Equivalently,
Z ∞ Γ(1/2) = π. Any method that proves Γ(1/2) = π is also a method
2
that calculates e−x dx.
0
To show kIk2 → π/2, first we compute several values of Ik explicitly by a recursion. Using
integration by parts,
Z π/2 Z π/2
k
Ik = (cos θ) dθ = (cos θ)k−1 cos θ dθ = (k − 1)(Ik−2 − Ik ),
0 0
so
k−1
(7.4) Ik = Ik−2 .
k
Using (7.4) and the initial values I0 = π/2 and I1 = 1, the first few values of Ik are computed and
listed in Table 1.
k Ik k Ik
0 π/2 1 1
2 (1/2)(π/2) 3 2/3
4 (3/8)(π/2) 5 8/15
6 (15/48)(π/2) 7 48/105
Table 1.
and with the change of variables t = (cos θ)2 for 0 ≤ θ ≤ π/2, the integral on the right is equal to
R π/2
2 0 (cos θ)k dθ = 2Ik , so (7.5) is the same as
Γ( 2n+1 1 2n+2 1
2 )Γ( 2 ) Γ( 2 )Γ( 2 )
I2n I2n+1 =
2Γ( 2n+2
2 ) 2Γ( 2n+3
2 )
Γ( 2n+1 1 2
2 )Γ( 2 )
=
4Γ( 2n+1
2 + 1)
Γ( 2n+1 1 2
2 )Γ( 2 )
=
4 2n+1 2n+1
2 Γ( 2 )
Γ( 12 )2
= .
2(2n + 1)
THE GAUSSIAN INTEGRAL 7
√ √
By (7.5), π = Γ(1/2)2 . We saw in the fifth proof that Γ(1/2) = π if and only if J = π/2.
This function comes out of nowhere, so our first task is to motivate the introduction of this function.
We seek a meromorphic function f (z) to integrate around the rectangular contour γR in the
figure below, with vertices at −R, R, R + ib, and −R + ib, where b will be fixed and we let R → ∞.
Suppose f (z) → 0 along the right and left sides of γR uniformly as R → ∞. Then by applying
the residue theorem and letting R → ∞, we would obtain (if the integrals converge)
Z ∞ Z −∞ X
f (x) dx + f (x + ib) dx = 2πi Resz=a f (z),
−∞ ∞ a
where the sum is over poles of f (z) with imaginary part between 0 and b. This is equivalent to
Z ∞ X
(f (x) − f (x + ib)) dx = 2πi Resz=a f (z).
−∞ a
The poles of f (z) nearest the origin √ are plotted in the figure; they lie along the line y = x. The
only pole of f (z) inside γR (for R > π/2) is at τ /2, so by the residue theorem
2 2
Z
e−τ /8 2πie3τ /8 2πie3πi/4 √
f (z) dz = 2πiResz=τ /2 f (z) = 2πi 2 = √ = √ = 2π.
γR (−τ )e−τ /2 − π(1 + i) − π(1 + i)
√
Since the left and right sides of γR have the same length, π, for all R, to show the integral of
f along those sides tends to 0 uniformly as R → ∞, it suffices to show f (z) → 0 uniformly along
those sides as R√→ ∞. Parametrize z along the left and right sides as −R + it and R + it with t
running over [0, π] in one direction or the other (which won’t matter since we’ll be taking
√ absolute
values). Then, using the reverse triangle inequality in the denominator, when R > π (so R > t)
2 2 2 2 2 2
|e−R /2−iRt+t /2 | e−R /2 et /2 e−R /2 eπ/2 e−R /2 eπ/2
|f (R + it)| = ≤ ≤ √ < √ √ ,
|1 + e−τ (R+it) | |1 − e− Re(τ (R+it)) | 1 − e− π(R−t) 1 − e− π(R− π)
which tends to 0 as R → ∞. Also
2 2 2 2 2 2
|e−R /2+iRt+t /2 | e−R /2 et /2 e−R /2 eπ/2 e−R /2 eπ/2
|f (−R + it)| = ≤ ≤ √ < √ ,
|1 + e−τ (−R+it) | |1 − e− Re(τ (−R+it)) | e π(R+t) − 1 e πR − 1
which tends to 0 as R → ∞. Thus
√ Z ∞ Z −∞+i√π ∞ ∞ √
Z Z
2π = f (x) dx + √
f (z) dz = f (x) dx − f (x + i π) dx.
−∞ ∞+i π −∞ −∞
√
In the second integral, write i π as τ − π and use (real) translation invariance of dx to obtain
√ Z ∞ Z ∞ Z ∞ Z ∞
2
2π = f (x) dx − f (x + τ ) dx = (f (x) − f (x + τ )) dx = e−x /2 dx by (10.2).
−∞ −∞ −∞ −∞
• If f is differentiable, then after using differentiation under the integral sign on the Fourier
transform of f we obtain
Z ∞
0
(Ff ) (y) = −ixf (x)e−ixy dx = −i(F(xf (x)))(y).
−∞
• Using integration by parts on the Fourier transform of f , with u = f (x) and dv = e−ixy dx,
we obtain
(F(f 0 ))(y) = iy(Ff )(y).
• If we apply the Fourier transform twice then we recover the original function up to interior
and exterior scaling:
(11.2) (F 2 f )(x) = 2πf (−x).
The 2π is admittedly a nonobvious scaling factor here, and the proof of (11.2)
√ is nontrivial. We’ll
show the appearance of 2π in (11.2) is equivalent to the evaluation of I as 2π.
2
Fixing a > 0, set f (x) = e−ax , so
f 0 (x) = −2axf (x).
Applying the Fourier transform to both sides of this equation implies iy(Ff )(y) = −2a −i 1
(Ff )0 (y),
which simplifies to (Ff )0 (y) = − 2a
1
y(Ff )(y). The general solution of g 0 (y) = − 2a
1
yg(y) is g(y) =
−y 2 /(4a)
Ce , so
2 2 /(4a)
f (x) = e−ax =⇒ (Ff )(y) = Ce−y
2 /2
for some constant C. We have 1/(4a) = a when a = 1/2, so set a = 1/2: if f (x) = e−x then
−y 2 /2
(11.3) (Ff )(y) = Ce = Cf (y).
R∞ 2
Setting y = 0 in (11.3), the left side is (Ff )(0) = −∞ e−x /2 dx = I, so I = Cf (0) = C.
Applying the Fourier transform to both sides of (11.3) with C = I √ and using (11.2), we get
2πf (−x) = I(Ff )(x) = I 2 f (x). At x = 0 this becomes 2π = I 2 , so I = 2π since I > 0. That is
the Gaussian integral calculation. If we didn’t know that the constant on the right side of (11.2) is
2π, whatever its value is would 2
√ wind up being I , so saying 2π appears on the right side of (11.2)
is equivalent to saying I = 2π.
There are other ways to define the Fourier transform besides (11.1), such as
Z ∞ Z ∞
1 −ixy
√ f (x)e dx or f (x)e−2πixy dx.
2π −∞ −∞
These transforms have properties similar to the transform as defined in (11.1), so they can be used
in its place to compute the Gaussian integral. Let’s see how such a proof looks using the second
alternative definition, which we’ll write as
Z ∞
(Ff )(y) =
e f (x)e−2πixy dx.
−∞
For this Fourier transform, the analogue of the three properties above for F are
e )0 (y) = −2πi(F(xf
• (Ff e (x)))(y).
0
• (F(f ))(y) = 2πiy(Ff
e e )(y).
• (Fe2 f )(x) = f (−x).
12 KEITH CONRAD
The last property for Fe looks nicer than that for F, since there is no overall 2π-factor on the right
side (it has been hidden in the definition of F).
e On the other hand, the first two properties for Fe
have overall factors of 2π on the right side while the first two properties of F do not. You can’t
escape a role for π or 2π somewhere in every possible definition of a Fourier transform.
2
Now let’s run through the proof again with Fe in place of F. For a > 0, set f (x) = e−ax .
Applying Fe to both sides of the equation f 0 (x) = −2axf (x), 2πiy(Ff e )(y) = −2a 1 (Ff )0 (y),
−(2πi)
0 2π 2 0 2π 2
and that is equivalent to (Ff ) (y) = − y(Ff )(y). Solutions of g (y) = − yg(y) all look like
e
a a
2 /a)y 2
Ce−(π , so
2 2 /a)y 2
f (x) = e−ax =⇒ (Ff
e )(y) = Ce−(π
2 /a)y 2 2
for a constant C. We want π 2 /a = π so that e−(π = e−πy = f (y), which occurs for a = π.
2
Thus when f (x) = e−πx we have
2
(11.4) e )(y) = Ce−πy = Cf (y).
(Ff
R∞ 2
When y = 0 in (11.4), this becomes −∞ e−πx dx = C, so C = K: see the top of the first page for
2
the definition of K as the integral of e−πx over R.
Applying Fe to both sides of (11.4) with C = K and using (Fe2 f )(x) = f (−x), we get f (−x) =
K(Ffe )(x) = K 2 f (x). At x = 0 this becomes 1 = K 2 , so K = 1 since K > 0. That K = 1, or
R∞ 2
in more explicit form −∞ e−πx dx = 1, is equivalent to the evaluation of the Gaussian integral I
√
with the change of variables y = 2πx in the integral for K.
2 1
Lemma A.2. (1) For all x ∈ R, e−x ≤ 2 .
Z ∞ x +1
dx π
(2) For a>0 2 x2 + 1
= .
0 a Z ∞ 2a
dx 1 π
(3) For a > 0 and c > 0, 2 2
= − arctan(ac) .
Zc ∞ a x + 1 a 2
dx 1
(4) For a > 0 and c > 0, 2 x2 + 1
< 2 .
c a a c
π 1
(5) For a > 0, − arctan a < .
2 a
Proof. The proofs of (1), (2), and (3) are left to the reader. To prove (4), replace 1 + a2 t2 by the
∞
smaller value a2 t2 . To prove (5), write the difference as a dx/(x2 + 1) and then bound 1/(x2 + 1)
R
above by 1/x2 .
Proof. Step 1. For b > 1 and c > 1, we’ll show the improper integral can be truncated to an integral
over [0, b] × [0, c] plus error terms:
Z ∞ Z ∞ Z b Z c
−(t2 +1)y 2 −(t2 +1)y 2 1 1
ye dt dy = ye dt dy + O √ +O .
0 0 0 0 c b
R∞
Subtract the integral on the right from the integral on the left and split the outer integral 0
Rb R∞
into 0 + b :
Z ∞ Z ∞ Z b Z c Z b Z ∞
−(t2 +1)y 2 −(t2 +1)y 2 −(t2 +1)y 2
ye dt dy − ye dt dy = ye dt dy
0 0 0 0 0 c
Z ∞ Z ∞
−(t2 +1)y 2
+ ye dt dy.
b 0
√
On the right side, we will show the first iterated integral is O(1/ c) and the second iterated integral
is O(1/b). The second iterated integral is simpler:
Z ∞ Z ∞ Z ∞ Z ∞
2 2 2 2
ye−(t +1)y dt dy = e−(yt) dt ye−y dy
b 0 b 0
Z ∞ Z ∞
dt 2
≤ 2 2
ye−y dy by Lemma A.2(1)
y t +1
Zb ∞ 0
π 2
= ye−y dy by Lemma A.2(2)
b 2y
π ∞ −y2
Z
= e dy
2 b
Z ∞
π dy
≤ 2
by Lemma A.2(1)
2 b y +1
π 1 1
= since 2 < 2,
2b y +1 y
14 KEITH CONRAD
so
Z c Z b
1 c dt 1 c
Z Z
−(t2 +1)y 2 dt
ye dy dt = −
0 0 2 0 t + 1 2 0 (t + 1)e(t2 +1)b2
2 2
1 c
Z
1 dt
(A.1) = arctan(c) − .
2 2 0 (t2 + 1)e(t2 +1)b2
Let’s estimate these last two terms. Since
Z ∞ Z ∞ Z ∞
dt dt π dt π 1
arctan(c) = 2
− 2
= +O 2
= +O
0 t +1 c t +1 2 c t 2 c
and Z c Z c Z ∞
dt dt 1 dt 1 1
2 +1)b2 ≤ 2 ≤ 2 = O ,
2
0 (t + 1)e
(t 2
0 t +1e
b
0
2
t +1e b eb2
feeding these error estimates into (A.1) finishes Step 2.
References
[1] D. Bell, “Poisson’s remarkable calculation – a method or a trick?” Elem. Math. 65 (2010), 29–36.
[2] C. A. Berenstein and R. Gay, Complex Variables, Springer-Verlag, New York, 1991.
Z ∞ 2
[3] A. L. Delgado, “A Calculation of e−x dx,” The College Math. J. 34 (2003), 321–323.
0
[4] H. Iwasawa, “Gaussian Integral Puzzle,” Math. Intelligencer 31 (2009), 38–41.
[5] T. P. Jameson, “The Probability Integral by Volume of Revolution,” Mathematical Gazette 78 (1994), 339–340.
[6] H. Kneser, Funktionentheorie, Vandenhoeck and Ruprecht, 1958.
[7] P. S. Laplace, Théorie Analytique des Probabilités, Courcier, 1812.
[8] P. S. Laplace, “Mémoire sur la probabilité des causes par les évènemens,” Oeuvres Complétes 8, 27–65. (English
trans. by S. Stigler as “Memoir on the Probability of Causes of Events,” Statistical Science 1 (1986), 364–378.)
[9] P. M. Lee, http://www.york.ac.uk/depts/maths/histstat/normal history.pdf.
[10] L. Mirsky, The Probability Integral, Math. Gazette 33 (1949), 279. URL http://www.jstor.org/stable/
3611303.
[11] C. P. Nicholas and R. C. Yates, “The Probability Integral,” Amer. Math. Monthly 57 (1950), 412–413.
[12] G. Polya, “Remarks on Computing the Probability Integral in One and Two Dimensions,” pp. 63–78 in Berkeley
Symp. on Math. Statist. and Prob., Univ. California Press, 1949.
[13] R. Remmert, Theory of Complex Functions, Springer-Verlag, 1991.
[14] M. Rozman, “Evaluate Gaussian integral using differentiation under the integral sign,” Course notes for Physics
2400 (UConn), Spring 2016.
[15] W. Rudin, Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976.
[16] M. Spivak, Calculus, W. A. Benjamin, 1967.
[17] S. Stahl, “The Evolution of the Normal Distribution,” Math. Mag. 79 (2006), 96–113. URL https://maa.org/
sites/default/files/pdf/upload library/22/Allendoerfer/stahl96.pdf.
[18] S. Stigler, “Laplace’s 1774 Memoir on Inverse Probability,” Statistical Science 1 (1986), 359–363.
[19] J. van Yzeren, “Moivre’s and Fresnel’s Integrals by Simple Integration,” Amer. Math. Monthly 86 (1979),
690–693.
[20] G. N. Watson, Complex Integration and Cauchy’s Theorem, Cambridge Univ. Press, Cambridge, 1914.
[21] http://gowers.wordpress.com/2007/10/04/when-are-two-proofs-essentially-the-same/#comment-239.
[22] http://math.stackexchange.com/questions/34767/int-infty-infty-e-x2-dx-with-complex-analysis.
[23] http://math.stackexchange.com/questions/390850/integrating-int-infty-0-e-x2-dx-using-feynmans-
parametrization-trick