TITLE: Calculate trigonometric integral $ \int_{-\infty}^{\infty}{\sin(x^2)}\,dx$
QUESTION [7 upvotes]: 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?

REPLY [2 votes]: 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
&=\int_{-\infty}^\infty e^{ix^2}\,\mathrm{d}x\\
&=\frac{1+i}{\sqrt2}\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\\
&=(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}
&\left|\,\int_0^{\pi/4}e^{iR^2(\cos(t)+i\sin(t))^2}R(-\sin(t)+i\cos(t))\,\mathrm{d}t\,\right|\\
&\le\int_0^{\pi/4}e^{-R^2\sin(2t)}R\,\mathrm{d}t\\
&\le\int_0^\infty e^{-R^24t/\pi}R\,\mathrm{d}t\\
&=\frac\pi{4R}
\end{align}
$$
Thus, the integral along $[-\infty,\infty]$ equals the integral along $[-\infty,\infty]e^{i\pi/4}$.