Series and partial sums
A series adds up the terms of a sequence. The sum of the first terms is the partial sum . It has the same units as the terms: a sum of dollars is in dollars.
For the terms 3, 7, 11, 15, the partial sums are , , and . The partial sums form a sequence of their own.
That sequence has a recursive rule (lesson 1.5.1): each partial sum is the one before plus the next term. Running it backwards recovers any term from two partial sums.
Rule: Partial sums
Start from , the empty sum of lesson 0.2.2. From the partial sums above, .
Try it
np.cumsum ("cumulative sum") returns every partial sum at once: the running total after each term.
The last line recovers the fourth term from two partial sums. Python counts from 0, so is partial[3].
Arithmetic series
Add the whole numbers from 1 to 100. Pair the first with the last, , then the second with the second-last, . Every pair makes 101, and there are 50 pairs, so the total is 5050.
The pairing works for every arithmetic sequence, because each step up from the front matches a step down from the back. Write the sum twice, once backwards, and every column holds the first term plus the last.
Two copies of , one upside down on the other. Every column holds , so the sum is .
Rule: Arithmetic series
The number of terms times the average of the first and last. The second form uses from lesson 1.5.1, for when you know but not the last term.
Before using the formula, count the terms. From to in steps of there are terms. So has terms, and its sum is .
A table and the algebra
For 3, 7, 11, …, the -th term is , so the formula gives .
| 1 | 2 | 3 | 4 | 5 | 20 | |
|---|---|---|---|---|---|---|
| , added up | 3 | 10 | 21 | 36 | 55 | 820 |
| 3 | 10 | 21 | 36 | 55 | 820 |
A negative difference
The formula does not care about signs. has terms and sums to . When the first and last terms cancel, as in , the sum is 0.
Try it
Lines 1, 2 and 4 add a series directly and with the formula, and each pair agrees. Line 3 is the table's last row; line 5 is the sum that cancels.
range(40, -21, -6) counts down in steps of 6 and stops before , so it ends at .
Geometric series
Take , which is 31. Doubling every term gives . The two lists share four terms, so subtracting one from the other leaves only the ends.
Multiplying by the ratio shifts the terms one place along. The matched terms cancel, so and .
The same shift works for any ratio . With first term and terms, and share all but two terms, so . Dividing by gives the formula.
Lesson PG3.2 in the Proof Gym proves it for every , and shows why it needs .
Rule: Geometric series
is the first term, the ratio and the number of terms. When , the same thing written as keeps both top and bottom positive.
For with 10 terms, and , so . For , also 10 terms, the sum is , just under 1.
A table and the algebra
For , and , so the formula gives .
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| , added up | 3 | 9 | 21 | 45 | 93 | 189 |
| 3 | 9 | 21 | 45 | 93 | 189 |
With ratio 2, each new term beats all the earlier terms put together: the fourth term, 24, is more than . That is why doubling sums run away.
Every ratio
- above 1. The terms grow and the sums run away, as 5115 and 189 above.
- between 0 and 1. The terms shrink and the partial sums creep up towards a ceiling, as above. Lesson 1.5.3 finds the ceiling.
- negative. The terms alternate, and so do the steps of the partial sums. For , the partial sums are . The formula still works, with brackets: .
- . has partial sums . The formula gives : 1 for odd , 0 for even .
- . The formula would divide by zero. Every term is , so : the sum of a constant from lesson 0.2.2.
Try it
geometric is the rule above, with a separate branch for . Lines 1, 2, 4 and 5 compare it with a direct sum; line 3 is the table's added-up row.
The direct sums of whole numbers print as whole numbers; the formula divides, so it prints decimals like 5115.0.
Reading a sum in notation
A sum in notation (lesson 0.2.2) hides the three numbers the geometric formula needs. Read them off before you use it.
- The first term: put the lowest index into the term.
- The ratio: what each step multiplies by.
- The number of terms: top limit minus bottom limit, plus 1.
starts at , so its first term is , not 2. The ratio is 3 and there are terms, so the sum is .
has first term , ratio and terms. Its sum is , about 0.249.
The same reading works for arithmetic sums: is again, 820.
Try it
range(m, n + 1) runs the index from to , both included, as in lesson 0.2.2.
Each line prints the direct sum and the formula with the first term, ratio and count read off.
Lesson 1.5.3 lets the number of terms grow without end, and case study 1.5.5 prices a run of equal payments as a geometric series.
Common mistakes
- Count the terms. has terms, and has , not 19.
- The formula's is the first term actually added. For it is 6, not 2.
- Ratio 1 needs its own rule. The geometric formula divides by zero; use .
- Bracket a negative ratio. , and .
- Keep the two forms whole. and are equal; has the wrong sign.
- The arithmetic formula needs the last term. If you only know , use .
Series
0 of 12 correct
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
How to type answers
- Powers with
^:x^7,2^(1/3),a^-2. - Multiply with
*or by writing side by side:3x^2,2(x+1). ln(x)is the natural log,log(x, 2)is log base 2,eis Euler's number,sqrt(x)is a square root.sin(x),cos(x)andtan(x)take radians; writepifor π andsin(x)^2for sin²x.- Your first answer to each question is saved: it counts towards your score and brings the question back for review.
- Exact answers like
ln(20)/ln(3)are best. Decimals need about 4 significant figures.
Summary card
- A series adds the terms of a sequence. The partial sum adds the first ; and .
- Arithmetic: , the count times the average of the ends. Count the terms first: .
- Geometric: for terms starting at , when ; when . It works for negative too.
- From notation, read off the first term, the ratio and the count () before using a formula.