Stirling’s approximation


Stirling’s formula gives an approximation for n!, the factorial . It is

n!2nπnne-n

We can derive this from the gamma functionDlmfDlmfMathworldPlanetmath. Note that for large x,

Γ(x)=2πxx-12e-x+μ(x) (1)

where

μ(x)=n=0(x+n+12)ln(1+1x+n)-1=θ12x

with 0<θ<1. Taking x=n and multiplying by n, we have

n!=2πnn+12e-n+θ12n (2)

Taking the approximation for large n gives us Stirling’s formula.

There is also a big-O notation version of Stirling’s approximation:

n!=(2πn)(ne)n(1+𝒪(1n)) (3)

We can prove this equality starting from (2). It is clear that the big-O portion of (3) must come from eθ12n, so we must consider the asymptotic behavior of e.

First we observe that the Taylor seriesMathworldPlanetmath for ex is

ex=1+x1+x22!+x33!+

But in our case we have e to a vanishing exponentMathworldPlanetmathPlanetmath. Note that if we vary x as 1n, we have as n

ex=1+𝒪(1n)

We can then (almost) directly plug this in to (2) to get (3) (note that the factor of 12 gets absorbed by the big-O notation.)

Title Stirling’s approximation
Canonical name StirlingsApproximation
Date of creation 2013-03-22 12:00:36
Last modified on 2013-03-22 12:00:36
Owner drini (3)
Last modified by drini (3)
Numerical id 22
Author drini (3)
Entry type Theorem
Classification msc 68Q25
Classification msc 30E15
Classification msc 41A60
Synonym Stirling’s formula
Synonym Stirling’s approximation formula
Related topic MinkowskisConstant
Related topic AsymptoticBoundsForFactorial