Please help me check, whether the following integral converges or not: $$\int_{0}^{+\infty}{\sin{\left(1\over x\right)}\over{(x-\cos{\left(\pi\over x\right)})}^2}\,\mathrm{d}x$$ It seems to me, that it doesn't converge. However I can't prove it. The $$\int_{1}^{+\infty}{\sin{\left(1\over x\right)}\over{(x-\cos{\left(\pi\over x\right)})}^2}\,\mathrm{d}x$$ part seems to converge, because the integrand is equivalent to $${{1\over x}\over{(x-(1-{\left(\pi\over x\right)}^2))}^2} \sim {1\over x^3}$$ for $x\to+\infty;{1\over x}\to0$. The $$\int_{0}^{1}{\sin{\left(1\over x\right)}\over{(x-\cos{\left(\pi\over x\right)})}^2}\,\mathrm{d}x$$ part is what I am having problems with. There are infinitely many critical values, when $x\in(0;1)$. Even worse is that I don't even know, how to find a closed form solution to $x = \cos{\left(\pi\over x\right)}$. So splitting it into a sum of integrals with bounds at critical values doesn't work.
Since I thought, that it diverges, I figured the integral might diverge on the interval $(a;1)$, where $a\approx0.5882$, which is the last root of $x = \cos{\left(\pi\over x\right)}$. But even if I knew the exact value of $a$, $$\int_{a}^{1}{\sin{\left(1\over x\right)}\over{(x-\cos{\left(\pi\over x\right)})}^2}\,\mathrm{d}x$$ for $x\to a$ doesn't seem to simplify to anything useful, since there is no way to know, how would $x$ and $\cos{\left(\pi\over x\right)}$ behave in this region.