Please show detailed steps of double integration of absolute difference Please show detailed steps of integration
$$\int_0^2 \int_0^1 0.5|x-y| dxdy$$
$$=\frac{1}{2}\int_0^2\int_0^y(y-x)dxdy + \frac{1}{2}\int_0^2\int_y^1(x-y)dxdy$$
$$=\frac{1}{2}\int_0^2\{y\int_0^ydx - \int_0^yxdx\}dy + \frac{1}{2}\int_0^2\{\int_y^1xdx - y\int_y^1dx\}dy$$
$$=\frac{1}{2}\int_0^2\frac{1}{2}y^2dy + \frac{1}{2}\int_0^2\frac{1}{2} -y + \frac{1}{2}y^2dy$$
$$
=2/3 + 1/6 = 5/6
$$
I can't get the $\frac{2}{3}$ solution.

The problem is with your integration limits. You integrate $y$ from $0$ to $2$ and $x$ from $y$ to $1$. But For say $y=1.5$ it's the wrong way around. If you integrate $x$ from $0$ to $1$ and then you split the $y$ integration from $0$ to $x$ and from $x$ to $2$, you get the right answer.
