Originally Posted by

**mr fantastic** I see you didn't take my advice regarding notation - thta's probably part of your trouble.

$\displaystyle F(y) = \Pr(Y \leq y) = \Pr(e^X \leq y) = \Pr(X \leq \ln y) = \int_{0}^{\ln y} 1 \, dx = [x]_{0}^{\ln y} = \ln y$ for $\displaystyle 1 \leq y \leq e$.

(Note that $\displaystyle 0 \leq X \leq 1 \Rightarrow 1 \leq Y = e^X \leq e$).

Then the pdf for Y is $\displaystyle f(y) = \frac{dF}{dy} = \frac{1}{y}$ for $\displaystyle 1 \leq y \leq e$ and zero elsewhere.

Then $\displaystyle E(e^X) = E(Y) = \int_1^e y \, \left(\frac{1}{y}\right) \, dy = e - 1$.

-----------------------------------------------------------------------------

But why do all this when you can just use $\displaystyle E[g(X)] = \int_{-\infty}^{+\infty} g(x) \, f(x) \, dx$ where f(x) is the pdf of X ......!?

In your case $\displaystyle E(e^X) = \int_0^1 e^x (1) \, dx = e - 1$. Much less effort!