Calculate trigonometric integral $ \int_{-\infty}^{\infty}{\sin(x^2)}\,dx$ Recently, I came across the following integral:
$$
\int_{-\infty}^{\infty}{\sin(x^2)}\,dx=\int_{-\infty}^{\infty}{\cos(x^2)}\,dx=\sqrt{\frac{\pi}{2}}
$$
What are the different ways to calculate such an integral?
In this answer is given a real method for showing this.

Using contour integration we can show that
$$
\begin{align}
\int_{-\infty}^\infty\left[\cos(x^2)+i\sin(x^2)\right]\,\mathrm{d}x
&amp;=\int_{-\infty}^\infty e^{ix^2}\,\mathrm{d}x\\
&amp;=\frac{1+i}{\sqrt2}\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\\
&amp;=(1+i)\sqrt{\frac\pi2}
\end{align}
$$
To show the equality of these integrals, integrate $e^{iz^2}$ along the contour
$$
[-R,R]\cup Re^{i\pi[0,1/4]}\cup[R,-R]e^{i\pi/4}\cup-Re^{i\pi[1/4,0]}
$$
which must be $0$ since $e^{iz^2}$ has no singularities. Note that the integral along the two curved contours vanishes as $R\to\infty$. Each is bounded by
$$
\begin{align}
&amp;\left|\,\int_0^{\pi/4}e^{iR^2(\cos(t)+i\sin(t))^2}R(-\sin(t)+i\cos(t))\,\mathrm{d}t\,\right|\\
&amp;\le\int_0^{\pi/4}e^{-R^2\sin(2t)}R\,\mathrm{d}t\\
&amp;\le\int_0^\infty e^{-R^24t/\pi}R\,\mathrm{d}t\\
&amp;=\frac\pi{4R}
\end{align}
$$
Thus, the integral along $[-\infty,\infty]$ equals the integral along $[-\infty,\infty]e^{i\pi/4}$.
Step 1 is to substitue $u=x^2$ giving 
$$
I = \int_{-\infty}^\infty \sin(x^2) dx = 2 \int_0^\infty \sin(x^2) dx = 
2 \int_0^\infty  \sin u \frac{du}{2\sqrt{u}}= \int_0^\infty   \frac{\sin u}{\sqrt{u}} du
$$
The next step is to recognize this related to Fresnel's sine integral 
$$
S(x) = \frac{1}{\sqrt{2\pi}}\int_0^x   \frac{\sin t}{\sqrt{t}} dt
$$
The third step is to notice that an asymptotic form for $S(x)$ is
$$
S(x) = \frac{1}{2} - \frac{1}{\sqrt{2\pi}x}\cos^2 x + O\left( \frac{1}{x^2} \right)
$$
(I suppose that anybody who does not know this from early childhood should go back to reading Gradshteyn and Ryzhik each night until it puts you to sleep. ROTFL)

Taken to infinity, this gives $S(x) \rightarrow \frac{1}{2}$ so 
$$ I = \sqrt{2\pi} \frac{1}{2} = \sqrt{\frac{\pi}{2}}$$