It is known that
$$
E(X) = \int_{-\infty}^{\infty}e^x\frac{1}{2\pi}e^{-0.5x^2}\; dx= e^{0.5}
$$
while
$$
E(Xe^X) = \int_{-\infty}^{\infty}xe^x\frac{1}{2\pi}e^{-0.5x^2}\; dx
$$
By integration by parts, I get $\displaystyle\left.xe^{0.5}\right|_{-\infty}^{\infty} - xe^{0.5}$, but I am stuck here. I suppose I cannot say the first part is $0$ as it is divergent?
2026-03-26 09:48:12.1774518492
On
Expected value of the random variable $Xe^X$ where $X\sim N(0,1)$
2.8k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
Ok, nobody, I will try with $\phi(x)=\frac{1}{2\pi}e^{-0.5x^2}$:
$\int_{-\infty}^{\infty}e^x((-x)\frac{1}{2\pi}e^{-0.5x^2})dx = [e^x \phi(x)]_{-\infty}^{\infty}-\int_{-\infty}^{\infty} e^x \phi(x) dx = 0 -\int_{-\infty}^{\infty} e^x \phi(x) dx = -e^{1/2}$
Similar to @StubbornAtoms solution, but the terms have all a meaning.
Denote the density of $X\sim N(0,1)$ by $\phi$, i.e., $$\phi(t)=\frac{1}{\sqrt{2\pi}}e^{-t^2/2}\,\qquad ,\, t\in\mathbb R$$
Then your first line should have read $$E\left[e^X\right]=\int_{-\infty}^\infty e^x \phi(x)\,dx=\sqrt e$$
To evaluate $E\left[Xe^X\right]$, keep in mind that $$\phi'(t)=-t\phi(t)$$
and integrate by parts taking $u=e^t$ as first function and $dv=t\phi(t)$, i.e. $v=-\phi(t)$.
We arrive at
\begin{align} E\left[Xe^X\right]&=\int_{-\infty}^\infty te^t\phi(t)\,dt \\\\&=\int_{-\infty}^\infty u\,dv \\\\&=uv \Big|_{-\infty}^\infty -\int_{-\infty}^\infty v\,du \\\\&=-\underbrace{\lim_{\substack{a\to-\infty \\ b\to +\infty}} e^t \phi(t)\Big|_{a}^{b}}_{0}+\underbrace{\int_{-\infty}^\infty e^t\phi(t)\,dt}_{E(e^X)} \\\\&=\sqrt e \end{align}