Covariance between a normally distributed variable and its exponent Given  $X \sim \mathcal{N}(\mu,\,\sigma^{2})$, what is the covariance between $X$ and $e^X$?
 A: First solving the following integral by completing the square (4th equality) and recognising the resulting integral as the expected value of a normal variate with an expected value of $\mu+\sigma^2$ (last equality),
\begin{align}
E(Xe^X)
&=\int_{-\infty}^\infty xe^x\frac1{\sqrt{2\pi}\sigma}e^{-\frac1{2\sigma^2
}(x-\mu)^2}dx
\\&=\int_{-\infty}^\infty x\frac1{\sqrt{2\pi}\sigma}e^{-\frac1{2\sigma^2
}(x^2-2\mu x+\mu^2-2\sigma^2 x)}dx
\\&=e^{-\frac{\mu^2}{2\sigma^2}}\int_{-\infty}^\infty x\frac1{\sqrt{2\pi}\sigma}e^{-\frac1{2\sigma^2
}[x^2-2(\mu+\sigma^2)x]}dx
\\&=e^{-\frac{\mu^2}{2\sigma^2}}\int_{-\infty}^\infty x\frac1{\sqrt{2\pi}\sigma}e^{-\frac1{2\sigma^2
}[(x-\mu-\sigma^2)^2-(\mu+\sigma^2)^2]}dx
\\&=e^{-\frac{\mu^2-(\mu+\sigma^2)^2}{2\sigma^2}}\int_{-\infty}^\infty x\frac1{\sqrt{2\pi}\sigma}e^{-\frac1{2\sigma^2
}(x-\mu-\sigma^2)^2}dx
\\&=e^{\mu+\frac{\sigma^2}2}(\mu+\sigma^2),
\end{align}
and
\begin{align}
\operatorname{Cov}(X,e^X)&=E(Xe^X)-EXEe^X
\\&=e^{\mu+\frac{\sigma^2}2}(\mu+\sigma^2)-\mu e^{\mu+\frac{\sigma^2}2}
\\&=e^{\mu+\frac{\sigma^2}2}\sigma^2.
\end{align} 
