D3 - Sums of powers

D3 - Sums of powers

How can you add the first hundred cubes without calculating a hundred separate cubes? You will learn to read sigma notation, use the sums of integers, squares and cubes, and reshape other finite sums so these formulae apply. One striking connection is that a sum of cubes is itself a perfect square.

Sigma notation

How can you add the first hundred cubes efficiently? Before finding a shortcut, we need a precise way to say which terms are included. For a small sum, such as 33+43+533^3+4^3+5^3, the first index is 33, the last is 55, and the rule for each term is “cube the index”.

Sigma notation

The notation ∑r=abf(r)\sum_{r=a}^{b} f(r) means f(a)+f(a+1)+⋯+f(b)f(a)+f(a+1)+\cdots+f(b), where aa and bb are integers with a≤ba\le b. Both endpoints are included, so there are b−a+1b-a+1 terms. The index rr is a temporary label: replacing it consistently by jj gives the same sum.

Substitute an index into the whole term. For example, the term 2r+12r+1 at r=4r=4 is 99. A constant inside the sigma sign appears once for every index: ∑r=473=4×3\sum_{r=4}^{7} 3=4\times3.

For a sequence with terms u1,u2,…u_1,u_2,\ldots, SnS_n denotes the sum of its first nn terms. Recognise the different symbol ∏j=1nuj=u1u2⋯un\prod_{j=1}^{n}u_j=u_1u_2\cdots u_n: it multiplies terms rather than adding them. The notation S∞S_\infty denotes a sum to infinity only when the finite partial sums approach a finite limit; no infinite sum is needed for the finite formulae here.

Worked example 1: reading the limits

Question. Find ∑r=47(2r+1)\sum_{r=4}^{7}(2r+1).

Plan. Substitute each of the four included indices, then add the terms.

∑r=47(2r+1)=9+11+13+15use r=4,5,6,7=48add the four terms\begin{aligned} \sum_{r=4}^{7}(2r+1) &=9+11+13+15 && \text{use }r=4,5,6,7\\ &=48 && \text{add the four terms} \end{aligned}

Answer. 4848.

Check. The four terms form an arithmetic progression, so their sum is 4(9+15)/2=484(9+15)/2=48.

Keep the limits and coefficient of rr fixed, but change the constant from +1+1 to −1-1. Each term will decrease by 22, so the total should decrease by 88.

Worked example 2: changing every term

Question. Find ∑r=47(2r−1)\sum_{r=4}^{7}(2r-1).

Plan. Generate the terms from the same four indices.

∑r=47(2r−1)=7+9+11+13substitute the indices=40add\begin{aligned} \sum_{r=4}^{7}(2r-1) &=7+9+11+13 && \text{substitute the indices}\\ &=40 && \text{add} \end{aligned}

Answer. 4040.

Check. The change from the previous sum is 4(−2)=−84(-2)=-8, and 48−8=4048-8=40.

Counting the terms correctly is as important as calculating them.

Watch out

There are 7−4+1=47-4+1=4 terms from r=4r=4 to r=7r=7, not three. The difference between the limits counts the gaps.

Try a new pair of limits.

Sums of integers, squares and cubes

Pairing the first and last terms of 1+2+⋯+n1+2+\cdots+n gives pairs with total n+1n+1. More precisely, writing the sum forwards and backwards gives 2S=n(n+1)2S=n(n+1), whether nn is odd or even.

You already know

An arithmetic sequence has first term aa, common difference dd, and term un=a+(n−1)du_n=a+(n-1)d in position nn; write its last term as ll. Its sum is Sn=n(a+l)/2S_n=n(a+l)/2. A geometric sequence has first term aa, common ratio rr, and term un=arn−1u_n=ar^{n-1} in position nn. This rr is a ratio, whereas rr under a sigma sign below is an index: read its role from context.

For 1,2,…,n1,2,\ldots,n, take a=1a=1, d=1d=1 and l=nl=n in that arithmetic sum.

Sum of integers

For a positive integer nn,

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

This follows from the arithmetic-series formula in the formula booklet.

Squaring each term before adding produces a different result from squaring the total. The standard square and cube sums give efficient alternatives to listing every term.

Sums of squares and cubes

For a positive integer nn,

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

In the formula booklet.

These formulae can be checked structurally: if F(n)F(n) is the proposed total, then F(1)=1F(1)=1 and F(n)−F(n−1)F(n)-F(n-1) must be the new term. For squares, the difference of the two cubic expressions simplifies to n2n^2. For cubes, put Tn=n(n+1)/2T_n=n(n+1)/2:

Tn2−Tn−12=(Tn−Tn−1)(Tn+Tn−1)=n×n2=n3T_n^2-T_{n-1}^2 =(T_n-T_{n-1})(T_n+T_{n-1}) =n\times n^2=n^3

This explains the surprise: adding the first nn cubes gives Tn2T_n^2, the square of the triangular number TnT_n. The picture shows the first four layers; their areas are 1,8,27,641,8,27,64.

[DIAGRAM: asset_name: Cubes as layers of a square; asset_slug: aqa7367-cube-layers; caption: The first four cubes fill a square of side ten; description: An exact square diagram with nested square side lengths one, three, six and ten. The successive L shaped layers have areas one, eight, twenty seven and sixty four, equal to the first four cubes. A legend identifies each layer and an equation shows one cubed plus two cubed plus three cubed plus four cubed equals ten squared.]
The first four cubes fill a square of side ten

Worked example 3: a square sum

Question. Find ∑r=15r2\sum_{r=1}^{5}r^2.

Plan. Use the square-sum formula with n=5n=5.

∑r=15r2=5(5+1)(2×5+1)6substitute n=5=55simplify\begin{aligned} \sum_{r=1}^{5}r^2 &=\frac{5(5+1)(2\times5+1)}6 && \text{substitute }n=5\\ &=55 && \text{simplify} \end{aligned}

Answer. 5555.

Check. Direct addition gives 1+4+9+16+25=551+4+9+16+25=55.

Now change only the power from 22 to 33. The limit is still five, but the correct formula changes.

Worked example 4: a cube sum

Question. Find ∑r=15r3\sum_{r=1}^{5}r^3.

Plan. Square the sum of the first five integers using the cube-sum identity.

∑r=15r3=52(5+1)24use the cube-sum formula=225simplify\begin{aligned} \sum_{r=1}^{5}r^3 &=\frac{5^2(5+1)^2}{4} && \text{use the cube-sum formula}\\ &=225 && \text{simplify} \end{aligned}

Answer. 225225.

Check. Direct addition gives 1+8+27+64+125=2251+8+27+64+125=225, and (1+2+3+4+5)2=152=225(1+2+3+4+5)^2=15^2=225.

The special identity for cubes must not be transferred to squares.

Watch out

In general, ∑r2≠(∑r)2\sum r^2\ne(\sum r)^2. For example, 12+22=51^2+2^2=5, whereas (1+2)2=9(1+2)^2=9.

Use the corresponding formula with a new upper limit.

Reshaping finite sums

The standard formulae start at 11, but a question may start later, finish at 2n2n, or contain a polynomial. You can reshape such a sum before applying the formulae.

For fixed finite limits, summation distributes over addition and constant multiples:

∑r=ab(Af(r)+Bg(r))=A∑r=abf(r)+B∑r=abg(r)\sum_{r=a}^{b}\bigl(Af(r)+Bg(r)\bigr) =A\sum_{r=a}^{b}f(r)+B\sum_{r=a}^{b}g(r)

Here AA and BB do not depend on rr. In particular, ∑r=1nc=cn\sum_{r=1}^{n}c=cn, not cc. To start at an integer m≥2m\ge2, subtract the unwanted initial terms:

∑r=mnf(r)=∑r=1nf(r)−∑r=1m−1f(r)(n≥m)\sum_{r=m}^{n}f(r)=\sum_{r=1}^{n}f(r)-\sum_{r=1}^{m-1}f(r) \qquad(n\ge m)

For a shifted term such as (r+1)2(r+1)^2, either expand it to r2+2r+1r^2+2r+1, or change index to j=r+1j=r+1. If rr runs from 11 to nn, then jj runs from 22 to n+1n+1. Both limits must change.

Worked example 5: a shifted square

Question. Find ∑r=1n(r+1)2\sum_{r=1}^{n}(r+1)^2 for a positive integer nn.

Plan. The actual squares run from 222^2 to (n+1)2(n+1)^2, so use a square sum and remove 121^2.

∑r=1n(r+1)2=∑j=2n+1j2set j=r+1=(n+1)(n+2)(2n+3)6−1remove the first square\begin{aligned} \sum_{r=1}^{n}(r+1)^2 &=\sum_{j=2}^{n+1}j^2 && \text{set }j=r+1\\ &=\frac{(n+1)(n+2)(2n+3)}6-1 && \text{remove the first square} \end{aligned}

Answer. (n+1)(n+2)(2n+3)6−1\dfrac{(n+1)(n+2)(2n+3)}6-1.

Check. An independent expansion gives ∑r2+2∑r+∑1\sum r^2+2\sum r+\sum1. Substituting the three standard totals and simplifying gives the same expression. At n=2n=2, both give 4+9=134+9=13.

Change only the lower limit to 33. The missing terms are the values at r=1,2r=1,2, which are 44 and 99, rather than 11 and 44.

Worked example 6: removing initial shifted terms

Question. Find ∑r=3n(r+1)2\sum_{r=3}^{n}(r+1)^2, where nn is an integer with n≥3n\ge3.

Plan. Reindex to the squares from 424^2 to (n+1)2(n+1)^2, then subtract the first three squares.

∑r=3n(r+1)2=∑j=4n+1j2shift both limits=(n+1)(n+2)(2n+3)6−(1+4+9)=(n+1)(n+2)(2n+3)6−14\begin{aligned} \sum_{r=3}^{n}(r+1)^2 &=\sum_{j=4}^{n+1}j^2 && \text{shift both limits}\\ &=\frac{(n+1)(n+2)(2n+3)}6-(1+4+9)\\ &=\frac{(n+1)(n+2)(2n+3)}6-14 \end{aligned}

Answer. (n+1)(n+2)(2n+3)6−14\dfrac{(n+1)(n+2)(2n+3)}6-14.

Check. Subtracting the omitted 4+9=134+9=13 from Worked example 5 gives exactly this result. At the boundary n=3n=3, it gives 30−14=1630-14=16, the single term 424^2.

If a polynomial contains several powers, expand first, split the sum and collect afterwards. For example,

∑r=1n(3r2−2r+5)=n(n+1)(2n+1)2−n(n+1)+5n\sum_{r=1}^{n}(3r^2-2r+5) =\frac{n(n+1)(2n+1)}2-n(n+1)+5n

The same substitution principle handles a changed upper limit: for ∑r=12nr3\sum_{r=1}^{2n}r^3, put 2n2n wherever the cube-sum formula has its upper limit. We can now answer the opening question without listing the cubes:

13+23+⋯+1003=(100×1012)2=25 502 5001^3+2^3+\cdots+100^3 =\left(\frac{100\times101}{2}\right)^2 =25\,502\,500

Keep track of what the limits mean before simplifying.

Problem-solving

First identify the actual first and last terms. Then expand or reindex, use standard sums, and check a small allowed value of the parameter.

Apply the changed lower limit to a fresh sum.

Quick Recap

  • Sigma limits include both endpoints.
  • Use the standard sums of integers, squares and cubes with the actual upper limit.
  • Split finite sums across additions and constant multiples; a constant is repeated once per term.
  • Shift both limits when changing index, or subtract the unwanted initial terms.

The first hundred cubes total 25 502 50025\,502\,500, the square of 1+2+⋯+1001+2+\cdots+100.