# How to use Stirling's approximation for $(2n)!$ to get the simplified version of the formula?

In some notes I have the following formula:
$y_n = \frac{2^{-2n}(2n)!}{n!n!}$

Then it simplifies that to be $y_n = \frac{2^{-2n}e^{-2n}2^{2n}\sqrt{4\pi n}}{e^{-2n}2^{2n}2\pi n} = \frac{1}{\sqrt{\pi n}}$

So it applies what I was told here is the stirling approximation to the factorial i.e.
$n! \approx e^{-n}*n^n*\sqrt{2\pi n}$

But I am not sure how to fully apply it to get the end result. I mean how do we handle $(2n)!$ in this formula to simlify it as mentioned above?

• it cannot simplify to $\frac1{\sqrt{\pi n}}$ because this number is irrational, however $\frac{(2n)!}{2^{2n}(n!)^2}$ is rational – Masacroso Jul 23 '17 at 8:15
• Indeed you seem to be confusing equivalents with identities. – Did Oct 29 '17 at 13:23
• @Did:What is the difference? – Jim Oct 29 '17 at 21:45
• For example, $y_n$ in your question is equivalent to $1/\sqrt{\pi n}$ when $n\to\infty$ but no $y_n$ is equal to $1/\sqrt{\pi n}$. Oh wait... wasn't this point already raised by @Masacroso three months ago? Do you read the comments posted on your questions? – Did Oct 29 '17 at 22:11

Stirling's approximation: $$n! \sim \sqrt{2\pi n}\frac{n^n}{e^n}.$$ Thus $$(2n)! \sim \sqrt{4\pi n}\frac{(2n)^{2n}}{e^{2n}}=\sqrt{4\pi n}\frac{2^{2n}n^{2n}}{e^{2n}}$$ and $$\frac{1}{n! n!} \sim \Big(\frac{1}{\sqrt{2 \pi n}}\frac{e^n}{n^n}\Big)^2=\frac{e^{2n}}{2\pi n\cdot n^{2n}}.$$ Therefore $$y_n=\frac{(2n)!}{2^{2n} n! n!}\sim\frac{1}{2^{2n}}\sqrt{4\pi n}\frac{2^{2n}n^{2n}}{e^{2n}}\frac{e^{2n}}{2\pi n\cdot n^{2n}}=\frac{\sqrt{4\pi n}}{2 \pi n}=\frac{1}{\sqrt{\pi n}}.$$

• So the second line is where I am confused. Is $(2n)!=2(n!)$? – Jim Jul 23 '17 at 8:23
• No. $(2n)! \neq 2(n!).$ To use the aproximation of $n!$ to $(2n)!,$ you have to replace every $n$ in the formula to $2n.$ For example $n^n$ is replaced with $(2n)^{2n}.$ – positrón0802 Jul 23 '17 at 8:24

\begin{align} y_n = \frac{2^{-2n}(2n)!}{n!n!} &\approx \frac{2^{-2n} e^{-2n} (2n)^{2n} \sqrt{2\pi (2n)}}{(e^{-n}n^n\sqrt{2\pi n})^2} = \frac{2^{-2n}e^{-2n} n^{2n} 2^{2n+1}\sqrt{\pi n}}{e^{-2n}n^{2n}2\pi n}\\ &= \frac{1}{\sqrt{\pi n}} \end{align}

• I am not clear how the $(2n)!$ is handled to go to the second fraction – Jim Jul 23 '17 at 8:24
• @Jim If $n!\approx e^{-n}n^n \sqrt{2\pi n}$ then $(2n)!\approx e^{-2n}(2n)^{2n} \sqrt{2\pi(2n)}$. If you still aren't convinced then let $m=2n$ and consider $m!$. – adfriedman Jul 23 '17 at 8:27

Stirling's approximation is: $$n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}$$ For $2n$ this is simply: $$(2n)!\sim {\sqrt {4\pi n}}\left({\frac {2n}{e}}\right)^{2n}$$ So: $$y_n = \frac{2^{-2n}(2n)!}{n!n!}\sim2^{-2n}\frac{\sqrt{4\pi n}(2n)^{2n}}{\sqrt{4\pi^2 n^2}n^{2n}}=\frac{1}{\sqrt{\pi n}}$$

The easy way is to go first to logarithms $$y_n = \frac{2^{-2n}(2n)!}{(n!)^2}\implies \log(y_n)=-2n \log(2)+\log((2n)!)-2\log(n!)$$ and now use Stirling approximation $$\log(p!)=p (\log (p)-1)+\frac{1}{2} \left(\log (2 \pi )+\log \left({p}\right)\right)+\frac{1}{12 p}+O\left(\frac{1}{p^3}\right)$$ Apply it to get $$\log(y_n)=-\frac{1}{2} \left(\log \left({n}\right)+\log (\pi )\right)-\frac{1}{8 n}+O\left(\frac{1}{n^3}\right)$$ $$y_n\approx\frac 1{\sqrt{n \pi}}e^{-\frac 1 {8n}}$$ and, for large $n$ the exponential term is almost $1$.

But using it makes the formule quite good even for small values of $n$ as shown in the table $$\left( \begin{array}{ccccc} n & f_n & f_n & \frac 1{\sqrt{n \pi}} &\frac 1{\sqrt{n \pi}}e^{-\frac 1 {8n}}\\ 1 & \frac{1}{2} & 0.5 & 0.56419 & 0.497896 \\ 2 & \frac{3}{8} & 0.375 & 0.398942 & 0.374772 \\ 3 & \frac{5}{16} & 0.3125 & 0.325735 & 0.312442 \\ 4 & \frac{35}{128} & 0.273438 & 0.282095 & 0.273416 \\ 5 & \frac{63}{256} & 0.246094 & 0.252313 & 0.246084 \\ 6 & \frac{231}{1024} & 0.225586 & 0.230329 & 0.225581 \\ 7 & \frac{429}{2048} & 0.209473 & 0.213244 & 0.209469 \\ 8 & \frac{6435}{32768} & 0.196381 & 0.199471 & 0.196379 \\ 9 & \frac{12155}{65536} & 0.185471 & 0.188063 & 0.185469 \\ 10 & \frac{46189}{262144} & 0.176197 & 0.178412 & 0.176196 \end{array} \right)$$

• Sorry but logarithms do not make this easier. – Did Oct 29 '17 at 13:23