10.5: E- Stirling's Approximation
( \newcommand{\kernel}{\mathrm{null}\,}\)
The Stirling formula is an approximation for n! that is good at large values of n.
n!=1⋅2⋅3⋯(n−1)⋅n
ln(n!)=ln1⏟0+ln2+ln3+⋯+ln(n−1)+ln(n)
Note that the function ln x is nearly flat for large values of x. For example, ln 1023 is about equal to 23.
From the figure
ln(6!)= area under the staircase >∫61lnxdx
and in general
ln(n!)>∫n1lnxdx=[xlnx−x]n1=nlnn−n+1.
For large values of n, where the ln n function is nearly flat, the two expressions above become quite close. Also, the 1 becomes negligible. We conclude that
ln(n!)≈nlnn−n for n≫1.
This is Stirling’s formula. For corrections to the formula, see M. Boas, Mathematical Methods in the Physical Sciences, sections 9-10 and 9-11. You know that
An
increases rapidly with n for positive A, but
n!≈(ne)n
increases a bit more rapidly still.
E.1 Problem: An upper bound for the factorial function
Stirling’s approximation gives a rigorous lower bound for n!.
a. Use the general ideas presented in the derivation of that lower bound to show that
∫n1ln(x+1)dx>lnn!.
b. Conclude that
(n+1)ln(n+1)−n+1−2ln2>lnn!>nlnn−n+1.