Calcule the improper integral $$\int_0^1 2x \sin \left( \frac 1 {x^2} \right)-\frac 2 x \cdot\cos\left(\frac 1 {x^2} \right) \mathrm{d}x.$$
It is pretty easy to see that the integral convreges, using Taylor polynomials, for example. As for calculating it, it's actually not that difficult to "guess" an antiderivative (in all $[0,1]$), say, $F(x)=x^2 \sin(1/x^2)$ for $x\neq 0$, and $F(0)=0$. However, I'm searching for a more straightforward approach, with no "good guessing" required.
$$I=\int_0^1 2x \sin \left( \frac 1 {x^2} \right)-\frac 2 x \,\cos\left(\frac 1 {x^2} \right) \,dx$$
$$x=\frac{1}{\sqrt{t}} \quad \implies \quad I=\int_1^\infty \left(\frac{\sin (t)}{t^2}-\frac{\cos (t)}{t}\right)\,dt$$
$$\int \left(\frac{\sin (t)}{t^2}-\frac{\cos (t)}{t}\right)\,dt=\Big(\text{Ci}(t)-\frac{\sin (t)}{t}\Big)-\text{Ci}(t)=-\frac{\sin (t)}{t}$$