This is part of a homework problem. I think I've got it right, but it isn't fitting into the next step, so wanted to check this one.
Question: What is $E(e^{rX^2})$ when $X$ is $N(0,\sigma^2)$?
My answer:
$E(e^{rX^2})=\int_{-\infty}^{\infty}{\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{x^2}{\sigma^2}}}e^{rx^2}dx=\frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^{\infty}{e^{-x^2(\frac{1}{2\sigma^2}-r)}}dx$
The term inside the integral is just the main part of the formula for a cdf for a normal distribution with standard deviation $\gamma$ where $\frac{1}{2\gamma^2}=\frac{1}{2\sigma^2}-r=\frac{1-2r\sigma^2}{2\sigma^2}$ so it has area $\frac{\sqrt{2\pi\sigma^2}}{\sqrt{1-2r\sigma^2}}$
So, overall:
$E(e^{rX^2})=\frac{1}{\sqrt{2\pi\sigma^2}}\frac{\sqrt{2\pi\sigma^2}}{\sqrt{1-2r\sigma^2}}=\frac{1}{\sqrt{1-2r\sigma^2}}$
Is this right?