| • Science | • People | • Locations | • Timeline |
which is often written as
(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.
More precisely,
with
Stirling's formula is in fact the first approximation to the following series (now called the Stirling series):
As , the error in the truncated series is asymptotically equal to the first omitted term. This is an example of an asymptotic expansion.
The asymptotic expansion of the logarithm is also called Stirling's series:
In this case, it is known that the error in truncating the series is always of the same sign and at most the same magnitude as the first omitted term.
The formula, together with precise estimates of its error, can be derived as follows. Instead of approximating n!, one considers the natural logarithm
the Euler-Maclaurin formula gives estimates for sums like these. The goal, then, is to show the approximation formula in its logarithmic form:
Alternatively, the leading term of Stirling's approximation can be obtained through the method of steepest descent.
The formula was first discovered by Abraham de Moivre in the form
Stirling's contribution consisted of showing that the "constant" is .
Asymptotic analysis Number theory Special functions