Stirling's Formula

Keith Conrad. Stirling's Formula.

Stirling's Formula

\[\lim_{n \rightarrow \infty} \frac{n!}{(n^n/e^n)\sqrt{2\pi n}} =1. \]

Proof:

\[\begin{array}{ll} n! &= \int_{0}^\infty x^n e^{-x} \mathrm{d}x \\ &= \int_{-\sqrt{n}}^\infty (n+\sqrt{n}t)^n e^{-(n+\sqrt{n}t)} \sqrt{n} \mathrm{d}t \\ &= \frac{n^n \sqrt{n}}{e^n} \int_{-\sqrt{n}}^{\infty} (1+\frac{t}{\sqrt{n}})^n e^{-\sqrt{n}t} \mathrm{d}t. \\ &= \frac{n^n \sqrt{n}}{e^n} \int_{-\infty}^{\infty} f_n(t) \mathrm{d}t, \end{array} \]

其中

\[f_{n}(t) = \left \{ \begin{array}{ll} 0 & t< \sqrt{n} \\ (1+\frac{t}{\sqrt{n}})^n e^{-\sqrt{n}t} & t\ge \sqrt{n} \end{array} \right. \]

接下来证明\(f_n(t)\)趋于\(e^{-\frac{t^2}{2}}\),

\[\ln f_n(t) = n \ln (1+ \frac{t}{\sqrt{n}}) - \sqrt{n}t , t \ge \sqrt{n}, \]

\[\ln (1+x) = 0 + x - \frac{x^2}{2} + o(x^2), \]

\(n\)足够大的时候

\[\ln f_n(t) = \sqrt{n}t -t^2/2+\sqrt{n}t+o(t^2/n)=-\frac{t^2}{2}+o(t^2/n), \]

\(f_n(t) \rightarrow e^{-t^2/2}\).
观察(\(t \ge -\sqrt{n}\))

\[\begin{array}{ll} \frac{\mathrm{d}}{\mathrm{d}t}(\ln f_{n+1}(t) - \ln f_n(t) ) &= \frac{\sqrt{n}t}{\sqrt{n}+t} - \frac{\sqrt{n+1}t}{\sqrt{n+1}+t} \\ &= \frac{(\sqrt{n}-\sqrt{n+1})t^2}{(\sqrt{n}+t)(\sqrt{n+1}+t)} \le 0, \end{array} \]

\(f_n(0)=0\), 故

\[f_{n+1} /f_n \ge 1, \quad t \in [\sqrt{n},0), \]

\[f_{n+1} /f_n \le 1, \quad t \in [0, +\infty). \]

\(f_n(t)\)非负, 故根据单调收敛定理和优解控制定理可知

\[\lim_{n\rightarrow \infty} \int_{-\infty}^{+\infty} f_n(t) \mathrm{d}t = \int_{-\infty}^{+\infty} \lim_{n\rightarrow \infty} f_n(t) \mathrm{d}t = \int_{-\infty}^{+\infty}e^{-\frac{t^2}{2}}\mathrm{d} t=\sqrt{2 \pi}. \]

证毕.

posted @ 2020-10-15 12:10  馒头and花卷  阅读(134)  评论(0编辑  收藏  举报