Suppose $X$ is exponential with mean $1$ and $Y$ uniform on $[0,1]$ and they are independent. Calculate $\mathbb{E}[\max (X,Y)]$
Try
As they are independent, we can easily calculate the joint density $f_{X,Y}(x,y) = 1 \cdot e^{-x} = e^{-x} $. Therefore,
$$ \mathbb{E}[ \max(X,Y) ] = \int \int \max(x,y) e^{-x} dx dy $$
We have to consider cases now:
$$ \max(x,y) e^{-x} = \begin{cases} x e^{-x}, & y<x \\ y e^{-x}, & x<y \end{cases} $$
Thus,
if $y<x$, we obtain
$$ \int\limits_0^1 \int\limits_y^{\infty} x e^{-x} dx dy = \frac{1}{e}-2$$
Now, if $x<y$, then
$$ \int_0^1 \int_0^y y e^{-x} dxdy = \frac{2}{e} - \frac{1}{2}$$
Thus the required expectation is
$$ \boxed{ \frac{3}{e} - \frac{5}{2} }$$
Is this a correct solution?