# Integral of $\cos(x)\exp(-x^2/2\sigma^2)$

I have to evaluate $<cos(x)>$ with $x$ distributed according to $Q^{-1}e^-{\frac{x^2}{2\sigma^2}}$.

I have gone this far:

$$<cos(x)>=\frac{\int\limits_{-\infty}^\infty \cos (x) Q^{-1}e^{-\frac{x^2}{2\sigma^2}} \mathrm{d}x}{\int\limits_{-\infty}^\infty Q^{-1}e^{-\frac{x^2}{2\sigma^2}}\mathrm{d}x}=\sigma\sqrt{2\pi}\int\limits_{-\infty}^\infty \cos (x) e^{-\frac{x^2}{2\sigma^2}}\mathrm{d}x$$

How to deal with this integral? I considered partial integration, but that seems impossible because I would have to evaluate $\cos(x)$ at infinity.

-

Since $\sin(x)$ is an odd function, we have $\int_{-\infty}^{\infty}\sin(x)\exp\{-\frac{x^2}{2\sigma^2}\}dx = 0$. Therefore, after simple algebra
$$\int_{-\infty}^{\infty}\cos(x)\exp\{-\frac{x^2}{2\sigma^2}\}dx = \int_{-\infty}^{\infty}\exp\{i x\}\exp\{-\frac{x^2}{2\sigma^2}\}dx \\ = e^{-\frac{\sigma^2}{2}} \int_{-\infty}^{\infty}\exp\{-\frac{1}{2\sigma^2}(x-i\sigma)^2\}dx\\ = \sqrt{2\pi}\sigma e^{-\frac{\sigma^2}{2}}$$