How to prove this $\pi$ formula? [duplicate]
I am hoping to find out where the formula $$\frac{\pi}{2}=\sum_{k=0}^{\infty}\frac{k!}{\left(2k+1\right)!!}$$ comes from. I can't see how one could begin to prove it.
Let us start with the geometric series:
$$\frac1{1-r}=\sum_{k=0}^\infty r^k$$
If we let $r=-x^2$ and integrate both sides from zero to one, we get the famous Leibniz formula for $\pi$.
$$\frac\pi4=\arctan(1)=\int_0^1\frac1{1+x^2}\ dx=\int_0^1\sum_{k=0}^\infty(-x^2)^k\ dx=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}$$
Applying an Euler Transform, we arrive at
$$\begin{align}\frac\pi4&=\sum_{n=0}^\infty\frac1{2^{1+n}}\sum_{k=0}^n\binom nk\frac{(-1)^k}{2k+1}\\\\&=\sum_{n=0}^\infty\text{simplifying the inner sum}\\\\&=\frac12\sum_{n=0}^\infty\frac{k!}{(2k+1)!!}\end{align}$$
The simplifying step comes by noting that
$$\sum_{k=0}^0\binom0k\frac{(-1)^k}{2k+1}=\frac11=2^0\frac{0!}{1!!}\color{green}\checkmark$$
$$\sum_{k=0}^1\binom1k\frac{(-1)^k}{2k+1}=\left(\frac11-\frac13\right)=2^1\frac{1!}{3!!}\color{green}\checkmark$$
$$\sum_{k=0}^2\binom2k\frac{(-1)^k}{2k+1}=\left(\frac11-\frac13\right)-\left(\frac13-\frac15\right)=2^2\frac{2!}{5!!}\color{green}\checkmark$$
$$\sum_{k=0}^3\binom3k\frac{(-1)^k}{2k+1}=\left[\left(\frac11-\frac13\right)-\left(\frac13-\frac15\right)\right]-\left[\left(\frac13-\frac15\right)-\left(\frac15-\frac17\right)\right]=2^3\frac{3!}{7!!}\color{green}\checkmark$$
You can prove by induction (and some observation) that the denominators are clearly odd double factorials, and with some work, you can derive the numerators.
$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
It's well known that $\ds{\pars{2k + 1}!! = {\pars{2k + 2}! \over 2^{k + 1}\pars{k + 1}!}}$ such that
\begin{align} \sum_{k = 0}^{\infty}{k! \over \pars{2k + 1}!!} & = \sum_{k = 0}^{\infty}{k!\pars{k + 1}! \over \pars{2k + 2}!}\,2^{k + 1} = \sum_{k = 0}^{\infty}{\Gamma\pars{k + 1}\Gamma\pars{k + 2} \over \Gamma\pars{2k + 3}}\,2^{k + 1} \\[5mm] & = \sum_{k = 0}^{\infty}2^{k + 1}\int_{0}^{1}x^{k}\pars{1 - x}^{k + 1}\,\dd x = 2\int_{0}^{1}\pars{1 - x}\sum_{k = 0}^{\infty}\bracks{2x\pars{1 - x}}^{\,k} \,\dd x \\[5mm] & = 2\int_{0}^{1}\pars{1 - x}{1 \over 1 - 2x\pars{1 - x}}\,\dd x = \int_{0}^{1}{1 - x \over x^{2} - x + 1/2}\,\dd x = \int_{-1/2}^{1/2}{1/2 - x \over x^{2} + 1/4}\,\dd x \\[5mm] & = 2\int_{0}^{1}{\dd x \over x^{2} + 1} = 2\arctan\pars{1} = 2\,{\pi \over 4} = \bbx{\ds{\pi \over 2}} \\ & \end{align}