Integrate $e^{iz^2}$ around the contour y shown in Figure below to obtain the Fresnel
integrals:
$$
\int_0^\infty \cos(x^2)\,dx = \int_0^\infty \sin(x^2)\,dx=\frac{\sqrt{2\pi}}{4}.
$$
(Use that $\int_0^\infty e^{-x^2}\,dx =\frac{\sqrt{\pi}}{2}$).
$z=x$, $0\le x\le R$; $z=Re^{i\theta}$, $0\le \theta\le \frac{\pi}{4}$; $z=te^{i\pi/4}$, $R\ge t\ge 0$; $R\to \infty$.