Jacek Cicho N: Bstract

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

STIRLING APPROXIMATION FORMULA

JACEK CICHOŃ

A BSTRACT. This note constains aa elementary and complete proof of



the Stirling approximation formula n! ∼ 2πn( ne )n of the factorial
function.

1. I NTRODUCTION

It is quite easy to get an approximation of the number n! which gives an


information about its ratio of growth. Namely, let us consider the sequence
S(n) = ln(n!). Then S(n) = nk=1 ln k. So we see that ln n ≤ S(n) ≤
P

n ln n, so the sequence S(n) grows rather slowly. Look at this picture:

I placed at this picture the plot of the fuction x 7→ ln x. The area of the
figure below the plot is equal to S(15). This observation, generalized to
R n+1
arbitrary n gives us the bound S(n) ≤ 1 ln xdx. Look now at the fol-
lowing picture:

Rn
We read from this picture that S(n) ≥ 1 ln xdx So we have derived the
following bounds:
Z n Z n+1
ln xdx ≤ S(n) ≤ ln xdx.
1 1
1
Stirling formula Notes for students 2
R
All what we need now is the formula ln xdx = x ln x−x+C. You can de-
rive this formula using the integration by parts ( ln xdx = (x)0 ln xdx =
R R

. . .). Let us note that x ln x − x = x(ln x − 1) = x(ln x − ln e) = x ln( xe ).


Using this formula we get
Z n
x n 1 n nn
ln xdx = [x ln( )]nx=1 = n ln − ln = ln( )n + ln e = ln n−1
1 e e e e e
and
n+1
(n + 1)n+1
Z
ln xdx = . . . = ln
1 en
Hence
nn (n + 1)n+1
ln ≤ S(n) ≤ ln
en−1 en
Finally, we observe that n! = exp(S(n)) and we transform this formula
info the form
nn (n + 1)n+1
≤ n! ≤
en−1 en
or
n n 1 n
e( )n ≤ n! ≤ ( )n (n + 1)(1 + )n < e(n + 1)( )n
e e n e
Therefore using a very elementary tools we derived the following formula
 n n
n! = α(n)
e
where α is some function such that e ≤ α(n) ≤ (n + 1)e. This is a quite
precise result and is sufficient for many applications.

2. M ORE PRECISE RESULT: S TIRLING ’ S FORMULA

We are going to prove in this section the Strirling approximation formula:

√ n n

n! ∼ 2πn e

i.e. that
n!
lim √ n = 1 .
n→∞ 2πn ne
Let
n!
an = √ n
2n ne
Our plan is following:
(1) First we show that limn→∞ an = C for some constant C. This will
imply that
n!
lim √ =1
n→∞ C 2n( n )n
e
Stirling formula Notes for students 3

(2) Next we derive Wallis formula which gives a precise asymptotic


result involving n!

(3) Finally we put in Wallis formula the approximation C 2n( ne )n and
this will give us the precise value of the constant C.

2.1. Part 1. Let


bn = ln an .
After easy transformations we get the following equality
1 n+1
bn − bn+1 = (n + 1) ln −1
2 n
We are going to use an expansion of the function ln into the Taylor series at
point 1. However the most obvious approach
n 1 1 1 1
ln = ln 1 = −· + · − ...
n+1 1+ n n 2 n2
gives us a series with alternating terms which are usually difficult to handle.
So we try to be more ingenious. Observe that that for |t| < 1 we have

1 1 3 1 4 1 5
ln(1 + t) = t − t2 + t − t + t + ...
2 3 4 5
1 2 1 3 1 4 1 5
− ln(1 − t) = t + t + t + t + t + ...
2 3 4 5
hence

1+t X 1
ln = ln(1 + t) − ln(1 − t) = 2 t2k+1
1−t k=0
2k + 1
n+1 1+t 1
The only solution of the equation n
=
is equal to t =
1−t 2n+1
so we get
∞  2k+1
n+1 X 1 1
ln =2 .
n k=0
2k + 1 2n + 1
2
The first term of this series is equal to 2n+1
, hence
∞  2k
1 n+1 X 1 1
bn − bn+1 = (2n + 1) ln −1=
2 n k=1
2k + 1 2n + 1
so the sequence (bn ) is decreasing. Next we have
∞  k
X 1 1 1 1 1
bn − bn+1 < 2
= 2 1 =
k=1
(2n + 1) (2n + 1) 1 − (2n+1)2 4 n(n + 1)
Observe that (a telescoping sum)
b1 − bn = (b1 − b2 ) + (b2 − b3 ) + . . . (bn−1 − bn )
Stirling formula Notes for students 4

therefore
n−1 ∞
1X 1 1X 1 1
b1 − bn < < =
4 m=1 m(m + 1) 4 m=1 m(m + 1) 4
hence
1 e 1
bn > b1 −= √ − ≈ 1.67212
4 2 4
so (bn )n≥1 is bounded from below, hence is convergent to some constant D.
This implies that

lim an = lim eb1 = elimn→∞ an = eD .


n→∞ n→∞

2.2. Part 2. We will prove in this part the Wallis product formula

Y 2n 2n π
(1) =
n=1
2n − 1 2n + 1 2
This formula can be easily derived immediately from the Euler formula
sin(x) = x ∞ x 2
Q
n=1 (1 − ( πn ) ), but for completness of our arguments we
shall give its elementary proof.
Let us start from the interval sinn xdx. Intergrating by parts we get
R
Z Z Z
n
sin xdx = sin n−1
x sin xdx = − sinn−1 x(cos x)0 dx =
Z
n−1
− sin x cos x + (n − 1) sinn−2 x cos2 xdx =
Z
n−1
− sin x cos x + (n − 1) sinn−2 x(1 − sin2 x)dx = . . .

and after easy calculus we get


n−1
Z Z
n 1 n−1
(2) sin xdx = − sin x cos x + sinn−2 xdx .
n n
Hence
π/2
n − 1 π/2 n−2
Z Z
n
sin xdx = sin xdx .
0 n 0
R π/2 R π/2
Notice that 0 1dx = π/2 and 0 sin xdx = 1. Hence we are able to
R π/2
calculate the integral 0 sinn xdx for arbitrary n. After a while we get
Z π/2 n
2n π Y 2k − 1
Sn = sin xdx =
0 2 k=1 2k
Z π/2 n
2n+1
Y 2k
Cn = sin xdx =
0 k=1
2k + 1
Stirling formula Notes for students 5

Hence, finally we get


n
π Y 2k
= Sn =
2 k=1
2k − 1
n n
! n !−1
Y 2k Y 2k Y 2k
= Sn =
k=1
2k − 1 k=1 2k + 1 k=1
2k + 1
n
Sn Y 2k 2k
.
Cn k=1 2k − 1 2k + 1
Sn
Therefore the Wallis formula will be proved if we show that limn→∞ Cn
=
1. Fortunately this step is easy. Namely for x ∈ (0, π2 ) we have

0 < sin2n+2 x < sin2n+1 x < sin2n x

hence
0 < Sn+1 < Cn < Sn
so
Sn Sn Sn+1 n
1> > > = .
Sn Cn Sn n+1
Hence the Wallis formula is proved.

2.3. Part 3. The Wallis formula 1 may be written in a more compact way
as
24n (n!)4 π
(3) lim =
n→∞ ((2n)!)2 (2n + 1) 2

In Part 1 we proved that n! ∼ C 2n( ne )n . for come constant C. If we put
this approximation into the formula 3 then we get
π 24n C 4 (2n)2 ( ne )4n
= lim 2 =
2 n→∞ C 4n( 2ne
)2n (2n + 1)
24n 4n2 n4n n2 C2
C 2 lim = lim C 2
=
n→∞ 4n(2n + 1)(2n)4n n→∞ n(2n + 1) 2

Therefore C = π and the Strirling formula is proved.

3. M UCH MORE PRECISE RESULTS

The Strirlin approximation formula can be extended to the following in-


equality
√ n 1 √ n 1
2πn( )n e 12n+1 < n! < 2πn( )n e 12n
e e
Stirling formula Notes for students 6

A more precise version of the Stirling formula is given by



 
n n 1 1 139 1
n! = 2πn( ) 1 + + − + O( 4 )
e 12n 288n2 51840n3 n
4. R EMARKS

You should do yourself the following:


(1) complete derivation of Equation 3 from Equation 1
(2) complete derivation of Equation 2.

Final remark: this document may be used without any limitations.

You might also like