Processing math: 62%

A Proof of Stirling's Formula

A Proof of Stirling's Formula

Stirling's Formula

筆者在另一篇證明用常態分佈近似二項分佈的文章中,用到了這個Stirling's Formula,這裡證明一下。主要內容來自於page 552, section 11, chapter 11 in Boas's Mathematical Methods in The Physical Sciences 3rd edition. 黑色字體是課文,藍色字體是我的補充說明。

n!nnen2πn

Proof:

Start with p!=0xpexdx=0e(plnx)xdx.

Remark: I show that p!=0xpexdx by integral by parts.
xpex
\+
pxp1ex
\
p(p1)xp2ex
\+
p(p1)(p2)xp3ex
\
p(p1)(p2)2x±ex
\±
p!±ex
\±
0---±±ex
0xpexdx=lim where \lim_{x\to \infty}x^c e^{-x}=0 by L'Hospital Rule.

Substitute a new variable y such that x=p+y\sqrt{p}.

Then dx=\sqrt{p}dy

x=0 \text{ corresponds to }y=-\sqrt{p},

and (11.2) becomes p!=\int_{-\sqrt{p}}^{\infty}e^{p\ln{(p+y\sqrt{p})}-p-y\sqrt{p}}\sqrt{p}dy.\tag{11.3}

For large p, the logarithm can be expanded in the following power series: \ln{(p+y\sqrt{p})}=\ln{p}+\ln{\left(1+\frac{y}{\sqrt{p}}\right)}=\ln{p}+\frac{y}{\sqrt{p}}-\frac{y^2}{2p}+\cdots.\tag{11.4}

since \frac{1}{1-x}=1+x+x^2+\cdots and \ln{(1-x)}=-x-\frac{x^2}{2}-\frac{x^3}{3}-\cdots by integrating both sides and \ln{(1+x)}=x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots.

I don't know why we can omit the later terms in the following deduction.

Substituting (11.4) into (11.3), we get \begin{array}{rcl} p! &\sim& \int_{-\sqrt{p}}^{\infty} e^{(p\ln{p})+y\sqrt{p}-(y^2/2)-p-y\sqrt{p}}\sqrt{p}dy\\ &\stackrel{\text{cancel out }y\sqrt{p}}{=}& e^{(p\ln{p})-p}\sqrt{p}\int_{-\sqrt{p}}^{\infty}e^{-y^2/2}dy \\ &=& p^p e^{-p}\sqrt{p}\left[\int_{-\infty}^{\infty}e^{-y^2/2}dy-\int_{-\infty}^{-\sqrt{p}}e^{-y^2/2}dy\right]. \end{array}

The first integral is easily shown to be \sqrt{2\pi} (Problem 9.4). The second integral tends to zero as p\to \infty, and we have p!\sim p^{p} e^{-p} \sqrt{2\pi p}

which is (11.1).

No comments:

Post a Comment