Assume that $X$ and $Y$ are uniform random variables of the uniform distribution on $[0, 1]$.
Then $E(X) = 0.5$, since the $E(X)$ is the mean which is $$ E(X) = \frac{1+0}{2} $$
My intuitive assumption for $E(\left|X - Y\right|)$ was $0$, since $E(X) = E(Y) = 0.5$ but this is not the case.
So solving for $E(\left|X-Y\right|)$ in calculus is equivalent to the double integral
$$ E(|X-Y|) = \int_{0}^{1}\int_{0}^{1}\left|x-y\right|\,\mathrm dx\,\mathrm dy $$
I read that it can be solved using symmetry like
$$ 2I = E(\left|X-Y\right|) + E(\left|Y-X\right|) $$
but I am not sure how to proceed from the point where I have to remove the absolute sign. Can someone help me integrate this expression or correct my reasoning if it is faulty?
Edit: fixing the notation to E(X) instead of E(x) as pointed out