I am learning about standard deviation. In the book I am reading it defines standard deviation as:
$$\sigma^2 = E[(x - E[x])^2]$$
so far no problem. In then states "simple mathematical manipulation leads to the following equation:"
$$\sigma^2 = E[x^2] - (E[x])^2$$
Where I understand the second term is the (squared) expected value of the experiment. My problem is that (as simple as the author says the manipulations are), I do not know how to go from the first equation to the second. What would be the steps that allow him to write the second equation starting from the first? What's the proof for this?
Your help is greatly appreciated, as always. Thank you.