Integral of $x^{-1} \cos(x)$ from $1$ to $\infty$ 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.
 A: 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$$
A: If you graph the function, you see that it's positive when $((2k-1)\pi +\pi/2 < x < 2k\pi + \pi/2$ and negative otherwise.  So the integral is the sum of the areas of these humps, which are alternating in sign and decreasing in absolute value.  So it converges by alternating series test.
A: $$\int \frac{\cos (x)}{x} \, dx$$
Integrating by parts gives
$$-\frac{\cos x}{x^2} - \int \frac{\sin x}{x^2}\,dx$$
and  $$\int \frac{\sin x}{x^2}\,dx \leq \int\frac{1}{x^2}\,dx$$
as the last integral converges, also the first one converges.
A: Integrating by parts
$$ \int_1^\infty \frac{\cos(x)}{x}dx=\int_1^\infty \frac{\sin'(x)}{x}dx=\frac{\sin(x)}{x}\bigg |_{1}^\infty+\int_1^\infty \frac{\sin(x)}{x^2}dx=-\sin(1)+\int_1^\infty \frac{\sin(x)}{x^2}dx$$
it's easy to show that the second integral converges
A: Since $\int_{2n\pi}^{2(n+1)\pi}\cos(x)\,\mathrm{d}x=0$,
$$
\begin{align}
\int_1^\infty\frac{\cos(x)}x\,\mathrm{d}x
&=\int_1^{2\pi}\frac{\cos(x)}x\,\mathrm{d}x+\sum_{n=1}^\infty\int_{2n\pi}^{2(n+1)\pi}\frac{\cos(x)}x\mathrm{d}x\tag1\\
&=\int_1^{2\pi}\frac{\cos(x)}x\,\mathrm{d}x+\sum_{n=1}^\infty\int_{2n\pi}^{2(n+1)\pi}\left(\frac{\cos(x)}x-\frac{\cos(x)}{2n\pi}\right)\mathrm{d}x\tag2
\end{align}
$$
Then note that
$$
\begin{align}
\int_{2n\pi}^{2(n+1)\pi}\left|\,\frac{\cos(x)}x-\frac{\cos(x)}{2n\pi}\,\right|\mathrm{d}x
&\le2\pi\left(\frac1{2n\pi}-\frac1{2(n+1)\pi}\right)\tag3\\
&=\frac1{n(n+1)}\tag4
\end{align}
$$
Thus, $(4)$ yields the convergence of $(2)$.
