Stirling's approximation



         


mathematics, Stirling's approximation (or Stirling's formula) is an approximation for large factorials. It is named in honour of James Stirling. Formally, it states:

<math>\lim_{n \rightarrow \infty} {n!\over \sqrt{2 \pi n} \; \left(\frac{n}{e}\right)^{n} } = 1<math>

which is often written as

<math>n! \sim \sqrt{2 \pi n} \; \left(\frac{n}{e}\right)^{n}<math>

(See limit, square root, π, e.) For large n, the right hand side is a good approximation for n!, and much faster and easier to calculate. For example, the formula gives for 30! the approximation 2.6452 × 1032 while the correct value is about 2.6525 × 1032. The error is less than 0.3% in this case.

[Top]

Speed of convergence and error estimates

More precisely,

<math>n! = \sqrt{2 \pi n} \; \left(\frac{n}{e}\right)^{n}e^{\lambda_n}<math>

with

<math>\frac{1}{12n+1} < \lambda_n < \frac{1}{12n}.<math>

Stirling's formula is in fact the first approximation to the following series (now called the Stirling series):

<math>
n!=\sqrt{2\pi n}\left({n\over e}\right)^n \left( 1 +{1\over12}{1\over n} +{1\over288}{1\over n^2} -{139\over51840}{1\over n^3} -{571\over2488320}{1\over n^4} +... \right) <math>

As <math>n \to \infty<math>, the error in the truncated series is asymptotically equal to the first omitted term. This is an example of an asymptotic expansion.

[Top]

Derivation

The formula, together with precise estimates of its error, can be derived as follows. Instead of approximating n!, one considers the natural logarithm ln(n!) = ln(1) + ln(2) + ... + ln(n); the Euler-Maclaurin formula gives estimates for sums like these. The goal, then, is to show the approximation formula in its logarithmic form:

<math>\ln n! \approx \left(n+\frac{1}{2}\right)\ln n - n +\ln\left(\sqrt{2\pi}\right)<math>


Alternatively, the leading term of Stirling's approximation can be obtained through the method of steepest descent.

[Top]

History

The formula was first discovered by Abraham de Moivre in the form

<math>n!\sim [{\rm constant}]\cdot n^{n+1/2} e^{-n}<math>

Stirling's contribution consisted of showing that the "constant" is <math>\sqrt{2\pi}<math>.






  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License