This is exercise 3.3 from "All of Statistics".
I tried solving this in the case that $n=2$, but I found a solution that I feel is wrong. I'm not too great at integration, so I feel like that may be the problem. The problem then is to find
$${\bf E}(Y_2)=\int^1_0\int^1_0\max(x,y)xy \;dx\;dy.$$
I tried splitting the double integral into two parts, where one is the section of the unit square with $x>y$ and the other $x\leq y$. I believe the correct integrals for this are
$$\int^1_0\int^{x/2}_0xy^2\;dy\;dx+\int^1_0\int_{y/2}^1 x^2y\;dx\;dy.$$
The left hand integral is equal to $$\int^1_0x\int^{x/2}_0y^2\;dy\;dx - \int^1_0x\left(\frac{(x/2)^3}{3}\right)\;dx=\int^1_0x^2/24\;dx=1/72.$$
Similarly, we find on the right hand side that
$$\int^1_0\int^1_{y/2} x^2y\;dx\;dy = \int^1_0y\left[\frac{1}{3}-\frac{y^3}{24}\right]\;dy=17/96.$$
Together, these equal $5/24$. This doesn't seem right. What did I do wrong? Is my approach misguided? Also, how can I approach solving the problem in general?