Integral without residues How do I do this integral without using complex variable theorems? (i.e. residues)
$$\lim_{n\to \infty} \int_0^{\infty} \frac{\cos(nx)}{1+x^2} \, dx$$
 A: Consider the function $f(t)=e^{-a|t|}$, then the Fourier transform of $f(t)$ is given by
$$
\begin{align}
F(x)=\mathcal{F}[f(t)]&=\int_{-\infty}^{\infty}f(t)e^{-ix t}\,dt\\
&=\int_{-\infty}^{\infty}e^{-a|t|}e^{-ix t}\,dt\\
&=\int_{-\infty}^{0}e^{at}e^{-ix t}\,dt+\int_{0}^{\infty}e^{-at}e^{-ix t}\,dt\\
 &=\lim_{u\to-\infty}\left. \frac{e^{(a-ix)t}}{a-ix} \right|_{t=u}^0-\lim_{v\to\infty}\left. \frac{e^{-(a+ix)t}}{a+ix} \right|_{0}^{t=v}\\
&=\frac{1}{a-ix}+\frac{1}{a+ix}\\
&=\frac{2a}{x^2+a^2}.
\end{align}
$$
Next, the inverse Fourier transform of $F(x)$ is
$$
\begin{align}
f(t)=\mathcal{F}^{-1}[F(x)]&=\frac{1}{2\pi}\int_{-\infty}^{\infty}F(x)e^{ix t}\,dx\\
e^{-a|t|}&=\frac{1}{2\pi}\int_{-\infty}^{\infty}\frac{2a}{x^2+a^2}e^{ix t}\,dx\\
\frac{\pi e^{-a|t|}}{a}&=\int_{-\infty}^{\infty}\frac{e^{ix t}}{x^2+a^2}\,dx\\
\frac{\pi e^{-a|t|}}{2a}&=\int_{0}^{\infty}\frac{e^{ix t}}{x^2+a^2}\,dx.
\end{align}
$$
Thus, taking the real part, putting $a=1$ and $t=n$, then
$$
\Re\left[\int_{0}^{\infty}\frac{e^{inx}}{x^2+1}\,dx\right]=\int_{0}^{\infty}\frac{\cos nx}{x^2+1}\,dx=\large\color{blue}{\frac{\pi e^{-|n|}}{2}}.
$$
Other method using double integral technique can be seen here. Consequently
$$
\lim_{n\to\infty}\int_{0}^{\infty}\frac{\cos nx}{x^2+1}\,dx=\lim_{n\to\infty}\frac{\pi e^{-|n|}}{2}=\large\color{blue}0.
$$
A: Use integration by parts
$$\int_0^\infty \frac{\cos(nx)}{1+x^2} dx = \frac{1}{n} \int_0^\infty \frac{2\sin(nx)x}{(1+x^2)^2} dx$$
Now use the triangle inequality
$$\left|\int_0^\infty \frac{2\sin(nx)x}{(1+x^2)^2} dx\right|\le \int_0^\infty \frac{2x}{(1+x^2)^2} dx<\infty$$
So the limit is $0$.
