# Is there a “simple” way of proving Stirlings formula? [duplicate]

Is there any way to derive Stirlings formula that only requires some undergraduate knowledge of calculus, real analysis and perhaps some identitets involving the gamma function, maybe Wallis product, and things along those lines? If not, and I know this is a rather vague question, what is the simplest but still sufficiently rigorous way of deriving it? I had a look at Stirling's formula: proof? but the comments seems quite messy. Wikipedia was not particularly helpful either since I have not learned about Laplace's method, Bernoulli numbers or the trapezoidal rule.

• A short comment: In many of the applications of Stirling formula I have seen, Stirling was an overkill. Often the simple $$\lim_n \frac{n}{\sqrt[n]{n!}}=e$$ suffices, and this is an immediate consequence of Cezaro average. – N. S. Jan 2 '17 at 23:47
• What form of Stirling do you need? N.S. gives the simplest above, and you can get even better without sacrificing a ton of simplicity... for example, if you drop the condition of needing to know the multiplicative constant ($\sqrt{2\pi}$) a proof is a lot easier – Brevan Ellefsen Jan 2 '17 at 23:55
• an easy logarithmic version, following by summation by parts : $\ln m! = \sum_{n=1}^m \ln n = m \ln m+ \sum_{n=1}^{m-1} n (\ln n-\ln(n+1))=m \ln m-\sum_{n=1}^{m-1} n \int_n^{n+1}\frac{dt}{t}$ $=m \ln m-\int_1^m \lfloor t \rfloor \frac{dt}{t} = m \ln m-(m-1)+\frac{\ln m}{2}+\int_1^m ( t-\lfloor t \rfloor-\frac{1}{2}) \frac{dt}{t}$ $= (m+\frac12) \ln m-m+\frac12+\mathcal{O}(1/m)$ – reuns Jan 3 '17 at 0:00
• Why is $\sqrt{2\pi}$ usually included if one can just use the version N.S. showed? I mean its just a constant. – David Jan 3 '17 at 0:06
• @David Because it is actually better. Us mathematicians strive for the best after we've covered the simple. – Simply Beautiful Art Jan 3 '17 at 0:08

## 2 Answers

As an extremely simple derivation of bounds Stirling's approximation sets, notice that

$$\ln(n!)=\sum_{k=1}^n\ln(n)>\int_1^n\ln(x)\ dx=n\ln n-n+1$$

This inequality is simply a right Riemann sum of a monotonically increasing function. Similarly,

$$\frac12\ln(n)+\ln((n-1)!)=\frac12\left(\ln(n!)+\ln((n-1)!)\right)\\=\frac12\sum_{k=1}^n\ln(n)+\frac12\sum_{k=1}^{n-1}\ln(n)<\int_1^n\ln(x)\ dx=n\ln n-n+1$$

Which is the trapezoidal sum (average of left/right Riemann sums). From each of these, you easily get that

$$e\left(\frac ne\right)^n<n!<\sqrt{n+1}\left(\frac{n+1}e\right)^n$$

The lower bound may then be improved using

$$n!=n(n-1)!<e\sqrt n\left(\frac ne\right)^n$$

Stronger results that follow this line of thought may be derived by the much better Euler-Maclaurin formula.

• Classy as always. I really like the bounds you got here for the amount of work required... did you come up with this proof on your own, or do you have a reference to where you first saw the proof? It is fantastic! Reminds me a lot of Dr. MV's proof here, but this one is actually simpler and more complete in that it not only yields the limit but provides bounds. This might be my new favorite proof. +1!! – Brevan Ellefsen Jan 3 '17 at 1:00
• @BrevanEllefsen Oh really? I kind of did come up with this while trying to derive a new form of the Gamma fucntion when I noticed that $\ln(n!)$ is much easier to handle than $n!$ on its own due to log rules. – Simply Beautiful Art Jan 3 '17 at 1:02
• @BrevanEllefsen Hm, yes, mine is definitely far simpler, but that's because I dropped all of the "error approximations" that Dr.MV kept using. :) But his was definitely not needed for that question. – Simply Beautiful Art Jan 3 '17 at 1:10

You may find a "simple" or better well written proof in the book Real Analysis and Foundations from Steven G. Krantz (p. 277 and 278) which you may find. As far as I can see, he uses the Gamma function, l'Hopital's rule and the evaluation in polar coordinates of $$\int_{-\infty}^\infty e^{-s^2} ds$$

• The link does not work for me. – David Jan 2 '17 at 23:46
• @David Maybe it is better for you now. – TheGeekGreek Jan 2 '17 at 23:51
• Thank you very much! I will look through it. – David Jan 2 '17 at 23:51
• @David You're welcome! – TheGeekGreek Jan 2 '17 at 23:52
• That is a weird source. The limit argument on top of page 278 needs dominated convergence theorem, and finding the integrable majorant function is not so easy. By the way: the details seem not to exist n the exercises ... – Eric Feb 22 at 10:45