# More 'conceptual' reason of why $\int_{-\infty}^{+\infty}\text{sin}(x^2) = \int_{-\infty}^{+\infty}\text{cos}(x^2)$

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}$

• What happens if you do the same substitution in the integrals above? Jan 20, 2016 at 20:35

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$$

For complex $a$ define $T_{a^2} = \frac{1}{\sqrt{\pi}}\int_{-\infty}^{+\infty} \exp(-a^2 x^2) dx$ . Your question is why the complexified Fresnel integral $T_\sqrt{i} = \sqrt{i}$ points along the line Re(z)=Im(z). Standard Gaussian is $T_1=1$.

${T_a}/a$ is the same as $T_1$ with a deformation of contour by rotating the axis of integration to the line $(-a\infty,a \infty)$. For $a^2$ with positive real part this deformation does not change the integral. The Fresnel integral is the boundary case $a=\sqrt{i}$ where the real part is $0$, so there are questions of convergence to be addressed, but other than that the answer $T_a = a$ should continue analytically to $a=\sqrt{i}$. The difficulty is making this rigorous is in justifying the convergence of the integral to the expected limit as $a$ approaches the point of interest, but not in understanding what that limit should be (which has equal real and imaginary parts).