TExcelTAD
Home › Pre-Calculus, Geometry & Trigonometry › Infinite Series: Convergence and Divergence

Infinite Series: Convergence and Divergence

Can you add up infinitely many numbers and get a finite answer? Sometimes yes: 12+14+18+⋯\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdots is exactly 1. Sometimes no: 1+12+13+14+⋯1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \cdots grows past every number, even though its terms shrink. This lesson gives the idea of convergence through partial sums, the infinite geometric series, and the first warning signs of divergence, all at an intuitive level.

Partial sums

An infinite series a1+a2+a3+⋯a_1 + a_2 + a_3 + \cdots is written ∑n=1∞an\sum_{n=1}^{\infty} a_n. We cannot add infinitely many terms, so we add the first NN and watch what happens as NN grows. These are the partial sums:

S1=a1,S2=a1+a2,S3=a1+a2+a3,…,SN=∑n=1NanS_1 = a_1, \quad S_2 = a_1 + a_2, \quad S_3 = a_1 + a_2 + a_3, \quad \ldots, \quad S_N = \sum_{n=1}^{N} a_n

If the sequence of partial sums SNS_N approaches a number SS, the series converges and SS is its sum. Otherwise it diverges. So an infinite series is really a statement about a sequence: the sequence of running totals.

python · try it yourself
from itertools import accumulate

halves = [1 / 2**n for n in range(1, 21)]
S = list(accumulate(halves))
for N in [1, 2, 3, 5, 10, 20]:
    print(f"S_{N:<2} = {S[N - 1]:.8f}   gap to 1 = {1 - S[N - 1]:.8f}")
S_1  = 0.50000000   gap to 1 = 0.50000000
S_2  = 0.75000000   gap to 1 = 0.25000000
S_3  = 0.87500000   gap to 1 = 0.12500000
S_5  = 0.96875000   gap to 1 = 0.03125000
S_10 = 0.99902344   gap to 1 = 0.00097656
S_20 = 0.99999905   gap to 1 = 0.00000095

Each new term fills half of the remaining gap, so the gap after NN terms is exactly 1/2N1/2^N, which goes to 0. The sum is 1.

The infinite geometric series

The GP sum formula gives SN=a(1−rN)1−rS_N = \frac{a(1 - r^N)}{1 - r}. If ∣r∣<1\lvert r \rvert < 1, then rN→0r^N \to 0 and

a+ar+ar2+ar3+⋯=a1−rwhen ∣r∣<1a + ar + ar^2 + ar^3 + \cdots = \frac{a}{1 - r} \qquad \text{when } \lvert r \rvert < 1

If ∣r∣≥1\lvert r \rvert \ge 1 the terms do not shrink and the series diverges.

Series aa rr Sum
12+14+18+⋯\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdots 12\frac{1}{2} 12\frac{1}{2} 1
1+13+19+⋯1 + \frac{1}{3} + \frac{1}{9} + \cdots 1 13\frac{1}{3} 32\frac{3}{2}
5−52+54−⋯5 - \frac{5}{2} + \frac{5}{4} - \cdots 5 −12-\frac{1}{2} 103\frac{10}{3}
0.9+0.09+0.009+⋯0.9 + 0.09 + 0.009 + \cdots 0.9 110\frac{1}{10} 1
1+2+4+⋯1 + 2 + 4 + \cdots 1 2 diverges

The fourth row explains why 0.999…=10.999\ldots = 1 exactly: the repeating decimal is this geometric series. Every repeating decimal converts to a fraction this way.

Tip: A bouncing ball that rises to 60% of its previous height each bounce travels a finite total distance, and (with a bit more physics) stops after a finite time. Both totals are geometric series.

Shrinking terms are not enough

If a series converges, its terms must go to 0. Read backwards, that gives the divergence test: if ana_n does not go to 0, the series diverges. For example 1−1+1−1+⋯1 - 1 + 1 - 1 + \cdots diverges because its terms do not shrink at all (its partial sums jump 1, 0, 1, 0, …).

But terms going to 0 does not guarantee convergence. The harmonic series 1+12+13+14+⋯1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \cdots diverges. Group its terms:

1+12⏟≥1/2+(13+14)⏟≥1/2+(15+⋯+18)⏟≥1/2+(19+⋯+116)⏟≥1/2+⋯1 + \underbrace{\tfrac{1}{2}}_{\ge 1/2} + \underbrace{\left(\tfrac{1}{3} + \tfrac{1}{4}\right)}_{\ge 1/2} + \underbrace{\left(\tfrac{1}{5} + \cdots + \tfrac{1}{8}\right)}_{\ge 1/2} + \underbrace{\left(\tfrac{1}{9} + \cdots + \tfrac{1}{16}\right)}_{\ge 1/2} + \cdots

Each bracket is at least 12\frac{1}{2}, and there are infinitely many brackets, so the sum passes every bound. It does so incredibly slowly:

python · try it yourself
import math

S, N = 0.0, 0
targets = [2, 5, 10, 15]
for t in targets:
    while S < t:
        N += 1
        S += 1 / N
    print(f"harmonic partial sum passes {t:>2} after N = {N:>8} terms  (e^{t - 0.5772:.4f} ≈ {math.exp(t - 0.5772):,.0f})")
harmonic partial sum passes  2 after N =        4 terms  (e^1.4228 ≈ 4)
harmonic partial sum passes  5 after N =       83 terms  (e^4.4228 ≈ 83)
harmonic partial sum passes 10 after N =    12367 terms  (e^9.4228 ≈ 12,367)
harmonic partial sum passes 15 after N =  1835421 terms  (e^14.4228 ≈ 1,835,450)

The partial sums grow like ln⁡N+0.5772…\ln N + 0.5772\ldots (the constant is the Euler–Mascheroni constant γ\gamma), so reaching 15 takes almost two million terms. A table of partial sums can easily look like it is settling down when it is not. That is why mathematicians use tests (next lesson) rather than staring at numbers.

In software

  • Discounted rewards. In reinforcement learning a reward of 1 per step discounted by γ=0.99\gamma = 0.99 is worth 1+0.99+0.992+⋯=1/(1−0.99)=1001 + 0.99 + 0.99^2 + \cdots = 1/(1 - 0.99) = 100 in total, a geometric series.
  • Harmonic numbers in algorithms. The harmonic sum Hn≈ln⁡nH_n \approx \ln n appears in the analysis of quicksort's average case (about 2nln⁡n2n \ln n comparisons) and of hashing; the slow divergence is why those costs have a log factor.
  • Stopping rules. Numerical code that sums a series stops when the next term is below a tolerance. The harmonic series shows that rule can stop at a wrong "answer" if the series diverges.

For the full definitions, the rigorous proofs and many more examples, see Series and Infinite Series.

Exercises

Exercise 1: A geometric sum

Find 6+2+23+29+⋯6 + 2 + \frac{2}{3} + \frac{2}{9} + \cdots

Answer

9

Solution
a=6, r=13:61−1/3=62/3=9a = 6,\ r = \tfrac{1}{3}{:}\quad \frac{6}{1 - 1/3} = \frac{6}{2/3} = 9

Exercise 2: Repeating decimal

Write 0.454545…0.454545\ldots as a fraction.

Answer

511\frac{5}{11}

Solution
0.4545…=45100+451002+⋯ ,a=45100, r=1100sum=45/10099/100=4599=511\begin{aligned} &0.4545\ldots = \frac{45}{100} + \frac{45}{100^2} + \cdots, \quad a = \frac{45}{100},\ r = \frac{1}{100} \\ &\text{sum} = \frac{45/100}{99/100} = \frac{45}{99} = \frac{5}{11} \end{aligned}

Exercise 3: Converge or diverge?

Decide for each: (a) ∑(3/4)n\sum (3/4)^n, (b) ∑nn+1\sum \frac{n}{n + 1}, (c) ∑(−5/4)n\sum (-5/4)^n.

Answer

(a) converges, (b) diverges, (c) diverges.

Solution
(a) geometric with ∣r∣=3/4<1→converges(b) terms n/(n+1)→1≠0→diverges by the divergence test(c) geometric with ∣r∣=5/4≥1→terms grow→diverges\begin{aligned} &\text{(a) geometric with } \lvert r \rvert = 3/4 < 1 \to \text{converges} \\ &\text{(b) terms } n/(n + 1) \to 1 \ne 0 \to \text{diverges by the divergence test} \\ &\text{(c) geometric with } \lvert r \rvert = 5/4 \ge 1 \to \text{terms grow} \to \text{diverges} \end{aligned}

Exercise 4: Bouncing ball

A ball is dropped from 10 m and each bounce reaches 60% of the previous height. Find the total vertical distance it travels. Check with a loop over 200 bounces.

Answer

40 m

Solution
down 10, then up and down 6,3.6,2.16,…total=10+2⋅(6+3.6+2.16+⋯ )=10+2⋅61−0.6=10+30=40\begin{aligned} &\text{down 10, then up and down } 6, 3.6, 2.16, \ldots \\ &\text{total} = 10 + 2 \cdot (6 + 3.6 + 2.16 + \cdots) = 10 + 2 \cdot \frac{6}{1 - 0.6} = 10 + 30 = 40 \end{aligned}
python · try it yourself
total, h = 10.0, 10.0
for _ in range(200):
    h *= 0.6
    total += 2 * h
print(round(total, 9))
40.0

Test yourself

What is 1−12+14−18+⋯1 - \frac{1}{2} + \frac{1}{4} - \frac{1}{8} + \cdots?

  1. 12\frac{1}{2}
  2. 23\frac{2}{3}
  3. 2
  4. It diverges

The terms of a series go to 0. What can you conclude?

  1. It converges
  2. Its sum is 0
  3. Nothing yet, it may still diverge
  4. It diverges

Which series diverges?

  1. ∑(1/2)n\sum (1/2)^n
  2. ∑1/n\sum 1/n
  3. ∑(−0.9)n\sum (-0.9)^n
  4. ∑3⋅(0.1)n\sum 3 \cdot (0.1)^n