5
$\begingroup$

I need to gain understanding of a proof of Stirling's formula. I have read through Tim Gowers' and Terence Tao's but I'm struggling to follow them. How rigorous is this proof, if at all? Thank you.

\begin{equation} \Gamma(n+1)=n!=\int_0^\infty t^n\mathrm{e}^{-t}\,\mathrm{d}t \end{equation}

Take the log of the integrand:

\begin{equation} \mathrm{log}(t^n\mathrm{e}^{-t})=n\mathrm{log}(t)-t \end{equation}

Let $t=n+\epsilon$, then:

\begin{equation} \begin{aligned} \mathrm{log}(t^n\mathrm{e}^{-t})&=n\mathrm{log}(n+\epsilon)-(n+\epsilon) \\ &=n\mathrm{log}\left(n\left(1+\frac{\epsilon}{n}\right)\right)-(n+\epsilon) \\ &=n\left(\mathrm{log}(n)+\mathrm{log}\left(1+\frac{\epsilon}{n}\right)\right)-(n+\epsilon) \\ \end{aligned} \end{equation}

For very large $n$, $\tfrac{\epsilon}{n}<1$

Taylors series for $\mathrm{log}(1+x)$ is:

\begin{equation} \begin{aligned} \mathrm{log}(1+x) &= x - \frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}\pm \ldots \\ \implies \mathrm{log}(1+\tfrac{\epsilon}{n})&=\sum_{k=1}^{\infty} \frac{{(-1)}^{k+1}}{k} \frac{\epsilon^{k}}{n^k} \end{aligned} \end{equation}

\begin{equation} \begin{aligned} \therefore \,\,\, \mathrm{log}(t^n\mathrm{e}^{-t})&=n\Bigg(\mathrm{log}(n)+\sum_{k=1}^{\infty} \frac{{(-1)}^{k+1}}{k} \frac{\epsilon^{k}}{n^k}\Bigg)-n-\epsilon \\ &=n\mathrm{log}(n)-n+\sum_{k=1}^{\infty} \frac{{(-1)}^{k+1}}{k} \frac{\epsilon^{k}}{n^{k-1}} \\ &=n\mathrm{log}(n)-n-\frac{\epsilon^2}{2n}+\frac{\epsilon^{3}}{3n^{2}}-\frac{\epsilon^{4}}{4n^{3}} \end{aligned} \end{equation}

As this is only an approximation, take only the first term in the series,

\begin{equation} \begin{aligned} \therefore \,\,\, \mathrm{log}(t^n\mathrm{e}^{-t}) &\approx n\mathrm{log}(n)-n-\frac{\epsilon^2}{2n} \\ \implies t^n\mathrm{e}^{-t} &\approx \frac{n^n}{\mathrm{e}^n}\mathrm{e}^{-\frac{\epsilon^2}{2n}} \end{aligned} \end{equation}

Then putting it into our original integral:

\begin{equation} n!=\int_0^\infty t^n\mathrm{e}^{-t}\,\mathrm{d}t=\int_{-n}^\infty \frac{n^n}{\mathrm{e}^n}\mathrm{e}^{-\frac{\epsilon^2}{2n}}{d}\epsilon \end{equation}

As $\int_0^\infty \mathrm{e}^{-px^2}\,\mathrm{d}x=\sqrt{\frac{\pi}{p}}$

\begin{equation} n!\approx n^n\mathrm{e}^{-n}\sqrt{2\pi n} \end{equation}

$\endgroup$
  • 1
    $\begingroup$ I don't like how they say "for very large n, $\epsilon/n < 1$" then proceed to fix $n$ and integrate $\epsilon$ up to infinity. $\endgroup$ – user58512 Mar 12 '13 at 13:01
  • $\begingroup$ Take $\epsilon$ consistently small wrt $n$, say $\epsilon = O(n^{1/2})$. $\endgroup$ – marty cohen Mar 13 '13 at 3:19
1
$\begingroup$

Stirling's formula has many derivations. Here, using the factorial function:

$$ \log N! = \sum_{n=1}^N \log n = \sum_{n=1}^N \sum_{m=1}^n \bigg( \log m - \log (m-1) \bigg) = \sum_{n=1}^N \sum_{m=1}^n - \log \bigg(1 - \frac{1}{m} \bigg) $$

Then we can use the identity $\log (1+x) \approx x$ to obtain a Harmonic series:

$$\sum_{n=1}^N \sum_{m=1}^n - \log \bigg(1 - \frac{1}{m} \bigg) \approx \sum_{n=1}^N \sum_{m=1}^n \frac{1}{m} = \sum_{m=1}^N \frac{N-m}{m} = \sum_{m=1}^N \left( N \cdot \frac{1}{m}- 1 \right)\approx N \log N - N$$

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.