Chapter IV · Limits of functions of a positive integral variable

The geometric series

§78 30 min

The one series whose partial sums we can write down exactly, its complete classification, and what it says about recurring decimals.

Why this matters

Most series cannot be summed in closed form: we can only prove that they converge. The geometric series 1+r+r2+⋯1 + r + r^2 + \cdots is the great exception. Its partial sums have an exact formula, so we can see precisely when it converges and to what. That makes it the yardstick against which other series are measured (the comparison test of the last lesson needs something to compare with), and it explains a fact from school arithmetic: why recurring decimals are exactly the fractions.

The idea

Think of the partial sums as a walk along the number line. Start at 00, take a step of length 11, then a step of length rr, then r2r^2, and so on: after nn steps you stand at sn=1+r+⋯+rn−1s_n = 1 + r + \cdots + r^{n-1}. Each step is rr times the one before. If rr is negative, each step also turns round.

Explore Take the series apart

Try this. Start with r=0.5r = 0.5 and increase the number of terms. Then try r=0.9r = 0.9, r=−0.6r = -0.6, r=−1r = -1, r=1r = 1 and r=1.1r = 1.1.

1+r+r2+⋯1 + r + r^2 + \cdots; sn=1−rn1−rs_n = \frac{1 - r^n}{1 - r}
sₖstep k
  • step k: from sₖ to sₖ₊₁, length rᵏ
  • s = 1/(1 − r)
  • what is left: s − sₙ
s6=1.96875s_{6} = 1.96875. What is left is s−s6=r6/(1−r)=0.03125s - s_{6} = r^{6}/(1-r) = 0.03125: the tail of the walk is the whole walk shrunk by r6r^{6}. |r| < 1: the steps shrink geometrically and the walk closes in on 1/(1 − r) = 2.
What to notice

For ∣r∣<1|r| < 1 the purple gap s−sns - s_n is always the whole walk shrunk by the factor rnr^n: that self-similarity is the reason the walk closes in on 1/(1−r)1/(1-r). For negative rr the walk zigzags across its limit. For r=−1r = -1 it hops between 11 and 00 for ever, and for ∣r∣>1|r| > 1 the steps grow and the walk runs away, to one side (r>1r > 1) or to both (r<−1r < -1).

The algebra behind the picture is one line. Multiply sns_n by rr and subtract:

sn−rsn=(1+r+⋯+rn−1)−(r+r2+⋯+rn)=1−rn,s_n - r s_n = (1 + r + \cdots + r^{n-1}) - (r + r^2 + \cdots + r^n) = 1 - r^n,

so, if r≠1r \neq 1,

sn=1−rn1−r=11−r−rn1−r.s_n = \frac{1 - r^n}{1 - r} = \frac{1}{1 - r} - \frac{r^n}{1 - r}.

The partial sum is a fixed number 1/(1−r)1/(1-r) minus a multiple of rnr^n. Everything therefore depends on what rnr^n does, and that was settled in §72: rn→0r^n \to 0 if ∣r∣<1|r| < 1, rn→1r^n \to 1 if r=1r = 1, rn→+∞r^n \to +\infty if r>1r > 1, and rnr^n oscillates if r≤−1r \le -1 (finitely if r=−1r = -1, infinitely if r<−1r < -1).

Explore How fast does it converge?

Try this. This plots the error ∣s−sn∣|s - s_n| on a logarithmic scale. Move rr between 0.10.1 and 0.950.95.

∑n=0∞rn\sum_{n=0}^{\infty} r^{n}
n|s − sₙ| (log scale)
  • |s − sₙ| for rnr^{n}
Plot
After 30 terms s29=1.999999998s_{29} = 1.999999998; the sum is 2, so ∣s−s29∣|s - s_{29}| = 1.86 × 10⁻⁹. The series converges to 2.
What to notice

The points lie on a straight line: on a log scale, multiplying by rr at every step is a constant downward step of log⁡10(1/r)\log_{10}(1/r). For r=0.5r = 0.5 you gain a decimal digit about every 3.33.3 terms; for r=0.9r = 0.9 you need about 2222 terms per digit.

Precise statements

Theorem The geometric series Hardy: §78

The series 1+r+r2+⋯1 + r + r^2 + \cdots

  • converges, with sum 11−r\dfrac{1}{1-r}, if −1<r<1-1 < r < 1;
  • diverges to +∞+\infty if r≥1r \ge 1;
  • oscillates finitely if r=−1r = -1;
  • oscillates infinitely if r<−1r < -1.

Combined with §77 (1), (2) and (4), this sums every series of the form arm+arm+1+⋯a r^m + a r^{m+1} + \cdots: for ∣r∣<1|r| < 1 it is arm/(1−r)a r^m / (1 - r).

Hardy’s Examples XXIX apply the theorem to decimals. A decimal ⋅a1a2a3…\cdot a_1 a_2 a_3 \ldots (digits aka_k from 00 to 99) means the series a1/10+a2/102+a3/103+⋯a_1/10 + a_2/10^2 + a_3/10^3 + \cdots. It always converges, because its terms are ≥0\ge 0 and its partial sums are at most 9/10+9/102+⋯=19/10 + 9/10^2 + \cdots = 1.

Theorem Recurring decimals are fractions, and conversely Hardy: Examples XXIX, 2–6

A decimal that terminates or recurs (repeats a fixed block of digits for ever from some point on) represents a rational number. Conversely, every rational number between 00 and 11 has a decimal expansion that terminates or recurs. Consequently a decimal that neither terminates nor recurs represents an irrational number.

Proofs

Proof The geometric series
Strategy

Use the exact formula sn=1−rn1−rs_n = \dfrac{1 - r^n}{1-r} for r≠1r \ne 1, and read off the behaviour of sns_n from that of rnr^n (§72). Treat r=1r = 1 separately.

r=1r = 1

Every term is 11, so sn=n→+∞s_n = n \to +\infty.

−1<r<1-1 < r < 1

Here rn→0r^n \to 0, so sn=11−r−rn1−r→11−rs_n = \dfrac{1}{1-r} - \dfrac{r^n}{1-r} \to \dfrac{1}{1-r} by the limit theorems for sums and constant multiples.

r>1r > 1

Every term is at least 11, so sn≥ns_n \ge n and sn→+∞s_n \to +\infty. (Or: rn→+∞r^n \to +\infty and 1−r<01 - r < 0.)

r=−1r = -1

The terms are 1,−1,1,−1,…1, -1, 1, -1, \dots, so sns_n is 11 for odd nn and 00 for even nn: bounded, without a limit. It oscillates finitely.

r<−1r < -1

Write r=−ρr = -\rho with ρ>1\rho > 1, so 1−r=1+ρ>01 - r = 1 + \rho > 0. For even nn, sn=(1−ρn)/(1+ρ)→−∞s_n = (1 - \rho^n)/(1 + \rho) \to -\infty; for odd nn, sn=(1+ρn)/(1+ρ)→+∞s_n = (1 + \rho^n)/(1 + \rho) \to +\infty. So sns_n is unbounded in both directions, and neither tends to +∞+\infty nor to −∞-\infty: it oscillates infinitely.

There is a tempting shortcut (Examples XXX, 7): if s=1+r+r2+⋯s = 1 + r + r^2 + \cdots, then s=1+r(1+r+⋯ )=1+rss = 1 + r(1 + r + \cdots) = 1 + rs, so s=1/(1−r)s = 1/(1-r). The algebra uses §77 (1) and (4), which apply only to a series already known to converge. Without that hypothesis the same algebra “proves” 1+2+4+⋯=−11 + 2 + 4 + \cdots = -1.

Proof Recurring decimals and fractions
Strategy

One direction is a geometric series: a block of nn repeating digits is a geometric series with ratio 10−n10^{-n}. For the other, the long division of pp by qq has only qq possible remainders, so it must eventually repeat itself.

A pure recurring decimal is a fraction

Let the block a1a2…ana_1 a_2 \dots a_n repeat for ever, and let AA be the integer with those digits. Then ⋅a1…an‾=A 10−n+A 10−2n+⋯\cdot \overline{a_1 \dots a_n} = A\,10^{-n} + A\,10^{-2n} + \cdots, a geometric series with first term A 10−nA\,10^{-n} and ratio 10−n10^{-n}, so its sum is A 10−n1−10−n=A10n−1\dfrac{A\,10^{-n}}{1 - 10^{-n}} = \dfrac{A}{10^n - 1}.

Any recurring or terminating decimal is a fraction

A decimal that starts recurring after mm digits is 10−m10^{-m} times (an integer plus a pure recurring decimal), which is rational. A terminating decimal is a finite sum of fractions.

Long division by qq has at most qq remainders

Let 0<p/q<10 < p/q < 1. The digits of p/qp/q come from long division: at each stage the remainder ρk\rho_k is one of 0,1,…,q−10, 1, \dots, q - 1, and the next digit and the next remainder depend only on ρk\rho_k (the digit is [10ρk/q][10\rho_k/q], the new remainder is 10ρk−q [10ρk/q]10\rho_k - q\,[10\rho_k/q]).

So the digits repeat

Among the first q+1q + 1 remainders two are equal, say ρj=ρj+n\rho_j = \rho_{j+n} with n≥1n \ge 1. From then on the division repeats exactly, so the digits recur with a block of length nn. If some remainder is 00, the decimal terminates.

The consequence

A decimal that neither terminates nor recurs cannot be rational, since every rational has a terminating or recurring expansion, and a number has only one expansion apart from the case of trailing 99s (Examples XXIX, 6–7), which also terminates or recurs.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XXIX, 1

Express the decimal ⋅2171313…\cdot 2171313\ldots, in which the block 1313 recurs for ever after the digits 217217, as a fraction in lowest terms. Which theorems of §77 does your calculation use?

Hint
Split it as ⋅217\cdot 217 plus 13/105+13/107+13/109+⋯13/10^5 + 13/10^7 + 13/10^9 + \cdots.

Solution

The recurring part is a geometric series with first term 13/10513/10^5 and ratio 1/1021/10^2:

2171000+13/1051−1/102=2171000+1399 000=21 483+1399 000=21 49699 000=268712 375.\frac{217}{1000} + \frac{13/10^5}{1 - 1/10^2} = \frac{217}{1000} + \frac{13}{99\,000} = \frac{21\,483 + 13}{99\,000} = \frac{21\,496}{99\,000} = \frac{2687}{12\,375}.

We used: grouping the digits into the terms 13/105+2k13/10^{5+2k} (inserting brackets, §77 (8)); the sum of a geometric series and its multiples (§77 (4)); and putting the three terms 2/102/10, 1/1021/10^2, 7/1037/10^3 in front (§77 (1)).

Exercise ●○○ Hardy: Examples XXX, 3

Show that 1+2r+2r2+2r3+⋯1 + 2r + 2r^2 + 2r^3 + \cdots converges when ∣r∣<1|r| < 1, with sum 1+r1−r\dfrac{1+r}{1-r}, in two ways: (α) as −1+2(1+r+r2+⋯ )-1 + 2(1 + r + r^2 + \cdots), and (β) as 1+2(r+r2+⋯ )1 + 2(r + r^2 + \cdots).

Hint
Each way uses §77 (1) or (2) together with (4).

Solution

(α) 1+r+r2+⋯=1/(1−r)1 + r + r^2 + \cdots = 1/(1-r); doubling (§77 (4)) gives 2+2r+2r2+⋯=2/(1−r)2 + 2r + 2r^2 + \cdots = 2/(1-r). Our series is this one with its first term 22 replaced by 11: deleting the first term (§77 (2)) and then putting 11 in front (§77 (1)) gives the sum 2/(1−r)−2+1=2−(1−r)1−r=1+r1−r2/(1-r) - 2 + 1 = \dfrac{2 - (1 - r)}{1 - r} = \dfrac{1 + r}{1 - r}.

(β) r+r2+⋯=r/(1−r)r + r^2 + \cdots = r/(1-r) (§77 (2) or (4)), so 2r+2r2+⋯=2r/(1−r)2r + 2r^2 + \cdots = 2r/(1-r), and putting 11 in front gives 1+2r1−r=1+r1−r1 + \dfrac{2r}{1-r} = \dfrac{1+r}{1-r}.

Exercise ●●○ Hardy: Examples XXX, 5

For which rr does (1−r)+(r−r2)+(r2−r3)+⋯(1 - r) + (r - r^2) + (r^2 - r^3) + \cdots converge, and what is its sum?

Hint
It is a telescoping series. What is sns_n?

Solution

The nn-th partial sum is 1−rn1 - r^n, which tends to a limit exactly when rnr^n does, that is, when −1<r≤1-1 < r \le 1 (§72). The sum is 11 if −1<r<1-1 < r < 1, and 00 if r=1r = 1 (every term is then 00). Note the surprise: the sum is not a continuous function of rr at r=1r = 1. For other rr the series diverges (r>1r > 1) or oscillates (r≤−1r \le -1).

Exercise ●●○ Hardy: Examples XXX, 8

Find when r+r1+r+r(1+r)2+⋯r + \dfrac{r}{1+r} + \dfrac{r}{(1+r)^2} + \cdots converges, and its sum.

Hint
For r≠−1r \ne -1 it is a geometric series with first term rr and ratio 1/(1+r)1/(1+r). Treat r=0r = 0 separately.

Solution

If r=−1r = -1 the terms after the first are undefined. If r=0r = 0 every term is 00 and the sum is 00. Otherwise the series is rr times the geometric series with ratio q=1/(1+r)q = 1/(1+r), which converges if and only if ∣q∣<1|q| < 1, that is ∣1+r∣>1|1 + r| > 1, that is r>0r > 0 or r<−2r < -2. Then the sum is

r1−11+r=r(1+r)r=1+r.\frac{r}{1 - \frac{1}{1+r}} = \frac{r(1+r)}{r} = 1 + r.

For −2≤r<0-2 \le r < 0 with r≠−1r \ne -1, ∣q∣≥1|q| \ge 1, and rr times a non-convergent series does not converge (§77 (5)).

Exercise ●●○ Hardy: Examples XXIX, 8

Show that ⋅101001000100001…\cdot 101001000100001\ldots, in which the runs of zeros between successive 11s have lengths 1,2,3,…1, 2, 3, \dots, represents an irrational number.

Hint
By the theorem, it is enough to show that the decimal neither terminates nor recurs.

Solution

It does not terminate, since there are infinitely many 11s. Suppose it recurred with a block of length pp from the mm-th digit on. Far enough along there is a run of more than m+pm + p consecutive zeros, so some complete block of pp digits after position mm consists only of zeros. Then every later digit is 00, contradicting the infinitely many 11s. So the decimal neither terminates nor recurs, and the number is irrational.

Check yourself

Check yourself Choose one

What does 1−1+1−1+⋯1 - 1 + 1 - 1 + \cdots (the geometric series with r=−1r = -1) do?

Why

The partial sums are 1,0,1,0,…1, 0, 1, 0, \dots: bounded and without a limit. The formula 1/(1−r)1/(1-r) is valid only for ∣r∣<1|r| < 1; at r=−1r = -1 it gives 12\tfrac12, which is the average of the partial sums (a hint of “Cesàro summation”, met in the problems), but not a sum.

Check yourself Enter a number

For 1+12+14+⋯1 + \tfrac12 + \tfrac14 + \cdots, what is the smallest nn with s−sn<0.001s - s_n < 0.001?

Why

s−sn=rn/(1−r)=(1/2)n/(1/2)=21−ns - s_n = r^n/(1 - r) = (1/2)^n / (1/2) = 2^{1-n}. We need 2n−1>10002^{n-1} > 1000, and 29=5122^9 = 512, 210=10242^{10} = 1024, so n−1=10n - 1 = 10, n=11n = 11.

Check yourself True or false?

The computation s=1+rss = 1 + rs, hence s=1/(1−r)s = 1/(1-r), proves that 1+r+r2+⋯=1/(1−r)1 + r + r^2 + \cdots = 1/(1-r) for every r≠1r \ne 1.

Why

False. It assumes that the series has a sum ss to begin with. For r=2r = 2 it would give 1+2+4+⋯=−11 + 2 + 4 + \cdots = -1. Once convergence is known (for ∣r∣<1|r| < 1, from the formula for sns_n), the computation correctly identifies the sum.

Check yourself Choose one

Which fraction is ⋅363636…\cdot 363636\ldots?

Why

A two-digit block recurring gives A/(102−1)=36/99=4/11A/(10^2 - 1) = 36/99 = 4/11. The denominator is 9999, one less than 10n10^n for a block of n=2n = 2 digits; 36/99936/999 would be ⋅036036…\cdot 036036\ldots, and 36/100=9/2536/100 = 9/25 is the terminating decimal ⋅36\cdot 36.

Hardy’s language

Summary

Summary
  • For r≠1r \ne 1, 1+r+⋯+rn−1=1−rn1−r1 + r + \cdots + r^{n-1} = \dfrac{1 - r^n}{1 - r}, so the series behaves exactly as rnr^n does.
  • It converges to 1/(1−r)1/(1-r) iff −1<r<1-1 < r < 1; diverges to +∞+\infty iff r≥1r \ge 1; oscillates finitely at r=−1r = -1 and infinitely for r<−1r < -1.
  • The error after nn terms is rn/(1−r)r^n/(1-r): each new term multiplies the error by rr.
  • Recurring and terminating decimals are exactly the rational numbers; so a decimal that does neither is irrational.