Answer
Diverges
Work Step by Step
Use a direct limit comparison test.
Since, $\cos x \geq -1$
This implies that $\dfrac{1}{x} \leq \dfrac{2 +\cos x}{x}$ for all $x \geq \pi$
Now,
$\lim\limits_{a \to \infty}\int_{\pi}^{a} \dfrac{dx}{x}=\lim\limits_{a \to \infty}[\ln|x|]_{\pi}^{a}\\\lim\limits_{a \to \infty}\ln|a| -\lim\limits_{a \to \infty}\ln| \pi| \\ =\infty$
Thus, the given integral diverges by the direct comparison test.