What an infinite sum means
A series with no last term, such as , cannot be added up term by term. Instead, add the first terms to get the partial sum (lesson 1.5.2). Then ask whether the sequence has a limit (lesson 1.5.1).
| 1 | 2 | 3 | 5 | 10 | 20 | |
|---|---|---|---|---|---|---|
| 0.5 | 0.75 | 0.875 | 0.96875 | 0.99902 | 0.99999905 | |
| 0.5 | 0.25 | 0.125 | 0.03125 | 0.00098 | 0.00000095 |
The partial sums close in on 1, and the gap halves with every term: it is . A square shows why.
Each piece fills half of what is still empty. After pieces the empty part is , so the filled area closes in on the whole square, 1.
Rule: Sum of an infinite series
If the partial sums have a limit, the series converges and that limit is its sum. If they have none, the series diverges and has no sum. The sum has the same units as the terms.
Try it
np.cumsum gives every partial sum at once (lesson 1.5.2). The last column is the gap .
Python writes very small numbers in e-notation: 9.5367431640625e-07 means , the gap after 20 terms.
The infinite geometric series
Lesson 1.5.2 gave the partial sums of a geometric series with first term and ratio :
Only changes as grows. When , lesson 1.5.1 showed that , so settles on . The gap left after terms is the part that vanishes: .
Rule: Infinite geometric series
The first term over one minus the ratio. After terms the partial sum still misses by , which shrinks to 0.
For , and , so the sum is . The gap after terms is , as in the table.
A table and the algebra
Take , with and . The partial sums are 3, 3.75, 3.9375, 3.984375, 3.99609375, and after 10 terms 3.99999619. The algebra gives the limit: .
Repeating decimals
A repeating decimal is an infinite geometric series. is , with and , so it equals exactly.
is , with and . Its sum is .
Try it
infinite_geometric is the rule above. The first two lines show the partial sums of approaching the formula's 4.
The last line agrees with up to rounding in the final digit.
Every ratio
A negative ratio gives an alternating series. has and , so its sum is . Its partial sums 1, 0.5, 0.75, 0.625, 0.6875 land above and below in turn, ever closer.
Geometric partial sums settle on , from one side or from both. The harmonic sums keep rising by about 2.3 every time is multiplied by 10, while the sums of level off.
When the series diverges. The terms never shrink, so the partial sums never settle.
| series | partial sums | what they do | |
|---|---|---|---|
| 1 | 1, 2, 3, 4, 5 | grow without end | |
| 1, 0, 1, 0, 1 | bounce for ever | ||
| 2 | 1, 3, 7, 15, 31 | grow without end | |
| 1, , 3, , 11 | swing wider and wider |
The formula gives an answer anyway, and it is wrong. For it says , a negative sum of positive terms. For it says , a value the partial sums never take.
Rule: Terms must shrink to 0
If the terms do not tend to 0, each new term keeps moving the partial sum by a sizeable amount, so it cannot settle. Check this before reaching for a formula.
Try it
The cell prints the first six partial sums for each ratio in the text: one that converges and the four that do not.
NumPy prints the whole-number cases without decimal points.
Try every ratio yourself. Slide from 0.9 up to 1 and past it, then to and below, and watch the dots settle, climb or bounce. The harmonic series, the subject of the next section, is one of the choices too.
Explore
Each dot is a partial sum: the total of the first n terms. Change the series and the ratio and see which totals settle on a number.
- Term number 10
- 0.001953
- Total of 10 terms
- S10 = 1.998047
- Still to go
- 0.001953
- Verdict
- The partial sums settle on 2.
Shrinking terms are not enough
The harmonic series has terms that shrink to 0. Yet its partial sums grow without end, only very slowly.
| 10 | 100 | 1,000 | 10,000 | 100,000 | 1,000,000 | |
|---|---|---|---|---|---|---|
| harmonic | 2.929 | 5.187 | 7.485 | 9.788 | 12.090 | 14.393 |
| 1.549768 | 1.634984 | 1.643935 | 1.644834 | 1.644924 | 1.644933 |
Each tenfold increase in adds about 2.30 to the harmonic sum, close to (lesson 1.4.3). The sum passes any number you name, given enough terms, so the series diverges. The Proof Gym (stage PG5) proves it.
Squaring the bottoms changes everything. converges: its partial sums level off at . Both series have terms that shrink to 0; only one has a sum.
Rule: Shrinking terms are necessary, not enough
Terms that tend to 0 allow a sum but do not promise one. Compare with a series you know, or watch the partial sums as is multiplied by 10.
Try it
Partial sums of both series up to a million terms, rounded. dtype=float keeps exact: in the browser, whole-number arrays may be 32-bit, and would overflow past about 2 billion.
The harmonic sums keep climbing. The sums of match , the last line, to five decimal places after a million terms.
How many terms for a given accuracy
In practice you stop after terms and accept a small error. For a geometric series that error is the gap from the rule above. Logarithms (lesson 1.4.4) then say how many terms make it smaller than a tolerance.
Example 1. For , the gap after terms is . To be within of 1, solve . Taking logs gives .
Now divide by , which is negative, so the inequality flips (lesson 0.3.3): . The first whole number is 20. Check: the gap is after 19 terms and after 20.
Example 2. For , the sum is and the gap is . Within 0.01 needs , so : 66 terms. A ratio close to 1 converges slowly.
Rule: Terms needed for a tolerance
For . Take the first whole number above the bound. A negative ratio uses its size ; the bottom stays as it is.
Without a formula for the gap, watch it numerically. For the gap after terms is close to : 0.0952 after 10 terms, 0.00995 after 100, 0.0009995 after 1,000. Three correct decimals cost a thousand terms.
Try it
terms_needed adds terms until the gap drops below the tolerance. It agrees with the log bounds: 20 and 66. The third line is the alternating to within 0.001.
The last loop measures the gap of directly, from .
Case study 1.5.5 uses the infinite geometric series to price a payment that never stops. Level 2 writes functions such as as infinite series (module 2.7), and the question of how many terms you need returns there.
Common mistakes
- needs . has no sum, even though .
- is the first term actually added. For , , not 1, and the sum is 1, not 2.
- Keep the sign of a negative ratio. is , not .
- Shrinking terms do not guarantee a sum, as the harmonic series shows. They are needed, but not enough.
- A partial sum is not the sum. of is 0.99999905, close to 1 but not 1.
- Flip the inequality when you divide by . For it is negative, so becomes .
Infinite 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
- An infinite series means the limit of its partial sums . If they settle, it converges; if not, it diverges.
- when , because . Otherwise it diverges, whatever the formula says.
- A negative ratio gives partial sums on both sides of the limit. grows, bounces.
- If the terms do not tend to 0, the series diverges. If they do, check further: diverges, converges.
- The gap after terms of a geometric series is . Set it below the tolerance and solve with logs.