Given that $f:[0, \infty] \to \mathbb{R}$ is decreasing with $\displaystyle\lim_{x \rightarrow \infty} f(x)=0$, prove that
$$I=\int_{0}^{1}\frac{\cos(\frac{1}{x})f(\frac{1}{x})}{x^2}dx$$ converges.
I've thought about using Dirichlet test but it works only if $f$ is continuously differentiable. It can be an improper integral or not, depends how $f$ is defined, so some of my other ideas didn't work either. Any ideas?
By Lebesgue differentiation theorem, a decreasing function is almost everywhere differentiable, so for any $\varepsilon >0$ $$ \int_{\varepsilon}^{1}\frac{f(1/x)\cos(1/x)}{x^2}\,dx = \int_{1}^{1/\varepsilon}\cos(x)\,f(x)\,dx$$ and we may apply integration by parts/Dirichlet's test. It does not really matter that $f'(x)$ is not defined at some points, and we do not need the continuity of $f'$.