2

I am wondering if there is a residue-trick for computing $\int_{0}^{\infty}e^{-x^{2}}\cos(x^{2})\mathrm{d}x$ without having to go through computing the Gaussian residue integral.

For practice here is the Gaussian way, any corrections are appreciated. We will prove $\int_{\mathbb{R}} e^{-x^{2}c}\mathrm{d}x=\sqrt{\frac{\pi }{c}}$ with $\text{Re}(c)>0$.

Step 1

Following the same procedure as in http://www.math.uconn.edu/~kconrad/blurbs/analysis/gaussianintegral.pdf

we need a $\tau$ so $e^{2\tau^{2}c}=1$ to ensure $d(0)=d(\tau)$ and thus $f(z)-f(z+\tau)=e^{-z^{2}c}$. Thus, $$\tau=\sqrt{\frac{\pi }{2c}}(1+i).$$

So $e^{-\tau^{2}c}=-1$ and thus $f(z)=\dfrac{e^{-z^{2}c}}{1+e^{-2c\tau z}}$.

Step 2

Because $\tau=\sqrt{\frac{\pi }{2c}}(1+i)=\sqrt{\frac{\pi}{r}}\cos(\frac{\pi }{4}-\frac{\theta}{2})+i\sqrt{\frac{\pi}{r}}\sin(\frac{\pi }{4}-\frac{\theta}{2})$, where $c=re^{i\theta}$, for the contour we choose height $ib=i\sqrt{\frac{\pi}{r}}\sin(\frac{\pi }{4}-\frac{\theta}{2})$. Then the pole $\frac{\tau}{2}$ is inside it.

Step 3

The residue yields

$$\int_{\text{Rectangle}} \dfrac{e^{-z^{2}c}}{1+e^{-2c\tau z}}\mathrm{d}z=2\pi i \lim_{z\to \frac{\tau}{2}} \dfrac{e^{-z^{2}c}}{(-2c\tau)e^{-2c\tau z}}=\sqrt{\frac{\pi }{c}},$$

which is what we expected.

Step 4

On the other hand, $$\int_{\mathbb{R}} f(x)\mathrm{d}x-\int_{-\infty+ib}^{\infty+ib}f(z)\mathrm{d}z=\int_{\mathbb{R}} f(x)\mathrm{d}x-\int_{-\infty}^{\infty}f(x+ib)\mathrm{d}x$$

by rewriting $ib=\tau-\text{Re}(\tau)$ and translating we obtain

$$=\int_{\mathbb{R}} f(x)\mathrm{d}x-\int_{-\infty}^{\infty}f(x+\tau)\mathrm{d}x=\int e^{-x^{2}c}\mathrm{d}x.$$

Therefore, in our case $c=1\pm i$ and in turn

$$\int_{0}^{\infty}e^{-x^{2}}\cos(x^{2})\mathrm{d}x=\frac{1}{4}\left(\sqrt{\frac{\pi }{1+i}}+\sqrt{\frac{\pi }{1-i}})=\frac{\sqrt{\pi}}{2\sqrt[4]{2}}(\cos\left(\frac{\pi}{8}\right)\right).$$

  • The substitution $y=x^2$ turns it into the Mellin transform $$\mathcal{M}_y\left\frac{1}{2}, \cos(y), e^{-y}\right=\int\limits_0^{\infty} \frac{1}{2}, \cos(y), e^{-y}, y^{s-1} , dy=2^{-\frac{s}{2}-1} \cos\left(\frac{\pi s}{4}\right), \Gamma(s),,\quad\Re(s)>0$$ evaluated at $s=\frac{1}{2}$ which might lead to a different approach. – Steven Clark Apr 04 '25 at 02:25

1 Answers1

2

A way simpler approach: $$ \int_{0}^{+\infty}e^{-x^2}\cos(x^2)\,dx = \text{Re}\int_{0}^{+\infty}e^{(i-1)x^2}\,dx =\text{Re}\left(\frac{\sqrt{\pi}}{2\sqrt{1-i}}\right).$$ $\cos\frac{\pi}{8}=\frac{1}{2}\sqrt{2+\sqrt{2}}$ appears since $1-i=\sqrt{2}\cdot e^{-\pi i/4}$.

Jack D'Aurizio
  • 361,689
  • not really, you assumed what I proved. My question is silly because a simpler way, would imply a simpler way for computing the Gaussian integral. – user133100 Apr 14 '16 at 00:12