Evaluate $\lim_{n\to\infty} \prod_{k=1}^n \frac{2k}{2k-1}\int_{-1}^{\infty} \frac{{\left(\cos{x}\right)}^{2n}}{2^x} \; dx$

The identities $$ \frac{2\cdot4\cdot\ldots\cdot (2n)}{1\cdot3\cdot\ldots\cdot(2n-1)}=\frac{\Gamma(n+1)}{\Gamma(n+\tfrac12)}\sqrt{\pi} $$ and Wallis' formula $$ \int^{\frac{\pi}{2}}_0\cos^{2n}x\,dx=\int^{\frac{\pi}{2}}_0\sin^{2n}(x)\,dx=\frac{\Gamma(n+\tfrac12)}{\sqrt{\pi}\Gamma(n+1)}\frac{\pi}{2} $$ will be useful ( a simple derivation of the latter is in Thenard Rinmann's solution). The sequence in your problem can be expressed as $$ I_n:=\frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^\infty_{-1}2^{-x}\cos^{2n}x\,dx $$ To make estimates simpler, I only consider the sequence $$ J_n:=\frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^\infty_0 2^{-x}\cos^{2n}x\,dx$$ The integral $\int^\infty_0 2^{-x}\cos^{2n}x\,dx$ can be expressed as \begin{aligned} \int^\infty_0 2^{-x}\cos^{2n}x\,dx&=\sum^\infty_{k=0}\int^{(k+1)\pi}_{k\pi}2^{-x}\cos^{2n}x\,dx=\sum^\infty_{k=0}\int^\pi_02^{-(x+ k\pi)}\cos^{2n}(x+k\pi)\,dx \\&=\Big(\sum^\infty_{k=0}2^{-k\pi}\Big)\int^\pi_02^{-x}\cos^{2n}x\,dx=\frac{1}{1-2^{-\pi}}\int^\pi_02^{-x}\cos^{2n}xdx \end{aligned} Here we have used the fact that $\cos(x+k\pi)=(-1)^k\cos(x)$.

Claim I: $\frac{\Gamma(n+1)}{\Gamma(n+\tfrac12)}\sim\sqrt{n}$. This follows from Stirling's approximation: $$\frac{\Gamma(n+1)}{\Gamma(n+\tfrac12)}\sim \frac{n^{n+\tfrac12}e^{-n}}{(n-\tfrac12)^n e^{-(n-\tfrac12)}}$$

Claim II: (Suggested by Raoul below) $\int^{\pi/2}_02^{-x}\cos^{2n}x\,dx=\int^{\pi/2}_0\cos^{2n}x\,dx + o(n^{-1/2})$. To check this, we apply the mean value theorem to get \begin{aligned} \Big|\int^{\pi/2}_0(1-2^{-x})\cos^{2n}x\,dx\Big|\leq \log2\int^{\pi/2}_0x\cos^{2n}x\,dx \end{aligned} The fact that $\frac{\sin x}{x}$ decreases over $[0,\pi]$, implies that $\frac{2}{\pi}x-\sin x\leq0$ on $[0,\pi/2]$ and so, $\frac{x^2}{\pi}+\cos x\leq 1$. Consequently \begin{aligned} \int^{\pi/2}_0x\cos^{2n}x\,dx&\leq \int^{\pi/2}_0x\Big(1-\frac{x^2}{\pi}\Big)^{2n}\,dx\\ &=\frac{\pi}{2}\int^{\pi/4}_0(1-u)^{2n}\,du=\frac{\pi}{2(2n+1)}\Big(1-\big(1-\tfrac{\pi}{4}\big)^{2n+1}\Big) \end{aligned} This proves the claim.

A similar argument shows that \begin{aligned} \int^\pi_{\pi/2}2^{-x}\cos^{2n}x\,dx&=2^{-\pi}\int^0_{-\pi/2}2^{-x}\cos^{2n}(x+\pi)\,dx\\ &=2^{-\pi}\int^{\pi/2}_02^x\cos^{2n}x\,dx=2^{-\pi}\int^{\pi/2}_0\cos^{2n}x\,dx+o(n^{-1/2}) \end{aligned}

It follows that \begin{aligned} J_n&=\frac{1}{1-2^{-\pi}} \frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\frac12)}\Big((1+2^{-\pi})\int^{\pi/2}_0\cos^{2n}x\,dx+o(n^{-1/2})\Big)\\ &=\frac{2^\pi}{2^\pi-1}(1+2^{-\pi})\frac{\pi}{2}+o(1) \end{aligned}

The contribution of $\frac{\sqrt{\pi}\,\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^0_{-1}2^{-x}\cos^{2n}x\,dx$ can also be estimated as follows $$ \int^0_{-1}2^{-x}\cos^{2n}x\,dx=\int^1_02^x\cos^{2n}x\,dx=\int^{\tfrac{\pi}{2}}_02^x\cos^{2n}x\,dx-\int^{\frac{\pi}{2}}_12^{x}\cos^{2n}x\,dx$$ The second term is bounded by $$ \int^{\frac{\pi}{2}}_12^x\cos^{2n}x\,dx\leq (\cos 1)^{2n}\Big(\frac{\pi}{2}-1\Big)2^{\pi/2}=o(n^{-1/2}) $$ Consequently \begin{aligned} \frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^0_{-1}2^{-x}\cos^{2n}x\,dx&=\left(\frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^{\pi/2}_02^{x}\cos^{2n}x\,dx\right) +o(1)\\ &=\left(\frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\Big(\int^{\pi/2}_0\cos^{2n}x\,dx+o(n^{-1/2})\Big)\right) +o(1)\\ &=\frac{\pi}{2}+o(1) \end{aligned}

Putting things together gives $$ I_n=J_n+\frac{\sqrt{\pi}\Gamma(n+1)}{\Gamma(n+\tfrac12)}\int^0_{-1}2^{-x}\cos^{2n}x\,dx=\pi\frac{2^\pi}{2^\pi-1} +o(1) $$


Rewrote the proof

We first give the following auxiliary results (Facts 1 through 2). The proofs are given at the end.

Fact 1: It holds that $$\int_{-1}^\infty \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x = \frac{2^\pi}{2^\pi - 1}\int_{-1}^{\pi-1} \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x.$$

Fact 2: It holds that, for all $-1 \le x \le 1$ and $n \ge 2$, $$\mathrm{e}^{-x^2n} - \frac{1}{n} \le (\cos x)^{2n} \le \mathrm{e}^{-x^2n}.$$

Now, by Stirling formula $n! \sim \sqrt{2\pi n}\ n^n \mathrm{e}^{-n}$, we have $$\prod_{k=1}^n \frac{2k}{2k-1} = \frac{2^{2n}(n!)^2}{(2n)!} \sim \frac{2^{2n}(\sqrt{2\pi n}\ n^n \mathrm{e}^{-n})^2}{\sqrt{2\pi \cdot 2n}\ (2n)^{2n} \mathrm{e}^{-2n}}= \sqrt{\pi n}.$$ Then, by Facts 1-2, we have \begin{align} &\lim_{n\to \infty} \left(\prod_{k=1}^n \frac{2k}{2k-1}\cdot \int_{-1}^\infty \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\right)\\ =\ & \lim_{n\to \infty} \left(\sqrt{n\pi}\cdot \frac{2^\pi}{2^\pi - 1}\int_{-1}^{\pi-1} \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\right)\\ =\ & \pi\frac{2^\pi}{2^\pi-1} \cdot \lim_{n\to \infty} \left(\int_{-1}^1 \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x + \int_1^{\pi-1} \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x\right)\\ =\ & \pi\frac{2^\pi}{2^\pi-1} \cdot \lim_{n\to \infty} \int_{-1}^1 \frac{\mathrm{e}^{-x^2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x\\ =\ & \pi\frac{2^\pi}{2^\pi-1} \cdot \lim_{n\to \infty} \exp\left(\tfrac{(\ln 2)^2}{4n}\right) \int_{-\sqrt{\frac{n}{\pi}} + \frac{\ln 2}{2\sqrt{\pi n}}}^{\sqrt{\frac{n}{\pi}} + \frac{\ln 2}{2\sqrt{\pi n}}} \mathrm{e}^{-\pi z^2} \mathrm{d}z\\ =\ & \pi\frac{2^\pi}{2^\pi-1} \cdot \int_{-\infty}^\infty \mathrm{e}^{-\pi z^2} \mathrm{d}z\\ =\ & \pi\frac{2^\pi}{2^\pi-1} \end{align} where we have used $\lim_{n\to \infty} \int_1^{\pi-1} \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 0$ by noting that $|\cos x| \le \cos 1 < \frac{3}{5}$ for all $x$ in $[1, \pi - 1]$.

$\phantom{2}$

Proof of Fact 1: We have \begin{align} &\int_{-1}^\infty \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\\ =\ & \int_{-1}^0 \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x + \sum_{j=0}^\infty \int_{j\pi}^{(j+1)\pi} \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\\ =\ & \int_{-1}^0 \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x + \sum_{j=0}^\infty \frac{1}{2^{j\pi}}\int_0^\pi \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\\ =\ & \int_{-1}^0 \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x + \frac{2^\pi}{2^\pi - 1}\int_0^\pi \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x \\ =\ & \int_{-1}^0 + \frac{2^\pi}{2^\pi - 1} \left(\int_{-1}^{\pi-1} + \int_{\pi-1}^\pi - \int_{-1}^0\right) \\ =\ & \frac{2^\pi}{2^\pi - 1}\int_{-1}^{\pi-1} + \frac{2^\pi}{2^\pi - 1}\int_{\pi-1}^\pi -\frac{1}{2^\pi-1}\int_{-1}^0 \tag{1} \\ =\ & \frac{2^\pi}{2^\pi - 1}\int_{-1}^{\pi-1} + \frac{1}{2^\pi - 1}\int_{-1}^0 -\frac{1}{2^\pi-1}\int_{-1}^0 \tag{2} \\ =\ & \frac{2^\pi}{2^\pi - 1}\int_{-1}^{\pi-1} \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x. \end{align} In (1)(2) we have used $\int_{\pi-1}^\pi \frac{(\cos x)^{2n}}{2^x}\mathrm{d}x = \frac{1}{2^\pi} \int_{-1}^0 \frac{(\cos y)^{2n}}{2^y}\mathrm{d}y$ (by the substitution $x - \pi = y$). We are done.

Proof of Fact 2: The right inequality is equivalent to $$\ln \cos x \le - \frac{x^2}{2}.$$ The proof is easy and thus omitted.

For the left inequality, clearly, we only need to prove the case when $-\sqrt{\frac{\ln n}{n}} < x < \sqrt{\frac{\ln n}{n}}$. The left inequality is equivalent to $$\ln \left(\mathrm{e}^{-x^2n} - \frac{1}{n}\right) \le 2n\ln \cos x$$ or $$-x^2n + \ln \Big(1 - \frac{\mathrm{e}^{x^2n}}{n}\Big) \le 2n\ln \cos x.$$ Since $\ln (1 - \frac{\mathrm{e}^{x^2n}}{n}) \le - \frac{\mathrm{e}^{x^2n}}{n}$ and $\cos x \ge 1 - \frac{x^2}{2}$, it suffices to prove that $$-x^2n - \frac{\mathrm{e}^{x^2n}}{n} \le 2n\ln \left(1-\frac{x^2}{2}\right).$$ Let $$F(x) = 2n\ln \left(1-\frac{x^2}{2}\right) + x^2n + \frac{\mathrm{e}^{x^2n}}{n}.$$ We have $$F'(x) = \frac{2x}{2-x^2}\left(\mathrm{e}^{x^2n}(2-x^2) - x^2n\right).$$ Since $\mathrm{e}^{x^2n}(2-x^2) - x^2n \ge \mathrm{e}^{x^2n} - x^2n > 0$, we have $F'(x) > 0$ for $0 < x < \sqrt{\frac{\ln n}{n}}$, and $F'(x) < 0$ for $-\sqrt{\frac{\ln n}{n}} < x < 0$. Also, $F(0) > 0$. Thus, $F(x) \ge 0$ for $-\sqrt{\frac{\ln n}{n}} < x < \sqrt{\frac{\ln n}{n}}$. We are done.


I think it's simpler to evaluate the integral like this: $$\ $$ We know that by Wallis formula $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}(\cos x)^{2n}=I_n=\frac{2n-1}{2n}I_{n-1}$$ which on recursive application gives us $$I_n=I_0\prod_{k=1}^n\frac{2k-1}{2k}$$ which gives d$$I_n=\pi\prod_{k=1}^n\frac{2k-1}{2k} \space (\text{as}\space I_0=\pi)$$ and as $n\to\infty$ the value of $$\int_{-1}^{\infty}\frac{(\cos x)^{2n}}{2^x}\mathrm{d}x$$ will get concentrated near the values where $\cos x$ becomes $+1$ or $-1$ and that happens at $0,\pi,2\pi,...$ and the area near other parts of the graph will tend to zero . (I understand that this isn't the most rigorous way to put it, but I believe such ideas are based off the Dominated Convergence Theorem, which I am not very familiar with.) However, answers provided by Oliver Diaz and and River Li give a firm proof for this reasoning. Do look through them for thorough assurance of the idea. For $n=10^{9}$the graph is like this(from desmos)enter image description hereSo, we can write the integral as $$\sum_{k=0}^{\infty}\frac{I_n}{2^{k\pi}}$$ and the total value as $n\to \infty$ becomes equal to $$\prod_{k=1}^n\frac{2k}{2k-1}\int_{-1}^{\infty}\frac{(\cos x)^{2n}}{2^x}\mathrm{d}x\to \prod_{k=1}^n\frac{2k}{2k-1}\sum_{k=0}^{\infty}\frac{I_n}{2^{k\pi}}=\frac{\pi}{1-2^{-\pi}}=\frac{\pi2^{\pi}}{2^{\pi}-1} $$ and this is valid as long as the lower limit of the integral $$\int_{-1}^{\infty}\frac{(\cos x)^{2n}}{2^x}\mathrm{d}x$$ more than -$\pi$ and if it's less than $-\pi$ then the lower limit of the summation will become $k=-1$ instead of $k=0$