Does the integral $$J:=\int_{0}^{\infty} \frac{x^3\,\cos{(x^2-x)}}{1+x^2}dx $$ diverge ?
If we integrate by parts we find
$$J=\lim_{a\rightarrow +\infty} \frac{a^3}{(1+a^2)(2a-1)}\cos{(a^2-a)} -\\ \int_{0}^{\infty}\sin{(x^2-x)} \left( \frac{3x^2}{(1+x^2)(2x-1)}-\\ \frac{2x^4}{(1+x^2)^2(2x-1)}-\frac{2x^3}{(1+x^2)(2x-1)^2}\right)dx$$
If we integrate by parts again, we find that the latter integral reduces to a sum of absolutely convergent integrals plus the boundary term
$$ -\lim_{a\rightarrow +\infty}\, \cos{(a^2-a)}\left(\frac{3a^2}{(1+a^2)(2a-1)^2} -\\ \frac{2a^4}{(1+a^2)^2(2a-1)^2}-\frac{2a^3}{(1+a^2)(2a-1)^3} \right)=0.$$
So the question simplifies to the existence of the limit $\lim_{a\rightarrow +\infty} \frac{a^3}{(1+a^2)(2a-1)}\cos{(a^2-a)}$ which I believe does not exist.
Correct ?
The integral is divergent because the limit does not exist. Let $f(a)=\frac{a^3\,\cos{(a^2-a)}}{(1+a^2)(2a-1)}$.
Take the sequence $a_{n}=:\frac{1+\sqrt{1+8\pi n}}{2}$ that diverges to infinity and satisfies $a_{n}^2-a_{n}=2n\pi$. Then $f(a_{n})\rightarrow \frac{1}{2}$.
Now, take the sequence $b_{n}:=\frac{1+\sqrt{1+4(2n+1)\pi }}{2}$ that also diverges to infinity and satisfies $b_{n}^2-b_{n}=(2n+1)\pi$. Then $f(b_{n})\rightarrow -\frac{1}{2}$.