7.4 Stirling’s Formula
The most familiar asymptotic result in mathematics is an application of Theorem 7.3.1 to the gamma function, and deriving it here closes the circle begun in Chapter 2.
Theorem 7.4.1 (Stirling). \[\Gamma (x+1)\ \sim \ \sqrt {2\pi x}\,\left (\frac {x}{e}\right )^{x} \qquad (x\to \infty ),\] and in particular \(n!\sim \sqrt {2\pi n}\,(n/e)^{n}\).
Proof. Start from \(\Gamma (x+1)=\int ^{\infty }_{0}t^{x}e^{-t}\,dt\) and substitute \(t = xu\), giving \[\Gamma (x+1) = x^{x+1}\int ^{\infty }_{0}u^{x}e^{-xu}\,du = x^{x+1}\int ^{\infty }_{0}e^{x\left (\ln u - u\right )}du .\] This is the form required by Theorem 7.3.1 with \(h(u)=\ln u - u\) and \(g\equiv 1\). Then \(h'(u)=1/u-1\) vanishes at \(u=1\), and \(h''(u)=-1/u^{2}\) gives \(h''(1)=-1\), so the maximum is at \(c=1\) with \(h(1)=-1\). Substituting, \[\Gamma (x+1)\ \sim \ x^{x+1}e^{-x}\sqrt {\frac {2\pi }{x}} = \sqrt {2\pi x}\left (\frac {x}{e}\right )^{x}.\] □
Note 7.4.2. The accuracy is remarkable for so short an argument. At \(n=10\) the formula gives \(3\,598\,696\) against the true \(10! = 3\,628\,800\), an error of \(0.8\) percent; at \(n=100\) the relative error is under \(0.1\) percent. The error is approximately \(1/(12n)\), which is the first term of a fuller expansion \[\Gamma (x+1)\sim \sqrt {2\pi x}\left (\frac {x}{e}\right )^{x} \left (1+\frac {1}{12x}+\frac {1}{288x^{2}}-\cdots \right ),\] itself divergent, and itself asymptotic.
Remark 7.4.3. Stirling’s formula is where several threads of this course meet. The object is the gamma function of Chapter 2; the integral is improper at both ends in the sense of Chapter 1; the method is Laplace’s, which is the large-parameter counterpart of the transform of Chapter 6; and the Gaussian integral that finishes it is the one that defined the error function in Section 2.3. A result usually presented as a combinatorial curiosity is, seen this way, a straightforward consequence of the machinery already built.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.