Evaluating integral on an even function I want to evaluate
$$
\int_{-\infty}^\infty a e^{-bt^2} \cos(\omega t) dt
$$
With Euler's identity
$$
\int_{-\infty}^\infty a e^{-bt^2} \cos(\omega t) dt = \int_{-\infty}^\infty a e^{-bt^2} \big\{ {{e^{i \omega t} + e^{-i \omega t}} \over 2}\big\} dt
$$
$$
= \int_{-\infty}^\infty \bigg({a e^{-bt^2} e^{i \omega t} \over 2} + {a e^{-bt^2} e^{-i \omega t} \over 2}\bigg)\; dt
$$
$$
= {a \over 2} \int_{-\infty}^\infty (e^{-bt^2+i \omega t} + e^{-bt^2-i \omega t})\; dt
$$
$$
= {a \over 2} \bigg({e^{-bt^2+i \omega t} \over -2bt+i \omega}\bigg|_{-\infty}^\infty  + {e^{-bt^2-i \omega t} \over {-2bt-i \omega}}\bigg|_{-\infty}^\infty\bigg)
$$
This leads to problems with infinities.
 A: Let's define the function $I(\xi) =
\int_{-\infty}^{\infty} e^{- x^2}\cos(2 \xi x)\, \mathrm{d}x $. Using Feynman's trick we see that
\begin{align}
I'(\xi) &=\int_{-\infty}^{\infty} \left[-2xe^{- x^2}\right]\sin(2 \xi x)\, \mathrm{d}x\overset{\text{I.B.P.}}{=} -2\xi \underbrace{\int_{-\infty}^{\infty} e^{- x^2}\cos(2 \xi x)\, \mathrm{d}x}_{\color{blue}{I(\xi)}}
\end{align}
So we get
$$
\frac{\mathrm{d} I}{\mathrm{d}\xi} = -2\xi I \mathbin{\color{purple}{\implies}} \int_0^{\xi}\frac{1}{I}\frac{\mathrm{d} I}{\mathrm{d}\widetilde{\xi}} \mathrm{d} \widetilde{\xi} = \int_0^{\xi}-2 \widetilde{\xi}\, \mathrm{d}\widetilde{\xi}  \mathbin{\color{purple}{\implies}} \ln\Bigg|\frac{I(\xi)}{I(0)}\Bigg| = -\xi^2  \mathbin{\color{purple}{\implies}} I(\xi) = I(0)e^{-\xi^2}
$$
But since from our original defintion we know $I(0)  =$
$\int_{-\infty}^{\infty} e^{- x^2}\, \mathrm{d}x  = \sqrt{\pi}$ we can conclude
$$
\int_{-\infty}^{\infty} e^{- x^2}\cos(2 \xi x)\, \mathrm{d}x  = \sqrt{\pi} e^{-\xi^2}
$$

Using the previous equation we can conclude your problem as follows:
\begin{align}
\int_{-\infty}^{\infty} a e^{-bt^2}\cos(\omega t) \,\mathrm{d}t & \overset{\color{blue}{\sqrt{b}t = x}}{=}\frac{a}{\sqrt{b}} \int_{-\infty}^{\infty} e^{-x^2}\cos\left(2 \frac{\omega}{2\sqrt{b}} x\right)\mathrm{d}x = \boxed{a \sqrt{\frac{\pi}{b}} e^{-\frac{\omega^2}{4b}}}
\end{align}
