|
Stirling's formula gives an approximation for , the factorial function. It is
We can derive this from the gamma function. Note that for large ,
 |
(1) |
where
with
. Taking and multiplying by , we have
 |
(2) |
Taking the approximation for large gives us Stirling's formula.
There is also a big-O notation version of Stirling's approximation:
 |
(3) |
We can prove this equality starting from (2). It is clear that the big-O portion of (3) must come from
, so we must consider the asymptotic behavior of .
First we observe that the Taylor series for is
But in our case we have to a vanishing exponent. Note that if we vary as
, we have as

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.)
|