Suppose you have $x_1, ..., x_n$. My task is to find $b \in \Bbb{R}$ such that the sum $\sum_{i=1}^n (x_i - b)^2$ is minimal.
Now, I think we can view it as a multivariate function and differentiate...
So how specifically should I proceed?
EDIT:
the $x_i$ were squared by mistake. Anyway, in accordance with JCAA and sven I differentiated and calculated such as the following: $$2b - 2x_1 + 2b - 2x_2 + ... + 2b - 2x_n = 0$$ $$\Rightarrow b = \frac{\sum_{i=1}^n x_i}{n}$$
If your only task is to find $b$, you may treat the data $x_i$ as being constant, so it is sufficient to differentiate w.r.t. $b$, set the derivative equal to zero, and solve for $b$ in terms of the values $x_i$. In fact, the answer is the mean of the values $x^2_i$ (a special case of squared-error minimization).