Evaluate \(\int_{0}^{\infty} \mathrm{e}^{-ax^{2}} \cos(bx) \mathrm{d}x\)

How to evaluate
I = \int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}} \cos(bx) \mathrm{d}x
was a question posed at Mathematics Stack Exchange. I encourage readers to follow the link to see solutions that use a rectangular contour to evaluate this integral as an alternative method to the one presented below.

I_{1} &= \int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}} \mathrm{e}^{ibx} \mathrm{d}x
= \int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}+ibx} \mathrm{d}x \\
&= \mathrm{e}^{-b^{2}/4a} \int\limits_{0}^{\infty} \mathrm{e}^{-a(x-ib/2a)^{2}} \mathrm{d}x \\
Here we completed the square and note that \(\mathrm{Re}\,I_{1} = I\).

Consider the indefinite integral
\int \mathrm{e}^{-a(x-ib/2a)^{2}} \mathrm{d}x
&= \int \mathrm{e}^{-ay^{2}} \mathrm{d}y \\
&= \frac{1}{\sqrt{a}} \int \mathrm{e}^{-z^{2}} \mathrm{d}z = \frac{1}{2} \sqrt{\frac{\pi}{a}} \mathrm{erf}(z) \\
&= \frac{1}{2} \sqrt{\frac{\pi}{a}} \mathrm{erf}\left(x\sqrt{a} – \frac{ib}{2\sqrt{a}}\right)
we used the substitutions, \(y=x- \frac{ib}{2a}\) and \(z^{2} = ay^{2}\).

Examining the error function expression, we have
\lim_{x \to 0} \mathrm{erf}\left(x\sqrt{a} – \frac{ib}{2\sqrt{a}}\right)
= \mathrm{erf}\left(- \frac{ib}{2\sqrt{a}}\right)
= -i\,\mathrm{erfi}\left(\frac{b}{2\sqrt{a}}\right)
which is a pure imaginary quantity with the assumption that all of the variables in the argument of the imaginary error function are real and \(a \gt 0\). We also have
\lim_{x \to \infty} \mathrm{erf}\left(x\sqrt{a} – \frac{ib}{2\sqrt{a}}\right) = 1

Using equations \eqref{eq:20161022-4} and \eqref{eq:20161022-5} in equation \eqref{eq:20161022-3} we obtain
\mathrm{Re}\left(\int\limits_{0}^{\infty} \mathrm{e}^{-a(x-ib/2a)^{2}} \mathrm{d}x \right) = \frac{1}{2} \sqrt{\frac{\pi}{a}}

Combining equations \eqref{eq:20161022-6} and \eqref{eq:20161022-2} yields our final result
\int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}} \cos(bx) \mathrm{d}x = \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{e}^{-b^{2}/4a}

Leave a Reply

Your email address will not be published. Required fields are marked *