Q:

Derivation of $\sigma^2 = \frac1N\sum x^2 - \frac1{N^2}\sum\bar{x}^2$

I saw the above equation in an introductory statistics textbook, as a shortcut for evaluating the variance of a population.
I tried to prove it myself:
 
 
$$\sigma^2 = \frac{\sum (x - \bar{x})^2}{N} \tag{1}$$
$$\sigma^2 = \frac{\sum x^2 - \frac{(\sum x)^2}{N}}{N} \tag{2}$$
We are given that $(1) = (2)$:
$$\frac{\sum (x - \bar{x})^2}{N} = \frac{\sum x^2 - \frac{(\sum x)^2}{N}}{N} \tag{3}$$
Multiply $(3)$ through by $N$:
$$\sum(x - \bar{x})^2 = \sum x^2 - \frac{(\sum x)^2}{N} \tag{4}$$
Expand the LHS in $(4)$:
$$\sum\left(x^2 - 2x\bar{x} + \bar{x}^2\right) = {\sum x^2 - \frac{(\sum x)^2}{N}} \tag{5}$$
Expanding both sides in $(5)$:
$$\sum x^2 - 2x\sum\bar{x} + \sum\bar{x}^2 = \sum x^2 - \frac{\sum x\sum x}{N} \tag{6}$$
From $(6)$:
$$\sum\bar{x}^2 - 2\bar{x}\sum{x} = -\bar{x}\sum{x} \tag{7}$$
From $(7)$:
$$\sum\bar{x}^2 = \bar{x}\sum{x} \tag{8}$$
I don't know how to make the LHS equal RHS in $(8)$.

A:

$$\sum\bar{x}^2 = N \bar{x}^2$$
$$\bar{x}\sum x = \bar{x} \cdot N\bar{x} = N \bar{x}^2$$

