4.06a - Sums of integers, squares and cubes

4.06a - Sums of integers, squares and cubes

Find long sums without adding every term. You will use the sums of integers, squares and cubes, prove the square and cube formulae by induction, and adapt them to polynomial terms, shifted terms and ranges that do not start at one.

The three standard sums

Why does adding the first ten cubes give the square of the sum of the first ten integers?

13+23+⋯+103=(1+2+⋯+10)21^3 + 2^3 + \cdots + 10^3 = (1 + 2 + \cdots + 10)^2

For three terms it works: 1+8+27=36=621 + 8 + 27 = 36 = 6^2. That is a surprising connection between cubes and squares, but three terms do not prove the pattern. We will establish it for every positive integer, then use it to answer the opening question.

You already know

Sigma notation lists a term and its index range: ∑r=1nr2=12+22+⋯+n2\sum_{r=1}^{n} r^2 = 1^2 + 2^2 + \cdots + n^2. Induction proves a statement for every positive integer by checking the first case and proving that the case kk implies the case k+1k+1.

In a sum, rr changes from term to term while nn stays fixed. For example, ∑r=14n=n+n+n+n=4n\sum_{r=1}^{4} n = n+n+n+n = 4n; the letter nn has not become the running index. Similarly, ∑r=1n1=n\sum_{r=1}^{n} 1 = n, because there are nn ones.

Integers

Write S=1+2+⋯+nS = 1+2+\cdots+n forwards and backwards. Each vertical pair totals n+1n+1, and there are nn pairs:

S=1+2+⋯+nS=n+(n−1)+⋯+12S=n(n+1)add the two rows\begin{aligned} S &= 1+2+\cdots+n \\ S &= n+(n-1)+\cdots+1 \\ 2S &= n(n+1) && \text{add the two rows} \end{aligned}

This argument also works when nn is odd: the middle term is paired with itself, and the sum has been doubled throughout.

Sum of integers

For a positive integer nn,

∑r=1nr=n(n+1)2\sum_{r=1}^{n} r = \frac{n(n+1)}{2}

Not in the formula booklet: learn it.

The booklet gives the general arithmetic-series formula, from which you can recover this result. Its specialised form is worth knowing immediately. Squares need a different formula: squaring the sum would also create cross-products.

Sum of squares

For a positive integer nn,

∑r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6}

In the formula booklet.

For instance, the first three squares total 1+4+9=141+4+9 = 14, and the formula gives 3(4)(7)/6=143(4)(7)/6 = 14. The cube formula has a much more memorable shape.

Sum of cubes

For a positive integer nn,

∑r=1nr3=n2(n+1)24=(n(n+1)2)2\sum_{r=1}^{n} r^3 = \frac{n^2(n+1)^2}{4} = \left(\frac{n(n+1)}{2}\right)^2

In the formula booklet.

Here is the connection in a picture. A square of side 10=1+2+3+410 = 1+2+3+4 can be built from four L-shaped layers, including the central square. Their areas are 11, 88, 2727 and 6464. More generally, increasing a square's side from k(k−1)/2k(k-1)/2 to k(k+1)/2k(k+1)/2 adds area

(k(k+1)2)2−(k(k−1)2)2=k24((k+1)2−(k−1)2)=k3\left(\frac{k(k+1)}{2}\right)^2 -\left(\frac{k(k-1)}{2}\right)^2 = \frac{k^2}{4}\big((k+1)^2-(k-1)^2\big) = k^3

Thus each new layer really does have the next cube's area; the picture is more than a numerical coincidence.

[DIAGRAM: asset_name: Cubes build a square; asset_slug: h245_4_06_cube_layers; caption: A square of side 10 is built from layers of areas 1, 8, 27 and 64, so the first four cubes total 100; description: Exact nested squares share a bottom-left corner and have side lengths 1, 3, 6 and 10. Four distinguishable pale layers are labelled with areas 1 cubed = 1, 2 cubed = 8, 3 cubed = 27 and 4 cubed = 64. A dimension line marks the outer side 10 = 1 + 2 + 3 + 4. A side panel shows that increasing side length from k(k-1)/2 to k(k+1)/2 adds area k cubed.]
A square of side 10 is built from layers of areas 1, 8, 27 and 64, so the first four cubes total 100

The formulae agree at n=1n = 1, but they answer different questions. A square outside the sigma squares the complete total; a square inside squares each term before adding.

Watch out

Wrong: ∑r=13r2=(∑r=13r)2=36\sum_{r=1}^{3} r^2 = \left(\sum_{r=1}^{3} r\right)^2 = 36. Right: ∑r=13r2=14\sum_{r=1}^{3} r^2 = 14. It is the sum of the cubes, ∑r=13r3\sum_{r=1}^{3} r^3, that equals the square of the integer sum.

Check exactly where the power sits before choosing a formula.

Proving the square and cube sums

A formula in the booklet may still be the result you are asked to prove: quoting it does not establish why it is true.

For any sum Sn=∑r=1nurS_n = \sum_{r=1}^{n} u_r, the next sum is Sk+1=Sk+uk+1S_{k+1} = S_k + u_{k+1}. The new term is what changes; all the earlier terms stay together so that the induction assumption can replace them. This sum relation is not in the formula booklet: learn it.

Worked example 1: proving the square sum

Question. Prove by induction that, for every positive integer nn,

∑r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6}

Plan. Check n=1n = 1, assume the formula up to kk, then add (k+1)2(k+1)^2 and factor to obtain the required next form.

12=1=1(2)(3)6the base case is true1^2 = 1 = \frac{1(2)(3)}{6} \qquad \text{the base case is true}

Assume ∑r=1kr2=k(k+1)(2k+1)/6\sum_{r=1}^{k} r^2 = k(k+1)(2k+1)/6 for an arbitrary positive integer kk. Then

∑r=1k+1r2=k(k+1)(2k+1)6+(k+1)2use the assumption=k+16(k(2k+1)+6(k+1))factor out (k+1)/6=k+16(2k2+7k+6)collect terms=(k+1)(k+2)(2k+3)6factor the quadratic\begin{aligned} \sum_{r=1}^{k+1} r^2 &= \frac{k(k+1)(2k+1)}{6} + (k+1)^2 && \text{use the assumption} \\ &= \frac{k+1}{6}\big(k(2k+1)+6(k+1)\big) && \text{factor out } (k+1)/6 \\ &= \frac{k+1}{6}(2k^2+7k+6) && \text{collect terms} \\ &= \frac{(k+1)(k+2)(2k+3)}{6} && \text{factor the quadratic} \end{aligned}

Why this step? The target is the original formula with every nn replaced by k+1k+1. Its three factors are k+1k+1, k+2k+2 and 2k+32k+3, so factoring is how you recognise it.

Answer. Truth for n=kn = k implies truth for n=k+1n = k+1. Since the formula is true for n=1n = 1, it is true for all positive integers nn, by induction.

Check. At n=2n = 2, the sum is 1+4=51+4 = 5, and 2(3)(5)/6=52(3)(5)/6 = 5.

Worked example 2 changes only the power of the summand from square to cube. The induction structure stays the same; the common factor now contains (k+1)2(k+1)^2.

Worked example 2: proving the cube sum

Question. Prove by induction that, for every positive integer nn,

∑r=1nr3=n2(n+1)24\sum_{r=1}^{n} r^3 = \frac{n^2(n+1)^2}{4}

Plan. Check n=1n = 1, assume the formula up to kk, add (k+1)3(k+1)^3, and complete the next square.

13=1=12(22)4the base case is true1^3 = 1 = \frac{1^2(2^2)}{4} \qquad \text{the base case is true}

Assume ∑r=1kr3=k2(k+1)2/4\sum_{r=1}^{k} r^3 = k^2(k+1)^2/4, for an arbitrary positive integer kk. Then

∑r=1k+1r3=k2(k+1)24+(k+1)3use the assumption=(k+1)24(k2+4(k+1))factor out (k+1)2/4=(k+1)24(k+2)2k2+4k+4=(k+2)2\begin{aligned} \sum_{r=1}^{k+1} r^3 &= \frac{k^2(k+1)^2}{4} + (k+1)^3 && \text{use the assumption} \\ &= \frac{(k+1)^2}{4}\big(k^2+4(k+1)\big) && \text{factor out } (k+1)^2/4 \\ &= \frac{(k+1)^2}{4}(k+2)^2 && k^2+4k+4 = (k+2)^2 \end{aligned}

Why this step? The formula for k+1k+1 contains consecutive squared factors, (k+1)2(k+2)2(k+1)^2(k+2)^2. Leaving the common squared factor intact makes that structure visible.

Answer. Truth for n=kn = k implies truth for n=k+1n = k+1. The formula is true for n=1n = 1, so it is true for every positive integer nn, by induction.

Check. At n=2n = 2, 1+8=91+8 = 9, and 22(32)/4=92^2(3^2)/4 = 9.

The algebra establishes the next case; the final sentence explains why that step reaches every allowed integer.

Watch out

Wrong: add k3+1k^3+1 to get the next cube sum. The next term is (k+1)3(k+1)^3, not k3+1k^3+1. Right: write Sk+1=Sk+(k+1)3S_{k+1} = S_k+(k+1)^3 before substituting the assumption.

For a new sum involving even cubes, the next term changes again, but the same base-and-step argument applies.

Sums of polynomial terms

A polynomial term can be split into a combination of the three standard sums, provided you keep the same limits on every sum.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account