10

I want to solve the following integral:

$$\int_0^{\infty} \!\! \operatorname{e}^{-x^2}\!\cos(x^2) \, \operatorname{d}\!x$$

I have seen this in a section about residues, so my guess is that I would need to compute an appropriate contour integral. However, it does not seems to be like the usual forms of integrals that can be computed using an appropriate complex integral. So I don't know what to do. Any help would be appreciated. Thanks!

Ron Gordon
  • 138,521
Gary
  • 391
  • 2
    $\int_{0}^{+\infty} e^{-x^{2}}\cos(x^{2}) : dx = \mathrm{Re} \left( \int_{0}^{+\infty} e^{-x^{2}}e^{ix^{2}} ; dx \right)$ might help. – pitchounet Jul 30 '13 at 20:28
  • 1
    Complementing jibounet's idea, consider $\displaystyle \int_0^\infty e^{-ax^2},dx$ and do $u=x\sqrt{a}.$ Recover that classic integral, take the real part and you are done. – Ian Mateus Jul 30 '13 at 20:39
  • I'll just go out on a limb and say that I don't see how residues are going to help, since there is no singularity in the integrand. The only way I could see that residues might be of use is if you can do some sort of transformation to bring the singularity at infinity into some other location and then do an integral around that location somehow. – bob.sacamento Jul 30 '13 at 20:40

1 Answers1

14

As suggested in the comment, write the integral as

$$\Re\int_0^{\infty} dx \, e^{-(1-i) x^2} = \Re\int_0^{\infty} dx \, e^{-\sqrt{2} e^{-i \pi/4} x^2}$$

Now consider the following contour integral:

$$\oint_C dz \, e^{-\sqrt{2} e^{-i \pi/4} z^2}$$

where $C$ is a circular sector of radius $R$ that opens at an angle of $\pi/8$ with respect to the positive real axis. Note that we will not be using residues in computing the integral, because there are no poles within the contour $C$. Rather, we will be evaluating the integral over the contour itself and using Cauchy's theorem.

The contour integral over $C$ is equal to

$$\int_0^R dx \, e^{-\sqrt{2} e^{-i \pi/4} x^2} + i R \int_0^{\pi/8} d\theta \, e^{i \theta} \, \exp{\left[-\sqrt{2} R^2 e^{-i \pi/4 + 2 \theta}\right]}\\+e^{i \pi/8} \int_R^0 dt \,e^{-\sqrt{2} t^2} $$

Note that the second integral vanishes as $R \to \infty$. Its magnitude is bounded by

$$R \int_0^{\pi/8} d\theta \, e^{-\sqrt{2} R^2 \sin{(\pi/4+2 \theta)}} \le R \int_0^{\pi/8} d\theta \, e^{-\sqrt{2} R^2/2} e^{-4 \sqrt{2} R^2 \theta/\pi} \le \frac{\pi}{4 \sqrt{2} R} e^{-\sqrt{2} R^2/2}$$

as $R \to \infty$. Further, the contour integral is zero by Cauchy's theorem (no poles in the contour). Therefore,

$$\int_0^{\infty} dx \, e^{-(1-i) x^2} = e^{i \pi/8} \int_0^{\infty} dt \,e^{-\sqrt{2} t^2} = \frac12 e^{i \pi/8} \sqrt{\frac{\pi}{\sqrt{2}}}$$

Therefore, taking real parts, we get

$$\int_0^{\infty} dx \, e^{-x^2} \cos{x^2} = \frac{\sqrt{\pi}}{2} \frac{\cos{(\pi/8)}}{2^{1/4}} = \frac{\sqrt{\pi}}{4} \sqrt{1+\sqrt{2}}$$

Ron Gordon
  • 138,521
  • Hey @Ron Gordan , nice solution ! . Have you seen my integral http://math.stackexchange.com/questions/455651/contour-integration-of-a-function-with-two-branch-points – Zaid Alyafeai Jul 30 '13 at 22:21
  • 1
    @ZaidAlyafeai: thanks! I looked and then forgot it. I will have another look this evening. – Ron Gordon Jul 30 '13 at 22:27