Show that \[ f(x)=\frac{\cos x}{1+x^2} \] belongs to \(L^1(\mathbb R)\). Then evaluate \[ \int_0^\infty\frac{\cos x}{1+x^2}\,dx. \]
Solution
1. The function is absolutely integrable.
Since \(|\cos x|\le1\), \[ \int_{\mathbb R}\left|\frac{\cos x}{1+x^2}\right|\,dx \le \int_{\mathbb R}\frac{dx}{1+x^2} =\pi<\infty. \] Hence \(f\in L^1(\mathbb R)\).
2. Evaluate the integral by residues.
Consider \[ F(z)=\frac{e^{iz}}{1+z^2} \] and integrate over the upper-half-plane semicircle of radius \(R>1\). The only pole inside the contour is the simple pole at \(z=i\), with residue \[ \operatorname{Res}_{z=i}F =\lim_{z\to i}\frac{e^{iz}}{z+i} =\frac{e^{-1}}{2i}. \] Therefore the residue theorem gives \[ \int_{-R}^R\frac{e^{ix}}{1+x^2}\,dx +\int_{\Gamma_R}\frac{e^{iz}}{1+z^2}\,dz =2\pi i\cdot\frac{e^{-1}}{2i} =\frac{\pi}{e}. \] On the upper semicircle, \(|e^{iz}|=e^{-\operatorname{Im}z}\le1\), so for \(R>1\), \[ \left|\int_{\Gamma_R}\frac{e^{iz}}{1+z^2}\,dz\right| \le \frac{\pi R}{R^2-1}\longrightarrow0. \] Letting \(R\to\infty\) yields \[ \int_{-\infty}^{\infty}\frac{e^{ix}}{1+x^2}\,dx=\frac{\pi}{e}. \] Taking real parts, \[ \int_{-\infty}^{\infty}\frac{\cos x}{1+x^2}\,dx=\frac{\pi}{e}. \] The integrand is even, so \[ \int_0^\infty\frac{\cos x}{1+x^2}\,dx =\frac{\pi}{2e}. \]