I have a random bi-dimensional vector that is uniformly distributed on
$D=\{(x,y)\in \mathbb{R}^2, \quad x>0, 0<y<1-\frac{x}{3}\}$
The components are not independent because the support of joit density is not a rectangle (it'a a triangle with area 1.5)
$f_{X,Y}(x, y) = \frac{2}{3} \mathbf{1}_{(0,3)\times \left(0,1-\frac{x}{3}\right) }(x,y)$
So, I've already found that the marginal densities are:
$f_X(x)=\frac{2}{3}\left(1-\frac{x}{3}\right)\mathbf{1}_{(0,3)}(x)$;
$f_Y(y)=2(1-y)\mathbf{1}_{(0,1)}(y)$.
Now I have to calculate the conditional expectation $\mathbb{E}(X+2Y^2|Y)$.
Using the linearity, I have that
$\mathbb{E}(X+2Y^2|Y)=\mathbb{E}(X|Y)+2\mathbb{E}(Y^2|Y)=\mathbb{E}(X|Y)+2Y^2$.
To calculate $\mathbb{E}(X|Y)$ I have to find the conditionate density $f_{X|Y}$:
$f_{X|Y}(x|y)=\frac{f_{X,Y}(x,y)}{f_Y(y)}$
How can I simplify the indicator functions now?
Note: $D=\{(x,y):0<y<1,\,0<x<3(1-y)\}$. Then for $y \in (0,1)$: $$E[X|Y=y]=\frac{1}{3(1-y)}\int_{(0,3(1-y))}xdx=\frac{3}{2}(1-y)$$ Since $P(Y \in (0,1))=1$, we have $E[X|Y]=\frac{3}{2}(1-Y)$, $P$-a.s.