9.1 Stirling’s Formula
Stirling’s formula is a very useful approximation for n !. I am going to give a presentation
of this which follows that in the calculus book by Courant. A very different treatment is
in [32 ] .
Let
∫ n n
An ≡ 1 ln(x)dx = x ln (x )− x|1 = nlnn − n+ 1.
Form a uniform partition of
, each sub-interval having length 1, and sum the areas
of the trapezoids which result. The
k th trapezoid which lies under the graph of
y = ln
x
has area equal to
Here is a picture of one of these.
Thus, summing the areas of the inscribed trapezoids and denoting this approximate
area by T n , it equals
n−1
T = ∑ ln(k+-1)+-ln(k)= 1(ln (n!)+ ln((n− 1)!)) = ln(n!)− 1lnn
n k=1 2 2 2
Here this comes from the observation that ∑
k =1 n − 1 ln
= ln
from the laws of
logarithms. Of course, it follows from the picture that the approximation is smaller than
A n . Let
a n =
A n − T n .
Now consider the above picture. Approximate the area between the graph of ln
and the inscribed trapezoid with the difference in area between the two trapezoids in the
above picture. Note that the area of the larger trapezoid is ln
. (why?)
Thus
n∑−1( ( 1) ln(k+ 1)+ ln(k))
0 ≤ an ≤ ln k+ 2 − -------2-------
k=1
Consider the term of the series. It equals
( ( ) ) ( ( ) )
1 ln k+ 1 − ln(k) − 1 ln(k+ 1)− ln k+ 1
2 2 2 2
1 ( ( 1 ) )
= 2 lnk 1+ 2k- − ln(k) −
( [ ( ) ])
1 ln(k+ 1)− ln (k+ 1) --k--+ ---1----
2 ( k+ 1 2)(k +1)
1 ( 1-) 1 -----1-----
= 2 ln 1+ 2k − 2 ln -k- + --1--
( ) ( k+1 )2(k+1)
= 1 ln 1+ 1-- − 1ln k+-1-
2 2k 2 k+ 12
1 ( 1 ) 1 ( 1 )
= - ln 1+ --- − -ln 1+ --(---1)
2 ( 2k) 2 ( 2 k + 2)
1 1-- 1 ---1----
≤ 2 ln 1+ 2k − 2 ln 1+ 2(k + 1)
Thus
1n∑−1( ( 1 ) ( 1 ))
0 ≤ an ≤ 2 ln 1+ 2k- − ln 1+ 2-(k-+-1)
( k=1 ) ( ) ( )
= 1 ln 1+ 1 − 1ln 1 + 1-- ≤ 1 ln 3 .
2 2 2 2n 2 2
Since
a n is increasing as
n increases, this implies that lim
n →∞ a n =
β exists. Now this
implies that
e a n also converges to some number
α. Hence
A nlnn−n+1 n −n√ --
lim e-n-= lim e---------= lim n-e----ne= α
n→∞ eTn n→ ∞ eln(n!)− 12lnn n→ ∞ n!
Letting c = eα − 1 , it follows from the above that
n −n√ --
lim n-e----nc = 1.
n→ ∞ n!
This has proved the following lemma.
Lemma 9.1.1 There exists a positive number c such that
n!
nl→im∞ nn+(1∕2)e−nc = 1.
There are various ways to show that this constant c equals
. Using integration by
parts, it follows that whenever
n is a positive integer larger than 1,
∫ π∕2 n − 1∫ π∕2
sinn(x)dx = ----- sinn−2 (x)dx
0 n 0
Lemma 9.1.2 For m ≥ 1,
∫ π∕2
sin2m (x)dx = -(2m-−-1)⋅⋅⋅1--π-
0 2m (2m − 2)⋅⋅⋅22
∫ π∕2 2m+1 (2m )(2m − 2)⋅⋅⋅2
0 sin (x)dx = (2m--+1)(2m-−-1)⋅⋅⋅3
Proof: Consider the first formula in the case where m = 1. From beginning
calculus,
∫ π∕2 2 π 1π
sin (x)dx = 4-= 22-
0
so the formula holds in this case. Suppose it holds for m. Then from the above reduction
identity and induction,
∫ π∕2 2m+2 -2m-+-1-∫ π∕2 2m
0 sin (x)dx = 2(m + 1) 0 sin (x)dx
2m + 1 (2m − 1)⋅⋅⋅1 π
= ------------------------.
2(m + 1)2m (2m − 2)⋅⋅⋅2 2
The second claim is proved similarly.
■
Now from the above identities,
∫π∕2 2m 2
--0--sin---(x)dx- = π(2m + 1)-(2m-−-1)-⋅⋅⋅32-⋅12-
∫π0∕2sin2m+1 (x)dx 2 (2m )2 (2m − 2)2⋅⋅⋅22
which implies
∫
π 1 (2m )2(2m − 2)2⋅⋅⋅22 π0∕2sin2m (x)dx
2-= 2m-+-1-(2m-−-1)2⋅⋅⋅32-⋅12--∫π∕2--2m+1------
0 sin (x)dx
From the reduction identity,
∫π∕2sin2m (x) dx ∫π∕2sin2m (x)dx
1 ≤ ∫π0∕2------------= ----0∫-π∕2-------------≤ 2m-+-1
0 sin2m+1 (x)dx 22mm+1-0 sin2m−1(x)dx 2m
It follows
2 2 2 2 2
--2m--2m --(2m-−-2)2-⋅⋅⋅2--- ≤ π-≤ ---1-- (2m-)-(2m2−-2)⋅⋅⋅2-2m-+-1
2m + 1 (2m − 1) ⋅⋅⋅32 ⋅12 2 2m + 1 (2m − 1) ⋅⋅⋅32 ⋅12 2m
(2m − 2)2⋅⋅⋅22
= 2m (2m-−-1)2⋅⋅⋅32 ⋅12
It follows that
2m π ∕2
2m-+-1 ≤ ----(2m−-2)2⋅⋅⋅22- ≤ 1
2m (2m −1)2⋅⋅⋅32⋅12
and so
(2m − 2)2⋅⋅⋅22 π
lim 2m -------2---------= --
m →∞ (2m − 1) ⋅⋅⋅32 ⋅12 2
This is sometimes called Wallis’s formula. This implies
22m−-2((m-−-1)!)2-- π-
mlim→∞ 2m (2m − 1)2⋅⋅⋅32 ⋅12 = 2
Now multiply on the bottom and top by
2 2 2
2 = 2
2 m 2 to obtain
22m−-2((m-−-1)!)222m-(m!)2 2 222m−-2((m-−-1)!)222m-(m!)2-
mli→m∞ 2m ((2m )!)2 = mli→m∞ 2m 2m ((2m )!)2
2m 2 2m 2
lim 2---(m!-)2---(2m!)- = π-
m →∞ 2m ((2m)!) 2
It follows that
22m (m!)2 ∘ π-
lim ----1∕2------= -- (9.1)
m→ ∞ (2m ) (2m )! 2
(9.1)
Now with this result, it is possible to find c in Stirling’s formula. Recall
lim -----m!------= 1
m→ ∞ mm+ (1∕2)e− mc
It follows that
-----(2m-)!------
mli→m∞ (2m )2m+ (1∕2)e−2mc = 1
Therefore, from 9.1 ,
( ) ( )
∘ π- 22m mm+(m1∕!2)e−mc-2 mm+ (1∕2)e−mc 2
2- = mli→m∞ ----1∕2(-----(2m-)!-----)(-----2m+-(1∕2)-−2m-)-
(2m) (2m )2m+(1∕2)e−2mc (2m ) e c
22m (mm+ (1∕2)e−mc)2
= lim -------(----------------)-
m→ ∞ (2m)1∕2 (2m)2m+(1∕2)e−2mc
22mm2m+1e −2mc2
= lim -------(----------------)-
m→ ∞ (2m)1∕2 (2m)2m+(1∕2)e−2mc
22mm2m+1c 1
= lim ----1∕2----2m+(1∕2) = -c
m→ ∞ (2m) (2m ) 2
which shows that
c =
. This proves Stirling’s formula.
Theorem 9.1.3 The following formula holds.
lim ----m!------= √2π-
m→ ∞ mm+ (1∕2)e− m