I need to compute a definite integral of the form:
$$ \int_{-\infty}^\infty e^{-a(x-\mu)^2} \cos(b x) dx \qquad \text{with } a > 0. $$
I understand that for $\mu = 0$, this integral has a well-known solution (see here). However, any chance that the expression above has a closed-form solution too?
Put $y=x-\mu$ and use the identity $\cos (by+b\mu)=\cos (by) \cos (b\mu)-\sin (by) \sin (b\mu)$.
Note: $\int_0^{\infty} e^{-x^2} \sin ( a x) \ \mathrm{d}x$ can also be evaluated by the method in the link you gave.