I need to prove that $$ \int_0^{\infty} \left(1 - \cos\left(\frac{1}{x^2}\right)\right) dx < \infty $$
My attempt: $$ \forall x\in[0,\infty] \hspace{1cm} 0 < 1 - \cos\left(\frac{1}{x^2}\right) < 2 \tag{1}. $$ Using L'Hôpital's rule I can show that: $$ 1 - \cos\left(\frac{1}{x^2}\right) \underset{x \to \infty}{\sim} \frac{1}{2x^4} \tag{2} $$ Which means that $ 1 - \cos\left(\frac{1}{x^2}\right)$ behaves like $ \frac{1}{2x^4} $ when $ x \to \infty $.
So I think that, there exist $N \in \mathbb{N} $ such that: $$ \int_0^{\infty} \left(1 - \cos\left(\frac{1}{x^2}\right)\right)dx < \int_0^{N} 2dx + \int_N^{\infty} \frac{1}{x^4}dx < \infty $$
but I'm not sure. I would appreciate any tips or hints.
Use the substitution $1/x=t$, so the integral becomes $$ \int_0^{\infty} \frac{1-\cos(t^2)}{t^2}\,dt $$ Since $$ \lim_{t\to0}\frac{1-\cos(t^2)}{t^2}=0 $$ convergence is not an issue at $0$. Since $$ 0\le 1-\cos(t^2)\le 2 $$ we have that, for $t\ge1$, $$ 0\le\frac{1-\cos(t^2)}{t^2}\le\frac{2}{t^2} $$ Now show convergence of $$ \int_1^\infty \frac{2}{t^2}\,dt $$