z z z z 1

advertisement
Derivation of Sterling's Formula: n! ≈ 2πn e − n n n
Based on a conversation with Henry Pollak.
We know that n! =
z
∞
0
e − x x n dx for all integer values of n. Rewriting, we have
n! =
z
∞
0
z
n ln x
e − x e b g dx =
bg
bg
bg
bg
∞
0
n ln x − x
e b g dx .
Consider the function f x = n ln x − x .
It has its maximum value at x = n .
Approximate the exponent in the integral with its quadratic approximation centered at its
maximum value.
bg
bg
f x = n ln x − x
f n = n ln n − n
n
f ′x = − 1
f ′n = 0
x
−n
−1
f′
f′
′x = 2
′n =
x
n
2
1 x− n
. Therefore,
So n ln x − x ≈n ln n − n −
2
n
bg
bg
bg
b g
bg
n! =
z
∞
0
z
b g
1 x− n
n
∞ n ln b n g− n −
2
e b g dx ≈ e
0
n ln x − x
2
bg
bg
dx = e b g
n ln n − n
z
∞
0
e
−
b g
1 x− n
2 n
2
dx .
We need to evaluate the definite integral and simplify the constant. The integration is a
little tricky, requiring two substitutions.
n −n
ne
Given
n −n
ne
z
∞
−n
e
y2
− 2n
z
∞
0
b x− ng
2
e
− 2n
dx , we make the substitution
dy . Now let u =
y = x − n , so we have
y
, this gives the integral n n e − n n
n
z
∞
−
n
e
reasonably large value of n, this integral has the same value as n n e − n n
bg
the function g x = e
− 12 x 2
−
1 y2
2
z
∞
−∞
dy . For any
e
−
1 y2
2
dy , since
dies out so quickly.
We now have the approximation n! ≈e − n n n n
one, whose value we know to be
z
∞
−∞
e
− 21 u 2
z
∞
−∞
e
− 12 u 2
du = 2π .
This gives us Sterling's formula n! ≈e − nn n 2πn .
du . This latter integral is a standard
This approximation is good inside the region of the quadratic approximation because that
approximation is so good. It is good outside the region of the quadratic approximation
because the function values are so small.
Download