# 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$

Problem 9 in the JHMT 2013 Calculus Test asks to 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 answer is $$\pi\cdot 2^\pi /(2^{\pi}-1)$$. How can I show this? I know that the infinite product diverges and the limit cannot be moved into the integral, but I don't know what to do. Maybe I can represent the integral as a summation.

• The product is asymptotically $e^{-\sum_k \log (1-\frac{1}{2k}}) = (e^{H_n})^{\frac{1}{2}} \sim \sqrt{n}$ – Alex May 23 at 14:20
• @Alex I still don't understand how I can use that to solve the integral – Ty. May 23 at 16:35
• @EeyoreHo JHMT 2013 Problem #9 math.jhu.edu/~mathclub/problems/problems2013/Calculus.pdf – Ty. May 23 at 20:16
• Sometimes when I get too full of my self, I look at problems like this with a suggested $5$ minute time to complete it, and I return to normal. – Integrand May 23 at 21:12
• It may be that the integral runs from $-\pi$ and not from $-1$. In this case one could simplify a bit the expression by splitting the integral into subintervals, but I was not able to arrive yet to a solution. – Thomas May 23 at 21:42

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)$$

• You just need a better estimate of the term $$\int_0^{\pi/2} 2^{-x} \cos^{2n} x \: \mathrm{d} x.$$ For this, check that only the $\cos$ matters, so you just end up with a Wallis integral. More precisely, by mean value theorem, $$\left | \int_0^{\pi/2} 2^{-x} \cos^{2n} x \: \mathrm{d} x - \int_0^{\pi/2} \cos^{2n} x \: \mathrm{d} x \right | \leq C_1 \int_0^{\pi/2} x \cos^{2n} x \: \mathrm{d} x = o(1/\sqrt{n}).$$ To see this, cut the integral between $0$ and $n^{-2/3}$ and $n^{-2/3}$ to $\pi/2$. The first part is obvious, and for the second one: $\cos x \leq 1 - C_2 x^2$. – Raoul May 24 at 2:02
• @Raoul . By applying the m.v.t. on $f(x)=2^{-x}$ I get $(1-2^{-x})\le ( sup_{z \ in [0,x]}2^{-z}) x=x$. So that $1-2^{-x} \le x$ for $x>0$ which can also be proven by other means. Does this mean that $C_1=1$ ? Oliver Diaz, why do you have $C_1=log(2)$ ? I know the value of the constant is not important but just for clarification. – Thomas May 24 at 9:52
• By the way very nice solution putting together a lot of nice ideas. I had just spot the geometric sum than I was blocked :) – Thomas May 24 at 10:20
• @Thomas Yes, you are missing a $\ln 2$ in the derivative of $2^{-x}$ to apply the MVT. And much cleaner solution from Oliver to bound the error, nicely done. – Raoul May 24 at 14:27
• You are right I forgot the prefactor in deriving $2^{-x}$. Bad mistake from my side but thanks for clarifying. Again, nice solution :) – Thomas May 24 at 14:40

Update

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$$).

Also, we have $$\prod_{k=1}^n \frac{2k}{2k-1} = \frac{\Gamma(n+1)\sqrt{\pi}}{\Gamma(n+\frac{1}{2})} \sim \sqrt{n\pi}, \quad \mathrm{as}\quad n\to \infty.$$

Thus, 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} \int_{-1}^{\pi-1} \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x. \end{align}

To proceed, we need the following auxiliary results (Facts 1 through 3). The proofs are given at the end.

Fact 1: It holds that, for $$-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}.$$

Fact 2: It holds that $$\lim_{n\to \infty} \int_{-1}^1 \frac{\mathrm{e}^{-x^2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 1.$$

Fact 3: It holds that $$\lim_{n\to \infty} \int_{-1}^1 \frac{\mathrm{e}^{-x^2n} - \frac{1}{n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 1.$$

Now, let us proceed. From Facts 1-3, by the squeeze theorem, we have $$\lim_{n\to \infty} \int_{-1}^1 \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 1.$$ Also, clearly, we have (since $$|\cos x| \le \cos 1 < \frac{3}{5}$$ for $$1 \le x \le \pi - 1$$) $$\lim_{n\to \infty} \int_1^{\pi-1} \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 0.$$ Thus, we have $$\lim_{n\to \infty} \int_{-1}^{\pi-1} \frac{(\cos x)^{2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x = 1.$$

Finally, we have $$\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) = \pi\frac{2^\pi}{2^\pi-1}.$$ We are done.

$$\phantom{2}$$

Proof of Fact 1: 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.

$$\phantom{2}$$

Proof of Fact 2: We have \begin{align} &\lim_{n\to \infty} \int_{-1}^1 \frac{\mathrm{e}^{-x^2n}}{2^x} \sqrt{\frac{n}{\pi}}\, \mathrm{d}x \\ =\ & \lim_{n\to \infty} \int_{-\sqrt{\frac{n}{\pi}}}^{\sqrt{\frac{n}{\pi}}} \mathrm{e}^{-y^2\pi}2^{-y\sqrt{\frac{\pi}{n}}} \mathrm{d}y\\ =\ & \lim_{n\to \infty} \int_{-\sqrt{\frac{n}{\pi}}}^{\sqrt{\frac{n}{\pi}}} \exp\left(-\pi \left(y + \frac{\ln 2}{2\sqrt{\pi n}}\right)^2 + \frac{(\ln 2)^2}{4n}\right) \mathrm{d}y\\ =\ & \lim_{n\to \infty} \exp\left(\frac{(\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 \\ =\ & \int_{-\infty}^\infty \mathrm{e}^{-\pi z^2} \mathrm{d}z\\ =\ & 1. \end{align} We are done.

$$\phantom{2}$$

Proof of Fact 3: From Fact 2, the desired result follows. We are done.

• (+1) You might consider stating how you arrived at $(1)$. Also, you need to explain how $(2)$ is valid rigoroulsy. You are likely using $\cos(x)=1-\frac12 x^2+O(x^3)$, but not that this is valid for $x$ "near" $0$. – Mark Viola May 24 at 17:00
• @MarkViola Thanks. I will update it. – River Li May 25 at 0:40

I think it's simpler to evaluate the integral like this: $$\$$ We know that by Wallis formula $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}(cosx)^{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{(cosx)^{2n}}{2^x}dx$$ will get concentrated near the values where $$cosx$$ 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) So, 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{(cosx)^{2n}}{2^x}dx\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{(cosx)^{2n}}{2^x}dx$$ 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$$

• I didn't think of using Wallis formula, that was good. – Ty. May 26 at 14:50
• You intuitive idea is very good. However more careful analysis is required. Dominated convergence shows that $a_n=\int^0_{-1}2^{-x}\cos^{2n}x\,dx\xrightarrow{n\rightarrow\infty}0$. On the other hand the product $b_n=\prod^n_{k-1}\frac{2k-1}{2n}\sim\sqrt{n}\xrightarrow{n\rightarrow\infty}\infty$. That is why a careful analysis of the rate of convergence of the factor $a_n$ is needed to balanced the competing factor $b_n$ that is growing. – Oliver Diaz May 26 at 22:21

Firstly split it up into two parts: $$\prod_{k=1}^n\frac{2k}{2k-1}=\frac{2.4.6.8...2n}{1.3.5.7.(2n-1)}=\frac{2^nn!\times2^{n-1}(n-1)!}{(2n-1)!}=\frac{2^{2n-1}n!(n-1)!}{(2n-1)!}=\frac{2^{2n-1}(n!)^2}{n(2n-1)!}$$ now the integral: $$I_n=\int_{-1}^\infty\frac{(\cos x)^{2n}}{2^x}dx$$ $$I_n(a)=\int_{-1}^\infty e^{-ax}\cos^{2n}xdx$$ and we know that: $$\cos^{2n}x=\frac{(e^{ix}+e^{-x})^{2n}}{2^{2n}}$$ and: $$(e^{ix}+e^{-ix})^{2n}=\sum_{r=0}^{2n}{{2n}\choose{r}}e^{(2n-r)ix}e^{-rix}=\sum_{r=0}^{2n}{{2n}\choose{r}}e^{(2n-2r)ix}$$ so our integral becomes: $$I_n(a)=\int_{-1}^\infty\sum_{r=0}^{2n}{{2n}\choose{r}}e^{(2n-2r)ix-ax}dx=I_n(a)=\int_{-1}^\infty\sum_{r=0}^{2n}{{2n}\choose{r}}e^{(2i(n-r)-a)x}dx$$ assuming we can interchange the integral and summation and allowing $$-b=2i(n-r)-a$$ we get: $$I_n(a)=\sum_{r=0}^{2n}{{2n}\choose{r}}\int_{-1}^\infty e^{-bx}dx=\sum_{r=0}^{2n}{{2n}\choose{r}}\left[\frac{-e^{-bx}}{b}\right]_{-1}^\infty=\sum_{r=0}^{2n}{{2n}\choose{r}}\frac{e^b}{b}$$ $$I_n(a)=\sum_{r=0}^{2n}{{2n}\choose{r}}\frac{e^{a-2i(n-r)}}{a-2i(n-r)}$$ If we bring it all together we get: $$L=\lim_{n\to\infty}\frac{2^{2n-1}(n!)^2}{n(2n-1)!}\sum_{r=0}^{2n}{{2n}\choose{r}}\frac{e^{\ln(2)-2i(n-r)}}{\ln(2)-2i(n-r)}$$ and we know that: $${2n\choose r}=\frac{(2n)!}{r!(2n-r)!}=\frac{2^nn!}{r!(2n-r)!}$$ so: $$L=\lim_{n\to\infty}\frac{2^{3n}(n!)^3}{n(2n-1)!}\sum_{r=0}^{2n}\frac{e^{-2i(n-r)}}{\ln(2)-2i(n-r)}\times\frac{1}{r!(2n-r)!}$$

• I guess that atrocious limit converges to $\pi\cdot\frac{2^{\pi}}{2^{\pi}-1}$, but I feel like there is some easy approach that we're overlooking. This is a part of a calculus competition for high schoolers, and the answer was only accepted as $\pi\cdot\frac{2^{\pi}}{2^{\pi}-1}$. – Ty. May 23 at 18:06
• With respect, I don't feel this is a satisfactory answer. It is not at all obvious the final limit is what the OP claims it is. – Integrand May 23 at 21:04
• @OliverDiaz I rewrote the summation part in the question because I didn't think it was what OP was really trying to ask, but now I see I was a bit hasty on that. – Bladewood May 24 at 15:03