I was looking at the following question from "One Thousand Exercises in Probability" by Grimmett, page 25, question 16 (not homework just self-study):
Let $X$ and $Y$ be independent Bernoulli random variables with $p = 1/2$. Show that $X + Y$ and $|X − Y|$ are dependent though uncorrelated.
Now, the solution given on page 176 goes as follows:
$\mathrm{cov}(X+Y, |X-Y|) = E[(X+Y)\cdot(|X-Y|)] - E[X+Y]\cdot E[|X-Y|]$
I can work out that
$E[X+Y] = (0)(1/4) + (1)(1/2) + (2)(1/4) = 1$
and
$E[|X-Y|] = (0)(1/2) + (1)(1/2) = 1/2$
But I can't work out how to do
$E[(X+Y)\cdot(|X-Y|)]= ?$
The solution in the book for the covariance is:
$1/4 + 1/4 - 1(1/2) = 0$
To show dependence, the book provides the following solution:
$P(X+Y=0, |X-Y|=0) = 1/4$ is not the same as $P(X+Y=0)\cdot P(|X-Y|=0) = 1/8$