Skip to main content
Physics LibreTexts

10.5: E- Stirling's Approximation

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    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)\]

    Screen Shot 2019-07-26 at 1.55.13 PM.png

    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 !)=\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.\]

    10.5: E- Stirling's Approximation is shared under a CC BY-SA license and was authored, remixed, and/or curated by Daniel F. Styer.

    • Was this article helpful?