# Integral $\frac{\sqrt{e}}{\sqrt{2\pi}}\int^\infty_{-\infty}{e^{-1/2(x-1)^2}dx}$ gives $\sqrt{e}$. How?

To calculate the expectation of $e^x$ for a standard normal distribution I eventually get, via exponential simplification:

$$\frac{\sqrt{e}}{\sqrt{2\pi}}\int^\infty_{-\infty}{e^{-1/2(x-1)^2}dx}$$

When I plug this into Wolfram Alpha I get $\sqrt e$ as the result. I'd like to know the integration step(s) or other means I could use to obtain this result on my own from the point I stopped. I am assuming that Wolfram Alpha "knew" an analytical solution since it presents $\sqrt e$ as a solution as well as the numerical value of $\sqrt e$. Thanks in advance!

• WolframAlpha only shows steps for indefinite integrals; you can often use these to derive a result on a definite integral. This particular function has no elementary anti-derivative, however. You have $\sqrt{e}$ times a normal distribution and the integral of the normal is well known to be 1. – Mark McClure May 31 '13 at 0:00
• Thanks for responding Mark. That actually helps. Since it started as $e^x$ multiplied by the normal probability density function, which must equal one, I should have known that once I got the $\sqrt{e}$ to pop out through simplification, all that was left was the pdf. Appreciate you helping me see that. – Joe May 31 '13 at 0:29

This is because $$\int_{\Bbb R} e^{-x^2}dx=\sqrt \pi$$
Note that your shift $x\mapsto x-1$ doesn't change the value of integral, while $x\mapsto \frac{x}{\sqrt 2}$ multiplies it by $\sqrt 2$, giving the desired result, that is,
$$\int_{\Bbb R} e^{-\frac 1 2(x-1)^2}dx=\sqrt {2\pi}$$