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. 日常Java测试第一段 2021/11/12

    课堂测试一 package word_show;import java.io.BufferedReader;import java.io.FileNotFoundException;import ja ...

  2. Windows Server 2016域控制器升级到Windows Server 2022遇到的问题记录Fix error 0x800F081E – 0x20003

    1. 非域控服务器升级 将两台Web服务器和数据库服务器(Windows Server 2016, 2019)成功升级至到Windows Server 2022,非常顺利,一次成功. 直接在Windo ...

  3. 『学了就忘』Linux启动引导与修复 — 70、grub启动引导程序的配置文件说明

    目录 1.grub中分区的表示方法 2.grub的配置文件 3.grub的配置文件内容说明 (1)grub的整体设置 (2)CentOS系统的启动设置 1.grub中分区的表示方法 在说grub启动引 ...

  4. Output of C++ Program | Set 18

    Predict the output of following C++ programs. Question 1 1 #include <iostream> 2 using namespa ...

  5. 用户创建firefox配置文件

    1.打开cmd进放 firefox.exe所在的目录 如:D:\>cd D:\Mozilla Firefox 2.运行如命令:D:\Mozilla Firefox>firefox.exe ...

  6. 【Linux】【Services】【SaaS】Docker+kubernetes(10. 利用反向代理实现服务高可用)

    1. 简介 1.1. 由于K8S并没有自己的集群,所以需要借助其他软件来实现,公司的生产环境使用的是Nginx,想要支持TCP转发要额外安装模块,测试环境中我就使用HAPROXY了 1.2. 由于是做 ...

  7. webpack配置(vue)

    Vue-loader Vue-loader 是一个加载器,能把 .vue 文件转换为js模块. Vue Loader 的配置和其它的 loader 不太一样.除了将 vue-loader 应用到所有扩 ...

  8. [特征工程] encoding

    参考:An Overview of Encoding Techniques | Kaggle Method 1: Label encoding  给每个类别以一个数字label,作为分类.将类别映射到 ...

  9. Excel如何使用vlookup

    一.vlookup的语法 VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup]) ①Lookup_value为需要在数据表 ...

  10. 基于bootstrap的模态框使用

    使用步骤两步 1:按顺序引入以下三个文件 <link rel="stylesheet" href="../css/bootstrap.min.css"&g ...