We are given two independent exponentially distributed random variables :
$X$ ~ $Exp(\lambda_{1})$ and $Y$ ~ $Exp(\lambda_{2})$ , we need to find $E(max(X,Y))$.
I tried as follows :
Let $Z=max(X,Y)$ , starting off with $P(Z \leq z)$.
$F_Z(z)=P(Z\leq z)=P(max(X,Y) \leq z) = P(X,Y \leq z) = P(X \leq z)P(Y \leq z) $
which turns out to be : $(1-e^{- \lambda_1z})(1-e^{- \lambda_2z})$
Differentiating this gives the density function and hence expectation can be found out. Is this correct ?
Yes, that is viable. Although to save effort, you might instead employ the fact that for strictly non-negative random variable, $Z$, with a CDF of $F_Z$, then: $$\mathsf E(Z)=\int_0^\infty (1-F_Z(z))\operatorname d z$$