# Given two i.i.d. standard uniform RV $U,V$ on $(0,1)$, compute the conditional expectation $E((U-V)^+ \mid U)$

Problem: Let $U,V$ be two i.i.d. standard uniform RV on $(0,1)$, compute $E((U-V)^+ \mid U)$

My solution:

We choose $Z \in L^\infty (\Omega, \sigma(U), \mathbb{P}) \iff Z=f(U)$ for some bounded borel measurable function $f$ and want to compute $$E(\max(U-V,0)f(U))= \int_{(0,1)^2} \max(u-v,0) f(u)dudv \\ = \int_{(0,1)^2} \max(u-v,0)1_{u-v>0} f(u) du dv + \underbrace{\int_{(0,1)^2} \max(u-v,0)1_{u-v \leq 0}f(u)dudv}_{=0} \\ \overset{(*)}=\int_0^1\int_0 ^u uf(u)dvdu-\int_0^1 \int_0^u vf(u)dvdu =\int_0^1 u^2f(u)du- \int_0^1 \frac{u^2}{2}f(u)du \\ = \int_0^1 \frac{u^2}{2}f(u)du = E((U^2/2)f(U))$$ From which I conclude that $$E((U-V)^+ \mid U)= U^2/2$$ I did omit some details about the use of Fubini-Tonelli's Theorem in (*), but indeed with $f$ being bounded the use of this theorem is justified.

Question: Is my solution correct? If not, please highlight my mistake and try pointing me towards the right solution. Unfortunately I can't ask my tutors this week and I don't want to fall behind on this topic.

$$E((U-V)^+ \mid U) = \int_0^1 (U-x)^+dx= \int_0^U (U-x)dx =\frac{U^2}{2}$$