This question has been set in the Christmas work for the chemists at oxford uni and the hint that was given in the problem sheet was "does $\mathbb E(x)$ depend on $x$?".
There is a derivation on Wikipedia: $$\mathbb E((x-\mathbb E(x))^2)$$ Expand the brackets (I get this bit) $$\mathbb E(x^2-2x\mathbb E(x)+\mathbb E(x)^2)$$ Use the fact the expectation value of the sum of the terms is the same as the sum of the expectation values of the terms: $$\mathbb E(x^2)-2\mathbb E(x\mathbb E(x))+\mathbb E(\mathbb E(x)^2)$$ This step isn't written explicitly in the derivation on Wikipedia but it must be the case. Now the step that I don't understand: $$\mathbb E(x^2)-2\mathbb E(x)\mathbb E(x)+\mathbb E(\mathbb E(x)^2)$$ Why does the term in the middle not change to $2\mathbb E(x)\mathbb E(\mathbb E(x))$?
Then collect the terms:$$\mathbb E(x^2)-\mathbb E(x)^2$$
Also, this doesn't seem to utilise the hint given by my lecturer. Is there a better way of doing it?