Question: Given that $X$ is a random variable following normal distribution with mean $0$ and variance $\sigma^2.$ What is the expected value of $\cos(X)?$
Recall that the probability density function of a normal distribution with mean $\mu$ and variance $\sigma^2$ is $$f(x) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{1}{2} \left( \frac{x-\mu}{\sigma} \right)^2 }.$$ So the required expected value is $$E[\cos(X)] = \frac{1}{\sqrt{2\pi \sigma^2}} \int_{-\infty}^\infty \cos (x)e^{-\frac{1}{2} \left( \frac{x}{\sigma} \right)^2 }dx.$$
However, I fail to evaluate the integral by hand.