Solution: Observe that
\begin{align*}
\left\vert \frac{\cos x}{1 + x^2} \right\vert \leq \frac{1}{\vert 1 + x^2 \vert } = \frac{1}{1 + x^2}.
\end{align*}
Since
\[
\left\vert \int _0^{\infty} \frac{\cos x }{1 + x^2}\mathrm{d} x \right\vert \leq \int _0^{\infty} \left\vert \frac{\cos x}{1 + x^2} \right\vert \mathrm{d}x,
\]
it is enough to prove the integral $\int _0^{\infty} \frac{\vert \cos x \vert }{1 + x^2}\mathrm{d}x $ is convergent. Let us consider the following integral.
\begin{align*}
\int _0^{\infty} \frac{1}{1 + x^2} \mathrm{d}x & = \lim_{b \to \infty} \int _0^b \frac{1}{1 + x^2} \mathrm{d} x \\
& = \lim_{b \to \infty} \left[ \tan ^{-1} x \right]_0^b \\
& = \lim_{b \to \infty} \left[ \tan ^{-1} b - \tan ^{-1} 0 \right] \\
& = \lim_{b \to \infty} \tan ^{-1} b = \frac{\pi}{2}.
\end{align*}
The integral $\int _0^{\infty} \frac{1}{1 + x^2}\mathrm{d}x $ converges. Thus, by comparsion test, the given integral is also convergent.
(The comparison test for improper integral) If $0\leq f(x) \leq g(x)$ on the interval $[a,\infty)$, then we have following.
-
If $\displaystyle \int_a^{\infty} g(x) \mathrm{d}x $ converges, then $\displaystyle \int _a^{\infty} f(x) \mathrm{d}x$ also converges.
-
If $\displaystyle \int_a^{\infty} f(x) \mathrm{d}x $ diverges, then $\displaystyle \int _a^{\infty} g(x) \mathrm{d}x$ also diverges.