162 3 Real Analysis
We conclude the list of examples with the proof of Stirling’s formula.Stirling’s formula.
n!=√
2 πn(n
e)n
·e
12 θnn
, for some 0 <θn< 1.Proof.We begin with the Taylor series expansions
ln( 1 ±x)=±x−
x^2
2±
x^3
3−
x^4
4±
x^5
5+···, forx∈(− 1 , 1 ).Combining these two, we obtain the Taylor series expansion
ln1 +x
1 −x= 2 x+2
3
x^3 +2
5
x^5 +···+2
2 m+ 1x^2 m+^1 +···,again forx∈(− 1 , 1 ). In particular, forx= 2 n^1 + 1 , wherenis a positive integer, we have
ln
n+ 1
n=
2
2 n+ 1+
2
3 ( 2 n+ 1 )^3+
2
5 ( 2 n+ 1 )^5+···,
which can be written as
(
n+
1
2
)
ln
n+ 1
n= 1 +
1
3 ( 2 n+ 1 )^2+
1
5 ( 2 n+ 1 )^4+···.
The right-hand side is greater than 1. It can be bounded from above as follows:
1 +
1
3 ( 2 n+ 1 )^2+
1
5 ( 2 n+ 1 )^4+···< 1 +
1
3
∑∞
k= 11
( 2 n+ 1 )^2 k= 1 +1
3 ( 2 n+ 1 )^2·
1
1 −( 2 n+^11 ) 2= 1 +1
12 n(n+ 1 ).
So using Taylor series we have obtained the double inequality
1 ≤
(
n+1
2
)
lnn+ 1
n< 1 +
1
12 n(n+ 1 ).
This transforms by exponentiating and dividing through byeinto
1 <
1
e(
n+ 1
n)n+ (^12)
<e
12 n(n^1 + 1 )
.