Does the integral $\int _0^\infty \frac 1{1+(x \cos x)^2}\,dx$ converge? Question
$$\int _0^\infty \frac 1{1+(x \cos x)^2}dx$$
Does this converge?
Thoughts
Tried bounding it with $\frac 1{\cos^2x}$ for $x>1$ but not much success.
 A: Note that


*

*$(x \cos x)^{2} \leq n^{2}\pi^{2} \cos^{2} x$ on each interval $[(n-1)\pi, n\pi]$, and

*$\sin^{2} x \leq x^{2} $ for any $x$.


So it follows that
\begin{align*}
\int_{0}^{\infty} \frac{dx}{1+(x \cos x)^{2}}
&\geq \sum_{n=1}^{\infty} \int_{0}^{\pi} \frac{dx}{1+n^{2}\pi^{2}\cos^{2} x}
 = 2 \sum_{n=1}^{\infty} \int_{0}^{\frac{\pi}{2}} \frac{dx}{1+n^{2}\pi^{2}\sin^{2} x} \\
&\geq 2 \sum_{n=1}^{\infty} \int_{0}^{\pi/2} \frac{dx}{1+n^{2}\pi^{2}x^{2}} \\
&= \sum_{n=1}^{\infty} \frac{2}{n\pi} \int_{0}^{n\pi^{2}/2} \frac{dx}{1+x^{2}} \qquad (n\pi x \mapsto x)
\end{align*}
But since 
$$ \frac{2}{\pi} \int_{0}^{n\pi^{2}/2} \frac{dx}{1+x^{2}} \xrightarrow[]{n\to\infty} 1, $$
by the Limit Comparison Test we have
$$ \sum_{n=1}^{\infty} \frac{2}{n\pi} \int_{0}^{n\pi^{2}/2} \frac{dx}{1+x^{2}} = \infty. $$
This proves the divergence of the integral.

A little bit elaborated argument shows that, for $N\pi \leq x \leq (N+1)\pi$, we have
$$ \int_{0}^{x} \frac{dt}{1+(t \cos t)^{2}} = \sum_{n=1}^{N} \int_{0}^{\pi/2} \frac{2 \, dt}{1+n^{2}\pi^{2}\sin^{2} t} + O(1) $$
By observing the following identity
$$ \int_{0}^{\pi/2} \frac{dt}{1+a^{2}\sin^{2} t} = \frac{\pi}{2\sqrt{a^{2}+1}}, $$
it follows that
$$ \int_{0}^{\pi/2} \frac{2 \, dt}{1+n^{2}\pi^{2}\sin^{2} t} = \frac{1}{n} + O\left(\frac{1}{n^{3}} \right). $$
Therefore we have the following estimate:
$$ \int_{0}^{x} \frac{dt}{1+(t \cos t)^{2}} = \log x + O(1). $$
