logo

Finding the Sum of Squares 📂Lemmas

Finding the Sum of Squares

Formula

$$\displaystyle \sum_{k=1}^{n} { k^2} = {{n(n+1)(2n+1)} \over {6}}$$

Derivation

Let’s consider the difference between $k^3$ and $(k-1)^3$ which are of one higher order.

$$ 1^3 - 0^3 = 3 \cdot 1^2 - 3 \cdot 1 + 1 \\ 2^3 - 1^3 = 3 \cdot 2^2 - 3 \cdot 2 + 1 \\ 3^3 - 2^3 = 3 \cdot 3^2 - 3 \cdot 3 + 1 \\ \vdots \\ n^3 - (n-1)^3 = 3n^2 - 3n + 1 $$

If we add both sides respectively,

$$ n^3 - 0^3 = 3 \sum_{k=1}^{n} { k^2} - 3 \sum_{k=1}^{n} { k} + n $$

We know that the sum of natural numbers is $\displaystyle \sum_{k=1}^{n} {k} = {{n(n+1)} \over {2}}$.

By rearranging the above equation for $\displaystyle \sum_{k=1}^{n} { k^2}$, we obtain the formula.

Explanation

Just like the formula for the sum of natural numbers, it is one of the formulas used very frequently while preparing for college entrance exams. Although it’s not used as frequently as the sum of natural numbers after graduating high school, the method of proof is quite interesting.

Generalization

$$\displaystyle \sum_{k=1}^{n} { k^3} = \left\{ { {n(n+1)} \over {2} } \right\} ^ 2 $$

The sum of higher powers, not just squares, can be determined using the same method of proof. For instance, the sum of cubes is as follows.

In the formula for the sum of powers $n$, there’s an interesting property when considering only the coefficient of the highest degree term.

  • For $1$ power, i.e., the sum of natural numbers is $\displaystyle \sum_{k=1}^{n} {k} = {{n(n+1)} \over {2}}$, and the coefficient of the highest term is $1/2$.
  • If it’s power $2$, then it’s $\displaystyle \sum_{k=1}^{n} { k^2} = {{n(n+1)(2n+1)} \over {6}}$ hence $2/6 = 1/3$.
  • For power $3$, it’s $\displaystyle \sum_{k=1}^{n} { k^3} = \left\{ { {n(n+1)} \over {2} } \right\} ^ 2$ hence $1/4$.

The formula for $4$ power can also be determined in the same manner, and perhaps the coefficient of the highest term would be $1/5$? To put it briefly, yes. By thinking in connection with definite integration through the method of exhaustion, one can easily understand the reason. $$ \lim_{n \to \infty} \sum_{k=1}^{n} \left( k \over n \right) ^{t} = \int_{0}^{1} x^{t-1} dx = {1 \over t} $$ It is not difficult to show that the above formula holds for natural numbers $t$. Indeed, it can be considered one of the charms of mathematics.