# 10.5: E- Stirling's Approximation

- Page ID
- 6396

The Stirling formula is an approximation for *n*! that is good at large values of *n*.

\[ n !=1 \cdot 2 \cdot 3 \cdots(n-1) \cdot n\]

\[ \ln (n !)=\underbrace{\ln 1}_{0}+\ln 2+\ln 3+\cdots+\ln (n-1)+\ln (n)\]

Note that the function ln *x* is nearly flat for large values of *x*. For example, ln 10^{23} is about equal to 23.

From the figure

\[ \ln (6 !)=\text { area under the staircase }>\int_{1}^{6} \ln x d x\]

and in general

\[ \ln (n !)>\int_{1}^{n} \ln x d x=[x \ln x-x]_{1}^{n}=n \ln n-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 !) \approx n \ln n-n \quad \text { for } n \gg 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

\[ A^n\]

increases rapidly with *n* for positive *A*, but

\[ n ! \approx\left(\frac{n}{e}\right)^{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

\[ \int_{1}^{n} \ln (x+1) d x>\ln n !.\]

b. Conclude that

\[ (n+1) \ln (n+1)-n+1-2 \ln 2>\ln n !>n \ln n-n+1.\]