TITLE: More 'conceptual' reason of why $\int_{-\infty}^{+\infty}\text{sin}(x^2) = \int_{-\infty}^{+\infty}\text{cos}(x^2)$
QUESTION [8 upvotes]: In our complex analysis course, as an application of the residue theorem and some clever contour integration, we computed the following integrals:

$$\int_{-\infty}^{\infty}\text{sin}(x^2)\,\mathrm{d}x = \sqrt{\frac{\pi}{2}}$$ 
  And 
  $$\int_{-\infty}^{\infty}\text{cos}(x^2)\,\mathrm{d}x = \sqrt{\frac{\pi}{2}}$$

I noted that these two values are equal (not a very unusual observation). However, I was wondering if we could deduce just this result (i.e. the fact that they are equal) without actually computing them.
The computation we made did not make this clear at all. It just happened to be a consequence of our calculations. So does anyone know a more conceptual reason?
I'm not sure wheter this exists or should exist, but I had the following (more trivial) example in mind:
$$ \int_{0}^{\pi/2} \sin{x} \,\mathrm{d}x = \int_{0}^{\pi/2} \cos{x} \,\mathrm{d}x $$
Which can be proven by using a substitution $u = \pi/2-x$ and the fact that $\text{sin}(\pi/2-x) = \cos{x}$
Many thanks in advance.

REPLY [3 votes]: Employing the change of variables $2u =x^2$ We get $$I=\int_0^\infty \cos(x^2) dx =\frac{1}{\sqrt{2}}\int^\infty_0\frac{\cos(2x)}{\sqrt{x}}\,dx$$ $$ J=\int_0^\infty \sin(x^2) dx=\frac{1}{\sqrt{2}}\int^\infty_0\frac{\sin(2x)}{\sqrt{x}}\,dx $$

Summary: We will prove that  $J\ge 0$ and $I\ge 0$  so that, proving that $I=J$ is equivalent to  $$ \color{blue}{0= (I+J)(I-J)=I^2 -J^2 =\lim_{t \to 0}I_t^2-J^2_t}$$
  Where, $$I_t = \int_0^\infty e^{-tx^2}\cos(x^2) dx~~~~\text{and}~~~ J_t = \int_0^\infty e^{-tx^2}\sin(x^2) dx$$
  $t\mapsto I_t$ and $t\mapsto J_t$ are clearly continuous due to the present of the integrand factor $e^{-tx^2}$.

However, By Fubini we have,
\begin{split}
I_t^2-J^2_t&=& \left(\int_0^\infty e^{-tx^2}\cos(x^2) dx\right)  \left(\int_0^\infty e^{-ty^2}\cos(y^2) dy\right) -  \left(\int_0^\infty e^{-tx^2}\sin(x^2) dx\right)  \left(\int_0^\infty e^{-ty^2}\sin(y^2) dy\right) \\
&=& \int_0^\infty \int_0^\infty e^{-t(x^2+y^2)}\cos(x^2+y^2)dxdy\\
&=&\int_0^{\frac\pi2}\int_0^\infty re^{-tr^2}\cos r^2 drd\theta\\&=&\frac\pi4 Re\left( \int_0^\infty \left[\frac{1}{i-t}e^{(i-t)r^2}\right]' dr\right)\\
&=&\color{blue}{\frac\pi4\frac{t}{1+t^2}\to 0~~as ~~~t\to 0}
\end{split}
To end the proof: Let show that $I\ge 0$ and $J\ge 0$. Performing an integration by part we obtain
$$J = \frac{1}{\sqrt{2}} \int^\infty_0\frac{\sin(2x)}{x^{1/2}}\,dx=\frac{1}{\sqrt{2}}\underbrace{\left[\frac{\sin^2 x}{x^{1/2}}\right]_0^\infty}_{=0} +\frac{1}{2\sqrt{2}} \int^\infty_0\frac{\sin^2 x}{x^{3/2}}\,dx\color{red}{\ge0}$$
Given that $\color{red}{\sin 2x= 2\sin x\cos x =(\sin^2x)'}$. Similarly we have,
$$I =  \frac{1}{\sqrt{2}}\int^\infty_0\frac{\cos(2x)}{\sqrt{x}}\,dx=\frac{1}{2\sqrt{2}}\underbrace{\left[\frac{\sin 2 x}{x^{1/2}}\right]_0^\infty}_{=0} +\frac{1}{4\sqrt{2}} \int^\infty_0\frac{\sin 2 x}{x^{3/2}}\,dx\\=
 \frac{1}{4\sqrt{2}}\underbrace{\left[\frac{\sin^2 x}{x^{1/2}}\right]_0^\infty}_{=0} +\frac{3}{8\sqrt{2}} \int^\infty_0\frac{\sin^2 x}{x^{5/2}}\,dx\color{red}{\ge0}$$

Conclusion:$I^2-J^2 =0$, $I>0$ and $J>0$ impliy $I=J$. Note that we did not attempt to compute neither the value of$I$ nor $J$.

Extra-to-the answer However using similar technique in above prove one can easily arrives at the following $$I_tJ_t = \frac\pi8\frac{1}{t^2+1}$$ from which one get explicit value of $$I^2=J^2= IJ = \lim_{t\to 0}I_tJ_t =\frac\pi8$$