logo

Finding the Sum of Squares 📂Lemmas

Finding the Sum of Squares

Formula

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

Derivation

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

1303=31231+12313=32232+13323=33233+1n3(n1)3=3n23n+1 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,

n303=3k=1nk23k=1nk+n 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 k=1nk=n(n+1)2\displaystyle \sum_{k=1}^{n} {k} = {{n(n+1)} \over {2}}.

By rearranging the above equation for k=1nk2\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

k=1nk3={n(n+1)2}2\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 nn, there’s an interesting property when considering only the coefficient of the highest degree term.

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

The formula for 44 power can also be determined in the same manner, and perhaps the coefficient of the highest term would be 1/51/5? To put it briefly, yes. By thinking in connection with definite integration through the method of exhaustion, one can easily understand the reason. limnk=1n(kn)t=01xt1dx=1t \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 tt. Indeed, it can be considered one of the charms of mathematics.