# Does independence of two random variables imply uncorrelatedness?

There are many materials about the reverse question: "Does uncorrelatedness tell us something about independence?" But how to answer the question I've posed and why? Is there some simple counterexample?

To say that two random variables $$X$$ and $$Y$$ are uncorrelated means that $$\mathbb{E}[XY] = \mathbb{E}[X] \mathbb{E}[Y]$$. On the other hand, saying $$X$$ and $$Y$$ are independent means that their joint distribution is the product of their marginal distributions, $$p(X,Y) = p(X) \cdot p(Y)$$; or, equivalently, that either joint distribution is the same as its marginal distribution $$p(Y|X) = p(Y)$$.
Now, suppose that $$X$$ and $$Y$$ are correlated. Then there must be values $$x_{1}$$ and $$x_{2}$$ for which $$\mathbb{E}(Y|X=x_1) \neq \mathbb{E}(Y|X=x_2)$$.*
Since the expectations are unequal, it is clear that $$p(Y|X=x_1) \neq p(Y|X=x_2)$$. But if $$X$$ and $$Y$$ were independent, we would have $$p(Y|X=x_1) = p(Y) = p(Y|X=x_2)$$. Thus correlation implies dependence and, by the contrapositive, independence implies uncorrelation.
* This is easiest to see by assuming that $$\mathbb{E}[Y]$$ is constant and working out $$\mathbb{E}[XY]$$ by integration