Stirling's Approximation

Author

Eric W. Weisstein
December 29, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/StirlingsApproximation.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/StirlingsApproximation.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Series for n!

Expand[FullSimplify[Log[Sqrt[2π] n^(n+1/2) Exp[-n]],n>0]]

Simplify[Subtract@@{n Log[n]-n+Log[2π n]/2,(n+1/2)Log[n]-n+Log[2π]/2}]

v4.2

Series[Log[n!],{n,∞,5}]

v5.0

FullSimplify[Normal[Series[Log[n!],{n,∞,5}]]]

Approximation

LogPlot[Abs[{(Sqrt[(2n+(1/3))π])(n^n)Exp[-n],(n^n)Exp[-n](Sqrt[2π n])}-n!],{n,0,200}]

100.!

LogPlot[Abs[(Sqrt[(2n+(1/3))π])(n^n)Exp[-n]-(n^n)Exp[-n](Sqrt[2π n])],{n,0,200}]