How can I evaluate $$I=\int_{0}^{\infty}{e^{-ax^2}\cos(3x)}\, dx$$ I tried integrating by parts but it only leads to stuff like $I=I$
-
1Note that $\cos x = \operatorname{Re} e^{ix}$ for real $x$ – anomaly Oct 16 '22 at 23:18
-
1Does this answer your question? Gaussian-like integral : $\int_0^{\infty} e^{-x^2} \cos( a x) \ \mathrm{d}x$ – metamorphy Oct 17 '22 at 02:26
2 Answers
$$ \begin{array}{rl} \int_0^{\infty} e^{-a x^2} \cos 3 x d x & =\operatorname{Re}\left[\int_0^{\infty} e^{-a x^2} e^{3 x i} d x\right] \\ & =\operatorname{Re}\left[\int_0^{\infty} e^{-a x^2+3 x i} d x\right] \\ & =\operatorname{Re}\displaystyle \left[\int_0^{\infty} e^{-\left(\sqrt{a} x+\frac{3 i}{2 \sqrt{a}}\right)^2-\frac{9}{4 a}} d x\right]\\& =\displaystyle \operatorname{Re}\left[\frac{e^{-\frac{9}{4 a}}}{\sqrt{a}} \int_0^{\infty} e^{-\left(\sqrt{a} x+\frac{3 i}{2 \sqrt{a}}\right)^2} d(\sqrt{a} x)\right]\\& =\frac{e^{-\frac{9}{4 a}}}{\sqrt{a}} \cdot \frac{\sqrt{\pi}}{2}\\& \displaystyle =\frac{\sqrt{\pi}}{2 \sqrt{a} e^{\frac{9}{4 a}}} \end{array} $$

- 20,421
From probability theory, for $X\sim \mathcal{N}(0,\sigma^2)$, we have $$\varphi(t) = \frac{1}{\sqrt{2\pi}\sigma}\int_{-\infty}^{\infty} \cos(tx)e^{-x^2/(2\sigma^2)}\,dx = e^{-t^2\sigma^2/2}$$
Using symmetry, $$\frac{1}{\sqrt{2\pi}\sigma} \int_0^{\infty}\cos(tx)e^{-x^2/(2\sigma^2)}\,dx = \frac{1}{2}e^{-t^2\sigma^2/2}$$ So just plug in appropriate value of $\sigma$ and $t=3$, then do some rearranging to get your answer.
You can find the derivation of the characteristic function of a normal distribution in any probability text.

- 1,679