Determining whether an improper integral is convergent or divergent. Is the integral $$I=\int _0 ^{\infty} \sin (x)\sin (x^2)~\mathrm dx $$ convergent or divergent? Thus we have $$I=\frac {1}{4}\int _{-\infty} ^{\infty} \left(\cos \left(\frac {x^2-x}{2}\right)-\cos \left(\frac{x^2+x}{2}\right)\right)~\mathrm dx $$ I have not been able to go any further. This question was asked in calculus class 1 so hope there is an easy way like approximation of integral or any series to go about.Thanks!
 A: Obviously we may suppose that we integrate over $[1,+\infty[$. Put $x^2=u$, then your integral becomes $\displaystyle \frac{1}{2}\int_1^{+\infty}\frac{\sin(u)\sin(\sqrt{u})}{\sqrt{u}}du$. Integrate by parts the last integral:
$\displaystyle \int_1^{+\infty}\frac{\sin(u)\sin(\sqrt{u})}{\sqrt{u}}du$ is equal to
$$\left[-\cos(u)\frac{\sin(\sqrt{u})}{\sqrt{u}}\right]_1^{+\infty}+\int_1^{+\infty}\cos(u)\left[\frac{\cos(\sqrt{u})}{2u}- \frac{\sin(\sqrt{u})}{2u^{3/2}}\right]du$$
Now as the last integral in the above line is absolutely convergent, (and also the integrated part is convergent), it remain to show that the integral $$\int_1^{+\infty}\cos(u)\frac{\cos(\sqrt{u})}{2u}du$$ is convergent. Use an integration by parts....
A: If you know Dirichlet's test, we can do this: Let $f(x) = (x^2-x)/2.$ Then $f'(x) > 0$ on, say, $[1,\infty).$ Thus we can make the change of variables $x=f^{-1}(y)$ to get
$$ \int_1^\infty \cos [(x^2-x)/2]\, dx = \int_1^\infty \cos f(x)\, dx =\int_0^\infty \cos y\cdot (f^{-1})'(y)\, dy.$$
For Dirichlet to work here, we need $(f^{-1})'(y)$ to decrease to $0$ as $y\to \infty.$ You can verify that this is the case. The other cosine integral can be handled similarly.
