# Does $\lim_{n \rightarrow \infty} \int_{-\infty}^\infty\frac{\cos x}{1 + x^{2n}} dx$ exist, and if so what is it?

Let

$$f(n) = \int_{-\infty}^\infty\frac{\cos x}{1 + x^{2n}} dx$$

Question: I'm curious if $$\lim_{n \rightarrow \infty} f(n)$$ exists and if so, if the exact value is known. According to Desmos at least, we have:

\begin{align*} f(1) & = \pi / e \approx 1.15572734979\\ f(2) & \approx 1.54427604502 \\ f(3) & \approx 1.63476626339 \\ f(4) & \approx 1.6604332697 \\ f(5) & \approx 1.67010286509 \\ & \vdots \\ f(98) & \approx 1.68291615825 \\ f(99) & \approx 1.68291667745 \\ f(100) & \approx 1.68291718113 \\ & \vdots \\ f(998) & \approx 1.68294172092 \\ f(999) & \approx 1.68294172142 \\ f(1000) & \approx 1.68294172191 \\ \end{align*}

So on the surface, it looks like it could converge, but I can't distinguish that from a slowly growing function like $$\log x$$. Computing $$f(1)$$ is actually an exercise I did in my complex analysis course many years ago now, and I tried using the same approach to solve this, but I ran into an issue that I'll explain below.

Here's what I tried...

We use a domain $$D_R$$ which for a given radius $$R$$ is bounded by $$\Gamma_R \cup [-R, R]$$, where $$\Gamma_R$$ is the upper semicircle with radius $$R$$ centered at the origin, and $$[-R,R]$$ is a line segment on the real axis.

The function inside the integral, $$\frac{\cos z}{1 + z^{2n}}$$, appears to have simple poles at the roots of unity, only rotated by $$\pi/4n$$. As a result of this rotation, exactly half of the poles are in the upper half-plane. When we substitute $$e^{iz}$$ for $$\cos z$$ here, the residues look like

$$\text{Res }\left[\frac{e^{iz}}{1 + z^{2n}},z_j\right] = \lim_{z \rightarrow z_j} (z - z_j)\frac{e^{iz}}{1 + z^{2n}} = \frac{e^{iz_j}}{\prod_{k=1,k \neq j}^{2n}(z_j - z_k)}$$

Note that for points $$z \in \Gamma_R$$, $$|1 + z^{2n}| \leq R^{2n} - 1$$ (since $$|z^{2n}| = R^{2n}$$ and so $$|1 + z^{2n}|$$ can be at most one lower than $$|z^{2n}|$$). Since $$|e^{iz}| \leq 1$$ in the upper half plane, by the ML-estimate, we have $$\left|\int_{\Gamma_R} \frac{e^{iz}}{1 + z^{2n}} dz \right| \leq \frac{\pi R}{R^{2n} - 1}$$ where the right side vanishes as $$R \rightarrow \infty$$. In other words, $$\lim_{R \rightarrow \infty}\int_{\Gamma_R} \frac{e^{iz}}{1 + z^{2n}} dz = 0.$$ By the Residue Theorem, we have

\begin{align*} \int_{\partial D_R} \frac{e^{iz}}{1 + z^{2n}} dz & = \int_{\Gamma_R} \frac{e^{iz}}{1 + z^{2n}} dz + \int_{-R}^R \frac{e^{iz}}{1 + z^{2n}} dz \\ & = 2 \pi i \sum_{j = 1}^n\left(\text{Res }\left[\frac{e^{iz}}{1 + z^{2n}},z_j\right] \right) \\ & = 2 \pi i \sum_{j = 1}^n\left(\frac{e^{iz_j}}{\prod_{k=1,k \neq j}^{2n}(z_j - z_k)} \right) \\ \end{align*}

where I'm assuming $$j \in \{1, 2, \dots, n\}$$ represent the half of the poles which are in the upper half plane. When we take $$R \rightarrow \infty$$ this gives

\begin{align*} \int_{-\infty}^\infty \frac{e^{iz}}{1 + z^{2n}} dz & = 2 \pi i \sum_{j = 1}^n\left(\frac{e^{iz_j}}{\prod_{k=1,k \neq j}^{2n}(z_j - z_k)} \right) - \lim_{R \rightarrow \infty}\int_{\Gamma_R} \frac{e^{iz}}{1 + z^{2n}} dz \\ & = 2 \pi i \sum_{j = 1}^n\left(\frac{e^{iz_j}}{\prod_{k=1,k \neq j}^{2n}(z_j - z_k)} \right).\end{align*}

This is normally where I would take the real part of the right side to get the value of $$f(n)$$, but I really don't even know how to compute that. Even if I try taking $$n \rightarrow \infty$$, I don't see a way to simplify it.

Any insight would be much appreciated. :) Have a wonderful day!

• Just by curiosity : plot $n\,f(n)$ as a function of $n$ Aug 31, 2023 at 7:56

$$f(n)=2\int_0^{\infty} \frac {\cos x} {1+x^{2n}}dx$$.
$$\int_0^{1} \frac {\cos x} {1+x^{2n}}dx \to \int_0^{1} \cos x dx=\sin 1$$.
$$\int_1^{\infty} \frac {\cos x} {1+x^{2n}}dx \to 0$$ by DCT since $$|\cos x| \leq 1$$, $$x^{2n} \geq x^{2}$$ and $$\frac 1 {1+x^{2}}$$ is integrable. So $$f(n) \to 2\sin 1$$.
By residue theorem, $$I_{2n}=\sum_{-\infty}^{\infty}\frac{\cos x}{x^{2n}+1}$$ is the real part of $$2\pi i\sum_{j=0}^{n-1}\frac{e^{iz_j}}{2nz_j^{2n-1}}$$ where $$z_j=e^{\frac{\pi i}{2n}(2j+1)}$$ which is equal to $$-\pi i\sum_{j=0}^{n-1}\frac{e^{ie^{{i\pi}\frac{2j+1}{2n}}} e^{{i\pi}\frac{2j+1}{2n}} }{n}.$$ This is a Rieamann sum. When $$n\to\infty$$, we have $$-\pi i\int_0^1 e^{ie^{\pi ix}}e^{\pi ix}dx=\int_{-1}^1e^{iu}du=2\sin1.$$