分享

Stirling's Formula---斯特林(Stirling)公式

 tallergao 2011-03-03

Stirling's Formula

An important formula in applied mathematics as well as in probability is the Stirling's formula known as

 

\begin{displaymath}n! \sim \sqrt{2 \pi} \; n^{\displaystyle (n+ 1/2)} \;e^{\displaystyle-n} \end{displaymath}

 

where $\sim$ is used to indicate that the ratio of the two sides goes to 1 as n goes to $\infty$. In other words, we have

 

\begin{displaymath}\lim_{n \rightarrow \infty} \frac{n!}{\sqrt{2 \pi} \; n^{\displaystyle (n+ 1/2)}e^{\displaystyle-n}} = 1\end{displaymath}

 

or

 

\begin{displaymath}\lim_{n \rightarrow \infty} \frac{n!}{ n^{\displaystyle (n+ 1/2)}e^{\displaystyle-n}} = \sqrt{2 \pi}\;.\end{displaymath}

 

Proof of the Stirling's Formula

First take the log of n! to get

 

\begin{displaymath}\log(n!) = \log (1) + \log(2) + \cdots + \log(n)\;.\end{displaymath}

 

Since the log function is increasing on the interval $(0,\infty)$, we get

 

\begin{displaymath}\int_{n-1}^{n} \log(x) dx <\log(n) <\int_{n}^{n+1} \log(x) dx\end{displaymath}

 

for $n \geq 1$. Add the above inequalities, with $n=1,2,\cdots,N$, we get

 

\begin{displaymath}\int_{0}^{N} \log(x) dx <\log(n!) <\int_{1}^{n+1} \log(x) dx\end{displaymath}

 

Though the first integral is improper, it is easy to show that in fact it is convergent. Using the antiderivative of $\log(x)$ (being $x \log(x) -x$), we get

 

\begin{displaymath}n\log(n) - n <\log(n!) <(n+1)\log(n+1) - n\;.\end{displaymath}

 

Next, set

 

\begin{displaymath}d_n = \log(n!) - \left(n + \frac{1}{2}\right) \log(n) + n\;.\end{displaymath}

 

We have

 

\begin{displaymath}d_n - d_{n+1} = \left(n + \frac{1}{2}\right) \log\left(\frac{n+1}{n}\right) - 1\;.\end{displaymath}

 

Easy algebraic manipulation gives

 

\begin{displaymath}\frac{n+1}{n} = \frac{1 + \displaystyle \frac{1}{2n+1}}{1 - \displaystyle \frac{1}{2n+1}}\;.\end{displaymath}

 

Using the Taylor expansion

 

\begin{displaymath}\frac{1}{2} \log\left(\frac{1+t}{1-t}\right) = t + \frac{1}{3} t^3 + \frac{1}{5} t^5 + \cdots\end{displaymath}

 

for -1 < t < 1, we get

 

\begin{displaymath}d_n - d_{n+1} = \frac{1}{3} \frac{1}{(2n+1)^2} + \frac{1}{5} \frac{1}{(2n+1)^4} + \cdots\end{displaymath}

 

This implies

 

\begin{displaymath}0 <d_n - d_{n+1} <\frac{1}{3} \Bigg(\frac{1}{(2n+1)^2} + \frac{1}{(2n+1)^4} + \cdots\Bigg)\end{displaymath}

 

We recognize a geometric series. Therefore we have

 

\begin{displaymath}0 <d_n - d_{n+1} <\frac{1}{3} \frac{1}{(2n+1)^2 - 1} = \frac{1}{12} \left(\frac{1}{n} - \frac{1}{n+1}\right)\;.\end{displaymath}

 

From this we get
1.
the sequence $\{d_n\}$ is decreasing;
2.
the sequence $\left\{d_n - \displaystyle \frac{1}{12n}\right\}$ is increasing.
This will imply that $\{d_n\}$ converges to a number C with

 

\begin{displaymath}\lim_{n \rightarrow \infty} d_n = \lim_{n \rightarrow \infty} d_n - \displaystyle \frac{1}{12n} = C \end{displaymath}

 

and that C > d1 - 1/12 = 1 - 1/12 = 11/12. Taking the exponential of dn, we get

 

\begin{displaymath}\lim_{n \rightarrow \infty}\frac{n!}{ n^{\displaystyle (n+ 1/2)}e^{\displaystyle-n}} = e^{C}\;.\end{displaymath}

 

The final step in the proof if to show that $e^C = \sqrt{2\pi}$. This will be done via Wallis formula (and Wallis integrals). Indeed, recall the limit

 

\begin{displaymath}\lim_{n \rightarrow \infty} \frac{2.2.4.4.6.6\ldots(2n)(2n)}{1.1.3.3.5.5.\ldots(2n-1)(2n-1)(2n+1)}\;= \frac{\pi}{2}\;.\end{displaymath}

 

Rewriting this formula, we get

 

\begin{displaymath}\frac{2.4.6\ldots(2n)}{1.3.5.\ldots(2n-1) \sqrt{2n}} \sim \sqrt{\frac{\pi}{2}}\end{displaymath}

 

Playing with the numbers, we get

 

\begin{displaymath}\frac{(2^n n!)^2}{(2n)!} \frac{1}{\sqrt{2n}} \sim \sqrt{\frac{\pi}{2}}\end{displaymath}

 

Using the above formula

 

\begin{displaymath}n! \sim n^{\displaystyle (n+ 1/2)}e^{\displaystyle-n} e^{C}\;.\end{displaymath}

 

we get

 

\begin{displaymath}\frac{2^{2n} \Big(n^{2n+1} e^{-2n} e^{2C}\Big)}{(2n)^{(2n+1/2)} e^{-2n} e^C}\frac{1}{\sqrt{2n}} \sim \sqrt{\frac{\pi}{2}}\end{displaymath}

 

Easy algebra gives

 

\begin{displaymath}e^C \sim \sqrt{2\pi}\end{displaymath}

 

since we are dealing with constants, we get in fact $e^C = \sqrt{2\pi}$. This completes the proof of the Stirling's formula.

[Trigonometry] [Calculus]
[Geometry] [Algebra] [Differential Equations]
[Complex Variables] [Matrix Algebra]

S.O.S MATHematics home page

    Do you need more help? Please post your question on our S.O.S. Mathematics CyberBoard.

    Mohamed A. Khamsi
    Tue Dec 3 17:39:00 MST 1996

      本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
      转藏 分享 献花(0

      0条评论

      发表

      请遵守用户 评论公约

      类似文章 更多