Conditional expected value- uniform distribution on the interval $ [0,1] $ I need to find 


*

*$E[X^3\mid X+Y] $

*$E[\max(X,Y)\mid \min(X,Y)]$
Knowing that $X$ and Y$$ are independent random variables with uniform distribution on the interval $[0,1]$.
My intuition tells me that the $E[\max(X,Y)\mid \min(X,Y)]= \frac{1+ \min(X,Y)}{2}$. That's because if we write that $\min(X,Y)=a$ then $\max(X,Y)$ has uniform distribution on the interval [a,1], so it's mean will be equal to $\frac{a+1}{2}$. Is there more formal way I can explain it? 
Now I have no idea how to proceed with the $E[X^3\mid X+Y]$. I've tried to write down $X+Y=Z$ then I would have
$$\mathbb{E}(X^3\mid Z) = \int_0^\infty x^3 \frac{g_{(X^3, Z)}(x,z)}{g_{Z}(z)}\,dx$$ 
But I don't know how to find ${g_{(X^3, Z)}(x,z)}$ and I'm not sure that's the right way to approach it. Could you help me with it?
 A: The way you have found $E\left[\max(X,Y)\mid \min(X,Y)\right]$ is quite formal. You can also do this by deriving the density of $\max(X,Y)$ conditioned on $\min(X,Y)$ and then find its mean. 
For $E\left[X^3\mid X+Y\right]$, it suffices to find the density of $X$ conditional on $X+Y$. 
Density of $(X,Y)$ is $$f_{X,Y}(x,y)=\mathbf1_{0<x,y<1}$$
Change variables $(x,y) \mapsto (x,z)$ with $z=x+y$, so that density of $(X,Z)$ where $Z=X+Y$ is
$$f_{X,Z}(x,z)=\mathbf1_{0<x<1,x<z<1+x}$$
From here, you can see that density of $Z$ is $$f_Z(z)=z\mathbf1_{0<z<1}+(2-z)\mathbf1_{1<z<2}$$
Conditional density of $X$ given $Z$ is therefore
\begin{align}
f_{X\mid Z}(x\mid z)&=\frac{f_{X,Z}(x,z)}{f_Z(z)}
\\&=\frac1z\mathbf1_{0<x<z<1}+\frac1{2-z}\mathbf1_{0<z-1<x<1}
\end{align}
That is, $X$ given $Z=z$ has a uniform distribution on $(0,z)$ if $0<z<1$ and another uniform distribution on $(z-1,1)$ if $1<z<2$. In other words, the conditional distribution is uniform on $(\max(0,z-1),\min(1,z))$ for $0<z<2$.
The $n$th moment of a uniform distribution on $(a,b)$ is given by $\frac{b^{n+1}-a^{n+1}}{(n+1)(b-a)}$.
This means
\begin{align}
E\left[X^3 \mid Z=z\right]&=\frac{(\min(1,z))^4-(\max(0,z-1))^4}{4(\min(1,z)-\max(0,z-1))}
\\&=\begin{cases}\frac{z^3}4 &,\text{ if }0<z<1 \\ \frac{z}4 (z^2-2z+2) &, \text{ if } 1<z<2 \end{cases}
\end{align}
You will get the same answer from the conditional density using $$E\left[X^3 \mid Z=z\right]=\int x^3 f_{X\mid Z}(x\mid z)\,dx$$
