Sum of Squares (k2)

Sum of Squares

How to use the sum of squares formula to solve summation problems: formula, proof, example, and its solution.

Formula

(sum of k^2) = n(n + 1)(2n + 1)/6

The sum of k2 as k goes from 1 to n
is n(n + 1)(2n + 1)/6.

Proof

Sum of Squares: Proof of the Formula

Let's prove this formula
by using mathematical induction.

Show that
'if n = 1, the given statement is true'.

Assume that
'if n = k, the given statement is true'.

So assume that
12 + 22 + 32 + ... + k2 = k(k + 1)(2k + 1)/6
is true.

Show that
'if n = k + 1, the given statement is true'.

So add (k + 1)2 on both sides:

12 + 22 + 32 + ... + k2 + (k + 1)2
= k(k + 1)(2k + 1)/6 + (k + 1)2.

Make the common factor (k + 1)/6
and add these two fractions.

Adding and subtracting rational expressions

Factoring a quadratic trinomial

Then (k + 1)[(k + 1) + 1][2(k + 1) + 1]/6.

So 'if n = k + 1, the given statement is true'.

So, by mathematical induction,
the given statement is true.

Example

Simplify the given series. The sum of k(3k + 1) as k goes from 1 to n

Change k(3k + 1) into (3k2 + k).

And rewrite [sum of (3k2 + k)]
into 3⋅[sum of k2] + [sum of k].

Basic properties of summation

As as k goes from 1 to n,

[sum of k2] = n(n + 1)(2n + 1)/6,
[sum of k] = n(n + 1)/2.

So (given) = 3⋅[n(n + 1)(2n + 1)/6] + [n(n + 1)/2].

Make the common factor n(n + 1)/2
and add these two fractions.

Adding and subtracting rational expressions

Cancel 2
on both of the numerator and the denominator.

Then (given) = n(n + 1)2.