Proof only by transformation that : $ \int_0^\infty \cos(x^2) dx = \int_0^\infty \sin(x^2) dx $

This was a question in our exam and I did not know which change of variables or trick to apply

How to show by inspection ( change of variables or whatever trick ) that

$$ \int_0^\infty \cos(x^2) dx = \int_0^\infty \sin(x^2) dx \tag{I} $$

Computing the values of these integrals are known as routine. Further from their values, the equality holds. But can we show equality beforehand?

Note: I am not asking for computation since it can be found here and we have as well that, $$ \int_0^\infty \cos(x^2) dx = \int_0^\infty \sin(x^2) dx =\sqrt{\frac{\pi}{8}}$$ and the result can be recover here, Evaluating $\int_0^\infty \sin x^2\, dx$ with real methods?.

Is there any trick to prove the equality in (I) without computing the exact values of these integrals beforehand?


Solution 1:

<Here is what I found

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 us show that $I> 0$ and $J> 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}{>0}$$ 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}{>0}$$

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 $$\color{blue}{I_tJ_t = \frac\pi8\frac{1}{t^2+1}}$$ from which one get the following explicit value of $$\color{red}{I^2=J^2= IJ = \lim_{t\to 0}I_tJ_t =\frac{\pi}{8}}$$

See also here for more on (The Fresnel Integrals Revisited)

Solution 2:

Note by change of variable it suffices to show

$$\int^\infty_0\frac{\cos(x)}{\sqrt{x}}\,dx =\int^\infty_0\frac{\sin(x)}{\sqrt{x}}\,dx $$

Consider the following function

$$f(z)=z^{-1/2}\,e^{iz}$$

Where we choose the principal root for $ z^{-1/2}=e^{-1/2\log(z)}$. By integrating around the following contour

enter image description here $$\int_{C_r}f(z)\,dz+\int_{r}^R f(x)\,dx+\int_{\gamma}f(z)\,dz+\int^{iR}_{ir}f(x)\,dx = 0$$

Taking the integral around the small quarter circle with $r\to 0$ $$\left| \int_{C_r}f(z)\,dz\right|\leq \left|\sqrt{r}\int^{\pi/2}_{0}e^{it/2} e^{rie^{it}}\,dt\right| \leq \sqrt{r}\int^{\pi/2}_{0}\left|e^{-r\sin(t)}\right|\,dt\sim 0$$

On $\gamma(t)=(1-t)R+iRt$ where $0\leq t \leq 1$

$$\left|\int_{\gamma}f(z)\,dz\right| = \left| R(i-1)\int^1_0e^{-1/2\log(R(1-t)+iRt)}e^{i(1-t)R-Rt}\,dt\right| \\ \leq \frac{\sqrt{2}}{\sqrt{R}} \int^1_0 \frac{e^{-Rt}}{\sqrt[4]{(1-t)^2+t^2}}\,dt$$

Hence we have

$$\left|\int_{\gamma}f(z)\,dz\right| \leq \frac{\sqrt{2}}{\sqrt{R}} \int^1_0 e^{-Rt}\,dt=\frac{\sqrt{2}}{R\sqrt{R}}\left(1-e^{-R}\right)\sim_{\infty}0$$

Finally what is remaining when $r\to 0$ and $R \to \infty$

$$\int^\infty_0 \frac{e^{ix}}{\sqrt{x}}\,dx =i \int^{\infty}_{0}(ix)^{-1/2}e^{-x}\,dx$$

Note that $i^{-1/2}=e^{-i\pi/4}$

$$\int^\infty_0\frac{e^{ix}}{\sqrt{x}}\,dx = ie^{-i\pi/4}I = \frac{I}{\sqrt{2}}+i\frac{I}{\sqrt{2}}$$

By equating the real part with the real part and the imaginary part with the imaginary part we reach $$\int^\infty_0\frac{\cos(x)}{\sqrt{x}}\,dx =\int^\infty_0\frac{\sin(x)}{\sqrt{x}}\,dx = \frac{I}{\sqrt{2}} $$

Although $I$ is easy to evaluate using the gamma function, we didn't have to evaluate it to show equivalence.

Solution 3:

Since $e^{iz^2}$ is entire, by Cauchy's Integral Theorem, we have $$ \int_0^R e^{iz^2}\,\mathrm{d}z =\int_0^{(1+i)R} e^{iz^2}\,\mathrm{d}z+\int_{(1+i)R}^R e^{iz^2}\,\mathrm{d}z\tag1 $$ where, using the parameterization $z=R(1+it)$, we have the estimate $$ \begin{align} \left|\,\int_{(1+i)R}^R e^{iz^2}\,\mathrm{d}z\,\right| &\le R\int_0^1e^{-2R^2t}\,\mathrm{d}t\\ &\le\frac1{2R}\tag2 \end{align} $$ and using the reparameterization $z\mapsto(1+i)z$, $$ \begin{align} \int_0^{(1+i)R}e^{iz^2}\,\mathrm{d}z &=(1+i)\int_0^Re^{-2z^2}\,\mathrm{d}z\tag3 \end{align} $$ Combining $(1)$, $(2)$, and $(3)$, while letting $R\to\infty$, validates the following change of variables: $\boldsymbol{\color{#C00}{z\mapsto(1+i)z}}$. $$ \begin{align} \int_0^\infty\left(\cos\left(z^2\right)+i\sin\left(z^2\right)\right)\mathrm{d}z &=\boldsymbol{\color{#C00}{\int_0^\infty e^{iz^2}\,\mathrm{d}z}}\\ &\boldsymbol{\color{#C00}{=(1+i)\int_0^\infty e^{-2z^2}\,\mathrm{d}z}}\tag4 \end{align} $$ Since the real and imaginary parts of $(4)$ are the same, we get that $$ \int_0^\infty\cos\left(z^2\right)\,\mathrm{d}z =\int_0^\infty\sin\left(z^2\right)\,\mathrm{d}z\tag5 $$

Solution 4:

This is an extended comment not a proper answer.

The question can be rewritten as follows: to show that $$\tag{1} \Re \int_{-\infty}^\infty e^{-i|\xi|^2}\, d\xi + \Im \int_{-\infty}^\infty e^{-i|\xi|^2}\, d\xi=0,$$ where the integral is in the principal-value sense. This integral arises in PDEs as evaluation at the spatial origin of the fundamental solution to the Schrödinger equation. More precisely, if $E=E(t, \mathbf x)$ solves $$\tag{2} \begin{cases} (i\partial_t + \Delta) E(t, \mathbf x)=0, & t\in \mathbb R, \mathbf x\in\mathbb R^n\\ E(0, \mathbf x)=\delta(\mathbf x)\end{cases}$$ (where $\delta$ is the Dirac distribution) then the Fourier transform of $E(t, \cdot)$ is $$ \hat{E}(t,\boldsymbol \xi)=\int_{\mathbb R^n} e^{-i\mathbf x\cdot \boldsymbol\xi}E(t, \mathbf x)\, d\mathbf x= e^{-it|\boldsymbol\xi|^2},\quad \boldsymbol\xi\in\mathbb R^n.$$ Now we observe that, for all suitable function $u$, we have that $\int_{\mathbb R^n} \hat{u}(t,\boldsymbol \xi)\, d\boldsymbol\xi=u(t, \mathbf 0)$. This gives a reformulation of problem (1) that generalizes to arbitrary dimension:

Is it true that $$\tag{3}\Re E(1,\mathbf 0)+ \Im E(1, \mathbf 0) =0, $$ where $E$ is the solution to (2)?

I found it surprising that the answer is affirmative if and only if $n=1\mod 4$: this follows from the explicit formula $$E(1,\mathbf 0)=\lim_{R\to \infty}\int_{[-R, R]^n}e^{-i|\boldsymbol \xi|^2}\, d\boldsymbol\xi = \frac{\pi^\frac{n}{2}}{i^\frac{n}{2}}=\pi^{\frac n 2}e^{-i \frac{n}{4}\pi}.$$

Conclusion. The OP asks for a solution that relies purely on change of variable in the integrals. In view of the reformulation (3), such changes of variable correspond to the symmetries of the PDE (2). These symmetries are dimension-independent, but the solution to the problem (3) is dependent on the dimension. Therefore, it seems to me that this approach is unlikely to work.