Prove that $\int\limits_1^{\infty} \frac{\cos(x)}{x} \, \mathrm{d}x$ converges 
Prove the convergence of
$$\int\limits_1^{\infty} \frac{\cos(x)}{x} \, \mathrm{d}x$$

First I thought the integral does not converge because
$$\int\limits_1^{\infty} -\frac{1}{x} \,\mathrm{d}x \le \int\limits_1^{\infty} \frac{\cos(x)}{x}  \, \mathrm{d}x$$
But in this case
$$\int\limits_1^{\infty} \frac{\cos(x)}{x} \, \mathrm{d}x \le \int\limits_1^{\infty} \frac{1}{x^2}  \, \mathrm{d}x$$
it converges concerning the majorant criterion. What's the right way?
 A: You might want to use integration by parts, obtaining for $M\ge1$,
$$
\int_{1}^M \frac{\cos x}{x}\: dx=\left[\frac{\sin x}{ x}\right]_1^M+ \int_1^M \frac{\sin x}{x^2}\: dx
$$ letting $M \to \infty$ gives
$$
\int_{1}^\infty \frac{\cos x}{x} \:dx=\lim_{M \to \infty}\int_1^M \frac{\cos x}{x}  \:dx= -\sin 1+\int_1^\infty \frac{\sin x}{ x^2}\: dx
$$then one may conclude by the absolute convergence of the latter integral:
$$
\left|\int_1^\infty \frac{\sin x}{ x^2}\: dx\right|<\int_1^\infty \frac{|\sin x|}{ x^2}\: dx<\int_1^\infty \frac{1}{x^2}\: dx<\infty.
$$
A: Hint: Awful and tricky but as the problem is near $+\infty$, write $$\int \limits_{\frac{\pi}{2}}^{N\pi+\frac{\pi}{2}}\frac{\cos(x)}{x}\mathrm{d}x= \sum \limits_{k=1}^{N}\left(\int\limits_{k\pi-\frac{\pi}{2}}^{k\pi+\frac{\pi}{2}}\frac{\cos(x)}{x}\mathrm{d}x\right)$$ and use the criterion for alternating series with the sequence $$a_k=\int\limits_{k\pi-\frac{\pi}{2}}^{k\pi+\frac{\pi}{2}}\frac{\cos(x)}{x}\mathrm{d}x$$
A: $$
\begin{align}
\left|\,\int_1^\infty\frac{\cos(x)}{x}\,\mathrm{d}x\,\right|
&\le\left|\,\int_1^\pi\frac{\cos(x)}{x}\,\mathrm{d}x\,\right|+\sum_{k=1}^\infty\left|\,\int_{(2k-1)\pi}^{(2k+1)\pi}\frac{\cos(x)}{x}\,\mathrm{d}x\,\right|\\
&=\left|\,\int_1^\pi\frac{\cos(x)}{x}\,\mathrm{d}x\,\right|+\sum_{k=1}^\infty\left|\,\int_{(2k-1)\pi}^{(2k+1)\pi}\cos(x)\left(\frac1{x}-\frac1{2k\pi}\right)\,\mathrm{d}x\,\right|\\
&\le\log(\pi)+\sum_{k=1}^\infty2\pi\left(\frac1{(2k-1)\pi}-\frac1{2k\pi}\right)\\[6pt]
&=\log(4\pi)
\end{align}
$$
