$X \sim Exp(\frac{1}{3}) $ If $Y= \max(X,2)$ Find $E(Y)$ $X \sim Exp(\frac{1}{3}) $ 
If $Y= \max(X,2)$ Find $E(Y)$
I did in two ways can anyone point out my mistake ? 
First one 
$f(y)=
\begin{cases}
\ 2,  & \text{if $0<x\le2$ } \\[2ex]
X, & \text{if $2<x<\infty$ }
\end{cases}$
$E(Y)=E(Y|0<x<2)P(0<x\le2)+E(Y|2<x<\infty)P(2<x<\infty)$
$E(Y)=2(1-e^{\frac{2}{3}})+e^{\frac{-2}{3}}\int \dfrac{x}{3}e^{-\frac{x}{3}} dx=2(1-e^{\frac{2}{3}})+\dfrac{e^{\frac{-2}{3}}}{3}\bigg(\bigg(-3xe^{-\frac{x}{3}}\bigg)_{2}^{\infty}-\bigg(9e^{-\frac{x}{3}}\bigg)_{2}^{\infty}\bigg)=2-2e^{\frac{-2}{3}}+\dfrac{e^{\frac{-2}{3}}}{3}\bigg(\bigg(6e^{-\frac{2}{3}}\bigg)+\bigg(9e^{-\frac{2}{3}}\bigg)\bigg)=2-2e^{-\frac{2}{3}}+5e^{-\frac{4}{3}}$
Second way
$E(Y)=\int \max(X,2)f(x)dx=\int_0^{2} 2f(x)dx+\int _{2}^{\infty}xf(x)dx=2(1-e^{\frac{-2}{3}})+\bigg(\bigg(-3xe^{-\frac{x}{3}}\bigg)_{2}^{\infty}-\bigg(9e^{-\frac{x}{3}}\bigg)_{2}^{\infty}\bigg)=2-2^{-\frac{2}{3}}+5e^{-\frac{2}{3}}=2+3e^{-\frac{2}{3}}$
Now I am not sure which of them is correct and why can anyone tell me ?

This is how I would proceed (similar to your second method):
$E(Y)=\int_0^22\times\frac{1}{3}e^{\frac{-x}{3}}dx + \int_2^\infty x\times\frac{1}{3}e^{\frac{-x}{3}}dx$
$=2(1-e^{\frac{-2}{3}}) +3\int_\frac{2}{3}^\infty t\times e^{-t}dt$
$=2(1-e^{\frac{-2}{3}}) +3\Gamma(2,\frac{2}{3})$
$=2+3e^{\frac{-2}{3}}$
Here is an easy tutorial to solve the incomplete Gamma Integral http://mathworld.wolfram.com/IncompleteGammaFunction.html
