How to integrate $e^{-\frac{x^2}{4}}\cos(x)$

179 Views Asked by At

I have the following integral I'm trying to solve: $$\int_0^\infty e^{-\frac{x^2}{4}}\cos(x)\,\mathrm{d}x$$ how to solve this, please help me.

1

There are 1 best solutions below

0
On

Since the integrand is symmetric in $x$, $$ I=\frac{1}{2}\int_{-\infty}^{\infty}e^{-x^2/4}\cos (x) dx=\frac{1}{2}{\text{Re}}\int_{-\infty}^{\infty}\exp\left(-\frac{1}{4}x^2+ix\right)dx. $$ Since $$ \int_{-\infty}^{\infty}\exp\left(-\frac{1}{4}x^2+ix\right)dx=\int_{-\infty}^{\infty}\exp\left(-\frac{1}{4}(x-2i)^2-1\right)dx=\frac{1}{e}\int_{-\infty}^{\infty}e^{-y^2/4}dy=\frac{1}{e}(2\sqrt{\pi}), $$ after making the substitution $y=x-2i$, you get $$ I=\frac{\sqrt{\pi}}{e}. $$