How to prove that integral of $$x^{-1}\cos(x)$$ from $1$ to $\infty$ is convergent (in other words equal to a real number)?
I can easily prove that for the following: $$x^{-2}\cos(x), x^{-3}\cos(x), x^{-4}\cos(x)...$$
using the fact that $$|x^{-2}\cos(x)|,|x^{-3}\cos(x)|, |x^{-4}\cos(x)|<x^{-2}$$ and I know that the integral for $$x^{-2}$$ from $1$ to $\infty$ is convergent.
Hint: $$ \int_{2n\pi}^{(2n+2)\pi} \frac{\cos(x)}{x}\; dx = \int_{2n \pi}^{(2n+1)\pi} \cos(x) \left(\frac{1}{x} - \frac{1}{x+\pi}\right) \; dx = \int_{2n \pi}^{(2n+1)\pi} \frac{\pi \cos(x)}{x(x+\pi)}\; dx$$