How to prove $ \prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{(-1)^{n+1}n} \,= \frac{\pi}{2e}$
This answer is spliced from the paper linked in comments
Melzak (1961) shows that the largest-volume cylinder (Cartesian product of a hypersphere and a line) in an $n$-dimensional unit sphere occupies this proportion of the sphere: $$\rho_n=\frac{2(n\pi)^{-1/2}(1-1/n)^{(n-1)/2}\Gamma(n/2+1)}{\Gamma((n+1)/2)}$$ We have $\rho_2=\frac2\pi$ and $\lim_{n\to\infty}\rho_n=\sqrt{\frac2{\pi e}}$. Now define $$\sigma_n=\frac{\rho_{n+2}}{\rho_n}=\sqrt{\left(\frac n{n+2}\right)^n\left(\frac{n+1}{n-1}\right)^{n-1}}$$ Telescoping on $\sigma_n$ for $n=2,4,6\dots$ then gives $$\sqrt{\frac\pi{2e}}=\prod_{n=1}^\infty\left(\frac n{n+1}\right)^n\left(\frac{2n+1}{2n-1}\right)^{(2n-1)/2}$$ Squaring gives $$\frac\pi{2e}=\prod_{n=1}^\infty\left(\frac {2n}{2n+2}\right)^{2n}\left(\frac{2n+1}{2n-1}\right)^{2n-1}=\prod_{n=1}^\infty(1+2/n)^{(-1)^{n+1}n}$$
This infinite product could be computed (more or less) directly.
At first, let's compute infinite sum instead of infinite product: $$P=\prod_{n=1}^\infty \left(1+\frac2n\right)^{(-1)^{n+1}\,\,n}$$ $$S = \ln P = \sum_{n=1}^\infty (-1)^{n+1}n \ln\left(1+\frac2n\right) = \sum_{n=1}^\infty (-1)^{n+1}a_n$$ At first we need some regularization: $$a_n=2-\frac2n+\frac{8}{3n^2}+\mathcal O(\frac{1}{n^3}) \nrightarrow 0$$ Nevertheless we could only consider partial sums of the $S$ with odd (or even) $n$; in other words, we'll assume that $\sum_{n=1}^\infty (-1)^{n+1} = 0$. (I know, I know, this is a not rigorous, but let me advance).
Ok, let's convert $a_n$ to power series: $$a_n = \sum_{k=0}^\infty (-1)^k\frac{2^{k+1}}{k+1}\frac{1}{n^k}=2+\sum_{k=1}^\infty (-1)^k\frac{2^{k+1}}{k+1}\frac{1}{n^k},$$ so we need to compute $$S = \sum_{n=1}^\infty (-1)^{n+1}\sum_{k=1}^\infty (-1)^k\frac{2^{k+1}}{k+1}\frac{1}{n^k}$$ (look, we «cancel» 2 in $a_n$'s expansion). Let's change summation order: $$S = \sum_{k=1}^\infty (-1)^k\frac{2^{k+1}}{k+1} \left(\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n^k}\right).$$ Series in the parentheses is alternating zeta-function: $$\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n^k} = \left(1-\frac{1}{2^{k-1}}\right)\zeta(k),$$ where $\zeta(k)$ is the Riemann zeta function ($k>1$). At $k=1$ we have $$\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n}=\ln2.$$
So, $$S = -2\ln2 + \sum_{k=2}^\infty (-1)^k\frac{2^{k+1}}{k+1}\left(1-\frac{1}{2^{k-1}}\right)\zeta(k)\\=-2\ln2+\sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{k+1}\zeta(k).$$ This series seems hopeless, but zeta function involves in many other series. We'll use this: $$\Gamma(s)\zeta(s)=\int\limits_0^\infty \!\frac{x^{s-1}}{e^x-1}dx.$$
Hence $$S + 2\ln2 = \sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{k+1}\frac{1}{\Gamma(k)}\int\limits_0^\infty \!\frac{x^{k-1}}{e^x-1}dx \\= \sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{k+1}\frac{1}{(k-1)!}\int\limits_0^\infty \!\frac{x^{k-1}}{e^x-1}dx,$$ or $$T = S + 2\ln2 = \int\limits_0^\infty \!\frac{dx}{e^x-1} \sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{k+1}\frac{x^{k-1}}{(k-1)!}$$
The last series could be computed by standard methods via series for exponent and differentiation w.r.t. $x$: $$\sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{k+1}\frac{x^{k-1}}{(k-1)!} = \sum_{k=2}^\infty 4(-1)^k\frac{2^{k-1}-1}{(k+1)!}kx^{k-1}\\= \frac{3}{x^2}+\frac{1}{x^2}e^{-2x}+\frac{2}{x}e^{-2x}-\frac{4}{x^2}e^{-x}-\frac{4}{x}e^{-x}$$
Let's collect all these pieces together: $$T = \int\limits_0^\infty \frac{e^{-2x}dx}{x^2(e^x-1)}(3e^{2x}-4(1+x)e^x+2x+1).$$ We have here terms with powers of $\mathrm{exp}$ and $x$. For me simplest and straightforward method for calculation of this integral is expansion of denominator: $$\frac{1}{e^x-1}=\frac{e^{-x}}{1-e^{-x}}=e^{-x}\sum_{m=0}^\infty e^{-mx} = \sum_{m=1}^\infty e^{-mx}.$$ So we have $$T = \int\limits_0^\infty dx\frac{3e^{2x}-4(1+x)e^x+2x+1}{x^2} e^{-2x}\sum_{m=1}^\infty e^{-mx},$$ or $$T = \int\limits_0^\infty dx\frac{3e^{2x}-4(1+x)e^x+2x+1}{x^2} \sum_{m=3}^\infty e^{-mx}.$$ Let's change summation and integration: $$T = \sum_{m=3}^\infty \int\limits_0^\infty dx\frac{3e^{2x}-4(1+x)e^x+2x+1}{x^2} e^{-mx}.$$
Now we need to compute $$I_m = \int\limits_0^\infty dx\frac{3e^{2x}-4(1+x)e^x+2x+1}{x^2} e^{-mx}.$$ Maple says $$I_m = m\ln(m) - 4m\ln(m - 1) + 3m\ln(m - 2) - 2\ln(m) + 8\ln(m - 1) - 6\ln(m - 2) + 2.$$ We could believe in it or could to get it:) At first, $$\frac{3e^{2x}-4(1+x)e^x+2x+1}{x^2} = \sum_{k=0}^\infty \frac{12\cdot 2^k-4k-12}{(k+2)!} x^k,$$ and $$\int\limits_0^\infty \frac{12\cdot 2^k-4k-12}{(k+2)!} x^k e^{-mx} dx = \frac{12\cdot 2^k-4k-12}{(k+1)(k+2)} \frac{1}{m^{k+1}}$$ (we used Euler's formula for $\Gamma(x)$). So, $$I_m = \sum_{k=1}^\infty \frac{12\cdot 2^k-4k-12}{(k+1)(k+2)} \frac{1}{m^{k+1}}$$ (term at $k=0$ vanishes). Now we can diff. w.r.t. $m$: $$\frac{d^2 I_m}{dm^2}= \sum_{k=1}^\infty (12\cdot 2^k-4k-12) \frac{1}{m^{k+3}} = \frac{1}{m^3} \sum_{k=1}^\infty \frac{12\cdot 2^k}{m^k}-\frac{4k}{m^k}-\frac{12}{m^k}, $$ or $$\frac{d^2 I_m}{dm^2}= \frac{1}{m^3} \left(\frac{24}{m - 2} - \frac{4m}{(m - 1)^2} - \frac{12}{m - 1}\right)$$ (while $m>2$). Integrate twice and we have indeed $$I_m = (3m - 6)\ln(m - 2) + (-4m + 8)\ln(m - 1) + 2 + (m - 2)\ln(m)\\= m\ln(m) - 4m\ln(m - 1) + 3m\ln(m - 2) - 2\ln(m) + 8\ln(m - 1) - 6\ln(m - 2) + 2.$$ We start summation from $m=3$; let $m=2+p$: $$I_{p+2} = p\ln(2 + p) - 4p\ln(1 + p) + 3p\ln(p) + 2$$
Now we have $$T = \sum_{p=1}^\infty p\ln(2 + p) - 4p\ln(1 + p) + 3p\ln(p) + 2 = \sum_{p=1}^\infty t_p.$$ We could find approximation for this sum by some methods, but I prefer more detailed calculation. At first, let's rearrange $t_p$: $$t_p = [(p + 2)\ln(p + 2) - 4(p + 1)\ln(p + 1) + 3p\ln(p)] \\ +[2-2\ln(p + 2) + 4\ln(p + 1) ].$$ First sum could be found by kind of telescoping summation: $$T^1_N = \sum_{p=1}^N (p + 2)\ln(p + 2) - 4(p + 1)\ln(p + 1) + 3p\ln(p) \\= -3(N + 1)\ln(N + 1) + (N + 2)\ln(N + 2) - 2\ln(2)$$ (put $f(x)=x\ln x$ and look at partial sums). Analogously for second term we have $$T^2_N = \sum_{p=1}^N 2-2\ln(p + 2) + 4\ln(p + 1) \\= 2\sum_{p=1}^N \ln p + 2\ln(N + 1) - 2\ln(N + 2) + 2\ln(2) + 2N$$
Finally we have $$T_N = 2\sum_{p=1}^N \ln p - (3N + 1)\ln(N + 1) + N\ln(N + 2) + 2N.$$ Asymptotic expansion for the first series is well-known and could be found from Euler—Maclaurin: $$\sum_{p=1}^N \ln p = N(\ln(N) - 1) + \frac12\ln(2\pi) + \frac12\ln(N) + \frac{1}{12N}+\mathcal O \left(\frac{1}{N^2}\right),$$ and finally (really finally :) $$T_N = \ln(2\pi)-1 - \frac{4}{3N}+\mathcal O \left(\frac{1}{N^2}\right).$$
So, $$T = \ln(2\pi)-1,$$ $$S = T - 2\ln2 = \ln\frac{\pi}{2}-1 = \ln\frac{\pi}{2e},$$ and $$P = \frac{\pi}{2e}.$$
The stated product does not converge and therefor the answer is incorrect.
It's only valid if the final value is even.
$$\prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{\large{(-1)^{n+1}n}} \neq \frac{\pi}{2e}$$
Most likely you ment:
$$\prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{\large{(-1)^{n+1}n}} e^{2(-1)^n} = \frac{\pi}{2e}$$
For the proof of even value's or the product above: Consider: $$\prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{\large{(-1)^{n+1}n}} e^{2(-1)^n} = $$
$$\exp\bigg(\sum_{n=1}^{\infty}(-1)^{n+1} \big(n \ln(1+2/n)-2\big)\bigg)$$ We know the factorial (e.g. stirlings formula, but people don't seem to write it this way, derived by writing it as sums, alternatively you can use divergent products, see: Divergent products.)
$$n!=\bigg(\frac{n}{e}\bigg)^{n}\big(\sqrt{2 n\pi}\big) \exp\bigg(-\sum_{j=1}^{\infty}\frac{\zeta(-j)}{j(n)^{j}}\bigg) $$
$$\exp\bigg(\sum_{n=1}^{\infty}(-1)^{n+1} 2\ln\bigg(\frac{(1+2/n)^{n/2})}{e}\bigg)=$$
$$\exp\bigg(2\sum_{n=1}^{\infty} \ln\bigg(\frac{(1+1/n)^{n+1/2-1/2})}{e}\bigg)-\ln\bigg(\frac{(1+1/(n-1/2))^{n-1/2})}{e}\bigg)=$$
$$\exp\bigg(2\sum_{n=1}^{\infty} \ln\bigg(\frac{(1+1/n)^{n+1/2})}{e}\bigg)-\ln\bigg(\frac{(1+1/(n-1/2))^{n})}{e}\bigg)+\frac{-1}{2}\ln\bigg((1+1/n))\bigg)+\frac{-1}{2}\ln\bigg(1+1/(n-1/2)\bigg)=$$
$$\exp\bigg(2\sum_{n=1}^{\infty} \bigg(\sum_{j=1}^\infty \frac{\zeta(-j)}{j(n+1)^j}-\frac{\zeta(-j)}{j(n)^j}\bigg)-\bigg(\sum_{j=1}^\infty \frac{\zeta(-j)}{j(n+1/2)^j}-\frac{\zeta(-j)}{j(n-1/2)^j}\bigg)+\frac{-1}{2}\ln\bigg((1+1/n))\bigg)+\frac{-1}{2}\ln\bigg(1+1/(n-1/2)\bigg)=$$
if $\Delta_n^+=f(n)-f(n+1)$ and if f(n)= 0 as n goes to infty.
$$\exp\bigg(2\sum_{n=1}^{\infty} \sum_{j=1}^\infty \Delta_n^+\frac{\zeta(-j)}{j(n)^j}-\Delta_n^+\sum_{j=1}^\infty \frac{\zeta(-j)}{j(n-1/2)^j}- \Delta_n^+\frac{1}{2}\ln\big(\frac{n-1/2}{n}\big)\bigg)=$$
$$\exp 2 \bigg(\sum_{j=1}^\infty \frac{\zeta(-j)}{j}-\sum_{j=1}^\infty \frac{\zeta(-j)}{j(1/2)^j}+\frac{\ln(2)}{2}\bigg)=$$ $$\exp 2 \bigg(\ln\big(\frac{\sqrt{2\pi}}{e}\big)-\ln(\frac{\sqrt{e}}{2\sqrt{2}})+\frac{\ln(2)}{2}\bigg)=$$
$$\frac{2\pi}{e^2}\frac{e}{8} 2=\frac{\pi}{2e}$$