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}.
\]

证毕.

Stirling's Formula的更多相关文章

  1. The Hundred Greatest Theorems

    The Hundred Greatest Theorems The millenium seemed to spur a lot of people to compile "Top 100& ...

  2. [Algorithm] Asymptotic Growth Rate

    f(n) 的形式 vs 判定形势 但,此题型过于简单,一般不出现在考题中. Extended: link Let's set n = 2^m, so m = log(n) T(n) = 2*T(n^( ...

  3. UNDERSTANDING THE GAUSSIAN DISTRIBUTION

    UNDERSTANDING THE GAUSSIAN DISTRIBUTION Randomness is so present in our reality that we are used to ...

  4. 【概率论】1-2:计数方法(Counting Methods)

    title: [概率论]1-2:计数方法(Counting Methods) categories: Mathematic Probability keywords: Counting Methods ...

  5. 一组关于{x}的积分

    \[\Large\displaystyle \int_{0}^{1}\left \{ \frac{1}{x} \right \}\mathrm{d}x~,~\int_{0}^{1}\left \{ \ ...

  6. redmine computed custom field formula tips

    项目中要用到Computed custom field插件,公式不知道怎么写,查了些资料,记录在这里. 1.http://apidock.com/ruby/Time/strftime 查看ruby的字 ...

  7. salesforce 零基础开发入门学习(十五)salesforce中formula的使用(不含Date/Time)

    本文参考官方的formula介绍PDF:https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_usefu ...

  8. Hibernate @Formula 注解方式

    1.Formula的作用 Formula的作用就是用一个查询语句动态的生成一个类的属性 就是一条select count(*)...构成的虚拟列,而不是存储在数据库里的一个字段.用比较标准的说法就是: ...

  9. Hibernate @Formula

    在使用Hibernate时经常会遇到实体类某个字段存的是code值而非我们最终想要的中文具体显示的值, 如果使用Hibernate的一对一关联这种,一个属性还好说,但是如果一个实体类里有多个字段都是需 ...

随机推荐

  1. Learning Spark中文版--第四章--使用键值对(2)

    Actions Available on Pair RDDs (键值对RDD可用的action)   和transformation(转换)一样,键值对RDD也可以使用基础RDD上的action(开工 ...

  2. Spark(十六)【SparkStreaming基本使用】

    目录 一. SparkStreaming简介 1. 相关术语 2. SparkStreaming概念 3. SparkStreaming架构 4. 背压机制 二. Dstream入门 1. WordC ...

  3. Sharding-JDBC 简介

    什么是Sharding-JDBC 1.是轻量级的 java 框架,是增强版的 JDBC 驱动2. Sharding-JDBC(1)主要目的是:简化对分库分表之后数据相关操作.不是帮我们做分库分表,而是 ...

  4. C++一元多项式求导

    这个题难度不大但是坑有点多,要考虑的点有几个: 1.测试用例为x 0 这个直接输出 0 0即可. 2.注意空格的输出 3.测试点3我好几次都没过,最后参考了别的答案加以修改才通过. 测试点3没过的代码 ...

  5. ClassLoad类加载器与双亲委派模型

    1. 类加载器 Class类描述的是整个类的信息,在Class类中提供的方法getName()是根据ClassPath配置的路径来进行类加载的.若类加载的路径为文件.网络等时则必须进行类加载这是就需要 ...

  6. list通过比较器进行排序

    Collections.sort(dataList,new Comparator<BaseTransitData>(){            public int compare(Bas ...

  7. linux环境下安装jdk,tomcat

    一.安装tomcat 1.使用docker安装(你得linux服务器上已经安装了docker) 1)执行命令: docker search tomcat; 2)选择第一个镜像进行下载,执行命令:doc ...

  8. MFC入门示例之单选框、复选框

    设置默认选中一个单选按钮,OnInitDialog()函数中添加: CheckRadioButton(IDC_RADIO1, IDC_RADIO2, IDC_RADIO2); 按钮事件处理 1 voi ...

  9. scanf("%c\n",&a)和scanf("%c",&a)区别

    scanf("%c",&a); 当输入字符的时候,我们按下任意字符 + 回车的时候,回车没有被当作为分隔符,而是作为一个转义字符与输入的字符一起保存在缓存区.第一次scan ...

  10. [源码解析] PyTorch 分布式(14) --使用 Distributed Autograd 和 Distributed Optimizer

    [源码解析] PyTorch 分布式(14) --使用 Distributed Autograd 和 Distributed Optimizer 目录 [源码解析] PyTorch 分布式(14) - ...