<s>[INST] Find $\int_{0}^{\infty }\cos \left (x \right )\sin \left (x^{2} \right )\mathrm{d}x$ How to prove
$$\int_{0}^{\infty }\cos \left (x  \right )\sin \left (x^{2}  \right )dx=\frac{1}{2}\sqrt{\frac{\pi }{2}}\left ( \cos\frac{1}{4}-\sin\frac{1}{4} \right )$$
any hint ?Thanks!
 [/INST] \begin{align*}
\int_{0}^{\infty }\cos x\sin x^2\, \mathrm{d}x&=\frac{1}{4}\int_{-\infty}^{\infty }\left [ \sin\left ( x^{2}+x \right )+\sin\left ( x^{2}-x \right ) \right ]\mathrm{d}x\tag1\\
&=\frac{1}{4}\int_{-\infty}^{\infty }\left [ \sin\left ( \left ( x+\frac{1}{2} \right )^{2}-\frac{1}{4} \right )+\sin\left ( \left ( x-\frac{1}{2} \right )^{2}-\frac{1}{4} \right ) \right ]\mathrm{d}x\\
&=\frac{1}{2}\int_{-\infty}^{\infty }\sin\left ( x^{2}-\frac{1}{4} \right )\mathrm{d}x\\
&=\frac{1}{2}\cos\frac{1}{4}\int_{-\infty}^{\infty }\sin x^{2}\, \mathrm{d}x-\frac{1}{2}\sin\frac{1}{4}\int_{-\infty}^{\infty }\cos x^2\, \mathrm{d}x\tag2
\end{align*}
The use the Fresnel integral , we will get the answer as wanted.
$(1)$ : $\sin\alpha \cos\beta =\dfrac{1}{2}\left [ \sin\left ( \alpha +\beta  \right )+\sin\left ( \alpha -\beta  \right ) \right ]$
$(2)$ : $\sin\left ( \alpha -\beta  \right )=\sin\alpha \cos\beta -\cos\alpha \sin\beta $

Use the same way we can get 
$$\int_{0}^{\infty }\cos x\cos x^2\, \mathrm{d}x=\frac{1}{2}\sqrt{\frac{\pi }{2}}\left ( \cos\frac{1}{4}+\sin\frac{1}{4} \right )$$
</s>