TITLE: How can I prove $\pi=e^{3/2}\prod_{n=2}^{\infty}e\left(1-\frac{1}{n^2}\right)^{n^2}$?
QUESTION [44 upvotes]: I am interested about some infinite product representations of $\pi$ and $e$  like this.
Last week I found this formula on internet  

$$\pi=e^{3/2}\prod_{n=2}^{\infty}e\left(1-\frac{1}{n^2}\right)^{n^2}$$

which 
looks like unbelievable.
(I forgot the link but I am sure that this is the formula.)
How can I start to prove this formula?
Thank You.

REPLY [12 votes]: Taking logs and using the power series for $\log(1-x)$, we get
$$
\begin{align}
\frac32+\sum_{n=2}^\infty\left[1+n^2\log\left(1-\frac1{n^2}\right)\right]
&=\frac32-\sum_{n=2}^\infty\sum_{k=1}^\infty\frac1{(k+1)n^{2k}}\\
&=\frac32-\sum_{k=1}^\infty\frac{\zeta(2k)-1}{k+1}\tag{1}
\end{align}
$$
Transcribing $(5)$ from this answer:
$$
\begin{align}
&\sum_{n=1}^\infty\frac{\zeta(2n)-1}{n+1}\\
&=\sum_{n=1}^\infty\int_0^1(\zeta(2n)-1)\,2x^{2n+1}\,\mathrm{d}x\tag{2a}\\
&=\int_0^1\left(1-\pi x\cot(\pi x)-\frac{2x^2}{1-x^2}\right)\,x\,\mathrm{d}x\tag{2b}
\\
&=\int_0^1\left(3-\pi\cot(\pi x)-\frac2{1-x^2}\right)\,x\,\mathrm{d}x\tag{2c}\\
&=\frac32-\lim_{\lambda\to1^-}\int_0^\lambda\left(\pi\cot(\pi x)+\frac2{1-x^2}\right)\,x\,\mathrm{d}x\tag{2d}\\
&=\frac32-\lim_{\lambda\to1^-}\left[\vphantom{\sum}\lambda\log(\sin(\pi\lambda))-\log(1-\lambda^2)\right]+\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\tag{2e}\\
&=\frac32-\log(\pi)+\log(2)-\log(2)\tag{2f}\\
&=\frac32-\log(\pi)\tag{2g}
\end{align}
$$
Explanation:
$\text{(2a)}$: $\int_0^12x^{2n+1}\,\mathrm{d}x=\frac1{n+1}$
$\text{(2b)}$: use the generating function for $\zeta(2n)$ derived in this answer
$\text{(2c)}$: use that $1-\frac{2x^2}{1-x^2}=3-\frac2{1-x^2}$ and $(4)$
$\text{(2d)}$: write the integral as a limit
$\text{(2e)}$: integrate by parts
$\text{(2f)}$: use $\lim\limits_{\lambda\to1}\frac{\sin(\pi \lambda)}{1-\lambda}=\pi$ and $(6)$
$\text{(2g)}$: cancel $\log(2)$
Combining $(1)$ and $(2)$, we get
$$
\bbox[5px,border:2px solid #C0A000]{e^{3/2}\prod_{n=2}^\infty e\left(1-\frac1{n^2}\right)^{n^2}=\pi}\tag{3}
$$

Results Used in $\boldsymbol{(2)}$
The substitution $x\mapsto1-x$ shows that the following integral equals its negative. Therefore,
$$
\int_0^1\pi(1-x)\cot(\pi x)\,x\,\mathrm{d}x=0\tag{4}
$$
Substituting $x\mapsto2x$ yields
$$
\begin{align}
&\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\\
&=2\int_0^{1/2}\log(\sin(2\pi x))\,\mathrm{d}x\\
&=\log(2)+2\int_0^{1/2}\log(\sin(\pi x))\,\mathrm{d}x+2\int_0^{1/2}\log(\cos(\pi x))\,\mathrm{d}x\\
&=\log(2)+2\int_0^{1/2}\log(\sin(\pi x))\,\mathrm{d}x+2\int_{1/2}^1\log(\sin(\pi x))\,\mathrm{d}x\\
&=\log(2)+2\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\tag{5}
\end{align}
$$
Therefore,
$$
\int_0^1\log(\sin(\pi x))\,\mathrm{d}x=-\log(2)\tag{6}
$$