Computing a tricky limit $\lim_{n\to\infty} \sqrt{n}\int_0^{\infty} \cos^{2n-1}(x) e^{- \pi x} \ dx$

Solution 1:

Since $$\int_{0}^{+\infty}\cos(n x)\,e^{-\pi x}\,dx = \frac{\pi}{n^2+\pi^2}$$ it is sufficient to compute the Fourier cosine series of $\cos^{2n-1}x.$ We have: $$\cos^{2n-1}x = \frac{2}{4^n}(e^{ix}+e^{-ix})^{2n-1} = \frac{1}{4^{n-1}}\sum_{k=0}^{n-1}\binom{2n-1}{k}\cos((2n-2k-1)x)$$ hence: $$\int_{0}^{+\infty}\cos^{2n-1}(x)\,e^{-\pi x}=\frac{1}{4^{n-1}}\sum_{k=1}^{n}\binom{2n-1}{n-k}\frac{\pi}{(2k-1)^2+\pi^2}.$$ Since for any fixed $k\geq 1$ we have: $$ \lim_{n\to +\infty}\frac{\sqrt{n}}{4^{n-1}}\binom{2n-1}{n-k}=\frac{2}{\sqrt{\pi}}$$ the value of the limit equals: $$ L = 2\sqrt{\pi}\sum_{k=1}^{+\infty}\frac{1}{\pi^2+(2k-1)^2} = \frac{\sqrt{\pi}}{2}\tanh\frac{\pi^2}{2},$$ where the last identity follows from considering the logarithmic derivatives of the Weierstrass product for the $\cosh$ function.

Notice that this problem in disguise already appeared here.

Solution 2:

Sum of Dirac Deltas

As a distribution, $$ \lim_{n\to\infty}\sqrt{n}\cos^{2n-1}(x)=\sqrt\pi\sum_{k\in\mathbb{Z}}(-1)^k\,\delta(x-k\pi)\tag{1} $$ where $\delta(x)$ is the Dirac-delta distribution.

Limit $(1)$ follows because $\cos(x)$ is $2\pi$-periodic and on any compact $K\subset[-\pi/2,3\pi/2]\setminus\{0,\pi\}$, the sequence of functions $\sqrt{n}\cos^{2n-1}(x)$ tends to $0$ monotonically for $n\ge\frac12\sup\limits_{x\in K}\cot^2(x)$. Yet, on $[-\pi/2,\pi/2]$, $\sqrt{n}\cos^{2n-1}(x)\ge0$ and using the substitution $x\mapsto x/\sqrt{n}$ $$ \begin{align} \lim_{n\to\infty}\sqrt{n}\int_{-\pi/2}^{\pi/2}\cos^{2n-1}(x)\,\mathrm{d}x &=\lim_{n\to\infty}\int_{-\sqrt{n}\pi/2}^{\sqrt{n}\pi/2}\cos^{2n-1}(x/\sqrt{n})\,\mathrm{d}x\\ &=\lim_{n\to\infty}\int_{-\sqrt{n}\pi/2}^{\sqrt{n}\pi/2}\left(1-\frac{x^2}{2n}+O\left(\frac{x^4}{n^2}\right)\right)^{2n-1}\,\mathrm{d}x\\ &=\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\\[9pt] &=\sqrt\pi\tag{2} \end{align} $$ Since $\cos(x+\pi)=-\cos(x)$, we get that on $[\pi/2,3\pi/2]$, $\sqrt{n}\cos^{2n-1}(x)\le0$ and $$ \lim_{n\to\infty}\sqrt{n}\int_{\pi/2}^{3\pi/2}\cos^{2n-1}(x)\,\mathrm{d}x=-\sqrt\pi\tag{3} $$

$\hspace{3.5cm}$enter image description here


The Integral Near $\boldsymbol{0}$

Since $\sqrt{n}\cos^{2n-1}(x)$ is an even function, we have that half of its mass at $0$ is to the left and half is to the right; that is, $$ \lim_{n\to\infty}\sqrt{n}\int_0^{\pi/2}\cos^{2n-1}(x)\,f(x)\,\mathrm{d}x=\frac{\sqrt\pi}2f(0)\tag{4} $$ If we wish to be a bit more rigorous, we could repeat the integral in $(2)$ on $[0,\pi/2]$.


The Whole Integral

Applying $(1)$ while taking $(4)$ into account, we get $$ \begin{align} \lim_{n\to\infty}\sqrt{n}\int_0^\infty\cos^{2n-1}(x)\,e^{-ax}\,\mathrm{d}x &=\sqrt\pi\left(\frac12+\sum_{k=1}^\infty(-1)^ke^{-ak\pi}\right)\\ &=\sqrt\pi\left(\frac1{1+e^{-a\pi}}-\frac12\right)\\ &=\frac{\sqrt\pi}2\tanh(a\pi/2)\tag{5} \end{align} $$


An Interesting Variant

Using the same ideas, we get that $$ \begin{align} \lim_{n\to\infty}\sqrt{n}\int_0^\infty\cos^{2n}(x)\,e^{-ax}\,\mathrm{d}x &=\sqrt\pi\left(\frac12+\sum_{k=1}^\infty e^{-ak\pi}\right)\\ &=\sqrt\pi\left(\frac1{1-e^{-a\pi}}-\frac12\right)\\ &=\frac{\sqrt\pi}2\coth(a\pi/2)\tag{6} \end{align} $$

Solution 3:

If we split the interval into small intervals of lengths $I_k=\displaystyle \left[(2k-1)\frac{\pi}{2},(2k+1)\frac{\pi}{2}\right]$, then we
see the simple fact the only contribution is found near the points of the form $k \pi$ and then all gets reduced to

$$\lim_{n\to\infty} \sqrt{n}\int_0^{\infty} \cos^{2n-1}(x) e^{- \pi x} \ dx$$ $$=\frac{\sqrt{\pi}}{2}+\lim_{n\to\infty}\sqrt{n}\sum_{k=1}^{\infty} e^{-k \pi^2} \int_{(2k-1)\pi/2}^{(2k+1)\pi/2} \cos^{2n-1}(x) \ dx$$ $$=\frac{\sqrt{\pi}}{2}+\lim_{n\to\infty}\sqrt{n}\sum_{k=1}^{\infty} (-1)^k e^{-k \pi^2} \frac{\sqrt{\pi} \space \Gamma(n)}{\displaystyle \Gamma\left(\frac{1}{2}+n\right)}$$ $$=\frac{\sqrt{\pi}}{2}+\sqrt{\pi} \sum_{k=1}^{\infty} (-1)^k e^{-k \pi^2} $$ $$=\frac{\sqrt\pi}{2}\tanh\left(\frac{\pi^2}{2}\right)$$

where $\displaystyle \frac{\sqrt{\pi}}{2}$ in the lines $2,3,4$ comes from the fact I only considered $\displaystyle \lim_{n\to\infty} \frac{\sqrt{n}}{2}\int_{-\pi/2}^{\pi/2} \cos^{2n-1}(x) \ dx$

Q.E.D.