logo

Rigorous Proof of Stirling's Approximation Formula 📂Functions

Rigorous Proof of Stirling's Approximation Formula

Theorem

$$ \lim_{n \to \infty} {{n!} \over {e^{n \ln n - n} \sqrt{ 2 \pi n} }} = 1 $$

Explanation

Stirling’s approximation, or the Stirling formula, is useful in many places such as statistics and physics. As an alternative expression, it can be written using the gamma function as follows. $$ \Gamma ( n ) \approx {e^{n \ln n - n} \sqrt{ 2 \pi n}} $$

This proof appears in the appendix of a book called 'The Secret of the Zeta Function', where the author, a Japanese mathematician named Nobushige Kurokawa, revealed that he discovered it in high school and published it a few years later in the Mathematics Seminar (數學セミナ-) June 1972 issue. However, having looked it up myself, it omits so much that it is not really worth consulting, and in fact its argument was not even a proof. Likewise, looking up 'The Secret of the Zeta Function' directly will not be of much help either. I can confidently assert that this post is the easiest and kindest explanation of Kurokawa’s proof in Korea.

There are also proofs found in other analysis textbooks, but the reason I deliberately chose this one is that it was easier than any proof I have seen so far, without giving up rigor. Of course, it would get longer if the process of proving the lemmas were fully included, but at least I could avoid the drudgery of proving lemmas solely for the sake of Stirling’s approximation. Moreover, the lemma appearing in this proof method arises in quite a well-structured context, and following that process is also quite enjoyable from a learner’s point of view.

See Also

Proof

Define the function $f( x ) := \ln (1 + x)$.


Part 1. $\displaystyle \lim_{n \to \infty} \left[ \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) - n \int_{0}^{1} f(x) dx \right] = {{f(1) - f(0) } \over {2}}$

Since $\displaystyle f '(x) = {{1} \over {1 + x}}$, for $\displaystyle x \in \left[ {{k-1} \over {n}} , {{k} \over {n}} \right]$ the minimum of $f ' (X)$ is $\displaystyle {{1} \over {1 + {{k} \over {n}} }}$ and its maximum is $\displaystyle {{1} \over {1 + {{k-1} \over {n}} }}$. Therefore

$$ {{1} \over {1 + {{k} \over {n}} }} \le {{ f \left( {{k} \over {n}} \right) - f(x) } \over { {{k} \over {n}} - x }} \le {{1} \over {1 + {{k-1} \over {n}} }} $$

Multiplying each side by $\displaystyle \left( {{k} \over {n}} - x \right)$ gives

$$ {{1} \over {1 + {{k} \over {n}} }} \left( {{k} \over {n}} - x \right) \le f \left( {{k} \over {n}} \right) - f(x) \le {{1} \over {1 + {{k-1} \over {n}} }} \left( {{k} \over {n}} - x \right) $$

Integrating each side from $\displaystyle {{k-1} \over {n}}$ to $\displaystyle {{k} \over {n}}$, since

$$ \begin{align*} \int_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \left( {{k} \over {n}} - x \right) dx =& {{k} \over {n}} {{1} \over {n}} - \left[ {{1} \over {2}} x^2 \right]_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \\ =& {{2k} \over {2n^2}} - {{k^2 - k^2 + 2k - 1} \over {2n^2}} \\ =& {{1} \over {2n^2}} \end{align*} $$

we have

$$ {{1} \over {2n^2}} {{1} \over {1 + {{k} \over {n}} }} \le \int_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \left[ f \left( {{k} \over {n}} \right) - f(x) \right] dx \le {{1} \over {2n^2}} {{1} \over {1 + {{k-1} \over {n}} }} $$

Multiplying each side by $n$ gives

$$ {{1} \over {2n}} {{1} \over {1 + {{k} \over {n}} }} \le n \int_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \left[ f \left( {{k} \over {n}} \right) - f(x) \right] dx \le {{1} \over {2n}} {{1} \over {1 + {{k-1} \over {n}} }} $$

Summing each side from $k=1$ to $n$ gives

$$ {{1} \over {2}} \sum_{k=1}^{n} {{1} \over {n}} {{1} \over {1 + {{k} \over {n}} }} \le n \sum_{k=1}^{n} \int_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \left[ f \left( {{k} \over {n}} \right) - f(x) \right] dx \le {{1} \over {2}} \sum_{k=1}^{n} {{1} \over {n}} {{1} \over {1 + {{k-1} \over {n}} }} $$

The middle side is

$$ \begin{align*} n \sum_{k=1}^{n} \int_{ {{k-1} \over {n}} }^{ {{k} \over {n}} } \left[ f \left( {{k} \over {n}} \right) - f(x) \right] dx =& n \left[ {{k} \over {n}} - {{k-1} \over {n}} \right] \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) - n \int_{0}^{1} f(x) dx \\ =& \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) - n \int_{0}^{1} f(x) dx \end{align*} $$

Riemann Sums and the Definite Integral: $$\lim _{ n\to \infty }{ \sum _{ k=1 }^{ n }{ f\left( a+\frac { p }{ n }k \right) \frac { p }{ n } } } =\int _{ 0 }^{ 1 }{ pf(a+px)dx }$$

The left and right sides, as $n \to \infty$, become

$$ \begin{align*} {{1} \over {2}} \sum_{k=1}^{\infty} {{1} \over {n}} {{1} \over {1 + {{k} \over {n}} }} =& {{1} \over {2}} \sum_{k=1}^{\infty} {{1} \over {n}} {{1} \over {1 + {{k-1} \over {n}} }} \\ =& {{1} \over {2}} \int_{0}^{1} {{1} \over {1 + x}} dx \\ =& {{1} \over {2}}\left[ \ln | 1 + x | \right]_{0}^{1} \\ =& {{f(1) - f(0) } \over {2}} \end{align*} $$

By the squeeze theorem,

$$ \lim_{n \to \infty} \left[ \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) - n \int_{0}^{1} f(x) dx \right] = {{f(1) - f(0) } \over {2}} $$


Part 2. $\displaystyle \lim_{n \to \infty} \left[ {{(2n)!} \over {n! n^n}} \left( {{e} \over {4}} \right)^{n} \right] = \sqrt{2}$

Let us examine each term of the result obtained in Part 1 above. The first term $\displaystyle \sum_{k=1}^{n} f \left( {{k} \over {n}} \right)$ is

$$ \begin{align*} \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) =& \sum_{k=1}^{n} \ln \left( {{n+k} \over {n}} \right) \\ =& \ln \left( {{n+1} \over {n}} {{n+2} \over {n}} \cdots {{n+n} \over {n}} \right) \\ =& \ln \left( {{ (2n)! } \over { n! n^n }} \right) \end{align*} $$

The second term $\displaystyle n \int_{0}^{1} f(x) dx$ is

$$ \begin{align*} n \int_{0}^{1} f(x) dx =& n \left[ (1+x) \ln (1+x) -x \right]_{0}^{1} \\ =& 2n \ln 2 - n \\ =& \ln \left( {{2^{2n}} \over {e^{n}}} \right) \\ =& \ln \left( {{4} \over {e}} \right)^{n} \end{align*} $$

Therefore

$$ \begin{align*} \lim_{n \to \infty} \left[ \sum_{k=1}^{n} f \left( {{k} \over {n}} \right) - n \int_{0}^{1} f(x) dx \right] =& \lim_{n \to \infty} \ln \left[ {{(2n)!} \over {n! n^n}} \left( {{e} \over {4}} \right)^{n} \right] \\ =& {{ \ln 2 } \over {2}} \\ =& \ln \sqrt{2} \end{align*} $$

and, rearranging,

$$ \lim_{n \to \infty} \left[ {{(2n)!} \over {n! n^n}} \left( {{e} \over {4}} \right)^{n} \right] = \sqrt{2} $$


Part 3. $\displaystyle \lim_{n \to \infty} {{4^n (n!)^2 } \over {\sqrt{n} (2n)! } } = \sqrt{ \pi }$

Wallis Product: $$ \prod_{n=1}^{\infty} {{4n^2} \over {4n^2 - 1}} = \lim_{n \to \infty} {{2 \cdot 2 } \over { 1 \cdot 3 } } \cdot {{4 \cdot 4 } \over { 3 \cdot 5 } } \cdot \cdots \cdot {{2n \cdot 2n } \over { (2n-1) \cdot (2n+1) } } = {{ \pi } \over {2}} $$

$$ \begin{align*} {{\pi} \over {2}} =& \lim_{n \to \infty} {{2^2 \cdot 4^2 \cdot \cdots \cdot (2n)^2} \over {1 \cdot 3^2 \cdot \cdots \cdot (2n-1)^2 \cdot (2n+1)}} \\ =& \lim_{n \to \infty} {{2^2 \cdot 4^2 \cdot \cdots \cdot (2n)^2} \over {1 \cdot 3^2 \cdot \cdots \cdot (2n-1)^2 \cdot 2n }} \end{align*} $$

Multiplying both sides by $2$ gives

$$ \pi = \lim_{n \to \infty} {{2^2 \cdot 4^2 \cdot \cdots \cdot (2n)^2} \over {1 \cdot 3^2 \cdot \cdots \cdot (2n-1)^2 \cdot n }} $$

Taking the square root of both sides gives

$$ \begin{align*} \sqrt{ \pi } =& \lim_{n \to \infty} {{1} \over {\sqrt{n}}} {{2 \cdot 4 \cdot \cdots \cdot (2n)} \over {1 \cdot 3 \cdot \cdots \cdot (2n-1) }} \\ =& \lim_{ n \to \infty} {{1} \over {\sqrt{n}}} {{2 \cdot 4 \cdot \cdots \cdot (2n) \cdot 2 \cdot 4 \cdot \cdots \cdot (2n)} \over {1 \cdot 2 \cdot 3 \cdot \cdots \cdot (2n-1) \cdot 2n }} \\ =& \lim_{n \to \infty} {{4^n (n!)^2 } \over {\sqrt{n} (2n)! }} \end{align*} $$

Rearranging,

$$ \lim_{n \to \infty} {{4^n (n!)^2 } \over {\sqrt{n} (2n)! } } = \sqrt{ \pi } $$


Part 4. Putting It Together

$$ \begin{align*} \lim_{n \to \infty} {{n!} \over {e^{n \ln n - n }\sqrt{n}} } =& \lim_{n \to \infty} {{n!} \over {n^{n} e^{-n} \sqrt{n} }} \\ =& \lim_{n \to \infty} { { (2n)!} \over { 4^{n} n! } } \left( {{e} \over {n}} \right)^{n} {{4^n (n!)^2} \over {\sqrt{ n} (2n)! }} \end{align*} $$

By Parts 2 and 3, $$ \lim_{n \to \infty} { { (2n)!} \over { 4^{n} n! } } \left( {{e} \over {n}} \right)^{n} {{4^n (n!)^2} \over {\sqrt{ n} (2n)! }} = \sqrt{2} \sqrt{\pi} = \sqrt{2 \pi} $$ and therefore $$ \lim_{n \to \infty} {{n!} \over {e^{n \ln n - n} \sqrt{ 2 \pi n} }} = 1 $$