Chapter VIII · The convergence of infinite series and infinite integrals

Alternating series

§195 30 min

If the sizes of the terms decrease steadily to zero, an alternating series converges, and its sum is trapped between any two consecutive partial sums.

Why this matters

We now know that a conditionally convergent series converges only through cancellation, and that comparison tests cannot see cancellation. So we need tests that use the pattern of signs. The simplest pattern is strict alternation: +,−,+,−,…+, -, +, -, \dots. §195 proves the classical test for such series, often called Leibniz’s test, and it comes with a bonus that is rare in analysis: an explicit, practical bound on the error of every partial sum.

The idea

Write the series as φ0−φ1+φ2−φ3+⋯\varphi_0 - \varphi_1 + \varphi_2 - \varphi_3 + \cdots with every φn>0\varphi_n > 0, and suppose the sizes φn\varphi_n decrease. Walk along the number line: forward φ0\varphi_0, back φ1\varphi_1, forward φ2\varphi_2, back φ3\varphi_3, … . Since each step is no longer than the one before, every backward step undoes only part of the previous forward step, and every forward step undoes only part of the previous backward step. So the walk zigzags inside a shrinking region:

  • the positions after forward steps, s0,s2,s4,…s_0, s_2, s_4, \dots, go down;
  • the positions after backward steps, s1,s3,s5,…s_1, s_3, s_5, \dots, go up;
  • each “up” position lies below each “down” position.

If the steps shrink to zero, the two sequences squeeze together onto a single point: the sum.

Explore Error bars for free

Try this. For 1−12+13−⋯1 - \tfrac12 + \tfrac13 - \cdots, step nn through 0,1,2,…0, 1, 2, \dots and compare the true error ∣s−sn∣|s - s_n| in the read-out with the next term. Then try 1−13+15−⋯1 - \tfrac13 + \tfrac15 - \cdots and the family ∑(−1)n/(n+1)s\sum (-1)^n/(n+1)^s for several ss.

∑n=0∞(−1)nφn,φn=1n+1\sum_{n=0}^{\infty} (-1)^n \varphi_n, \quad \varphi_n = \frac{1}{n+1}
nsₙ
  • sₙ, n even (decreasing)
  • sₙ, n odd (increasing)
  • bar from sₙ to sₙ₊₁
  • the sum s
s5=0.6166667s_{5} = 0.6166667 and s6=0.7595238s_{6} = 0.7595238; the sum s=log⁡2≈0.6931472s = \log 2 \approx 0.6931472 lies between them. The error is ∣s−s5∣=0.0765|s - s_{5}| = 0.0765, within the bound φ6=0.143\varphi_{6} = 0.143 (the next term).
What to notice

Each green bar joins sns_n to sn+1s_{n+1}, and every bar crosses the dashed line: the sum is always between two consecutive partial sums. The blue points (even nn) only go down, the ochre ones (odd nn) only go up. The error is always less than the next term, and usually about half of it.

Precise statements

Theorem The alternating series test Hardy: §195

Let φn\varphi_n be positive and tend steadily to zero (that is, φn+1≤φn\varphi_{n+1} \le \varphi_n for all nn, and φn→0\varphi_n \to 0). Then

φ0−φ1+φ2−φ3+⋯\varphi_0 - \varphi_1 + \varphi_2 - \varphi_3 + \cdots

converges, and its sum ss lies between φ0\varphi_0 and φ0−φ1\varphi_0 - \varphi_1.

Corollary The error bound Hardy: Examples LXXVIII, 3

Under the same conditions, ss lies between sns_n and sn+1s_{n+1} for every nn, where sn=φ0−φ1+⋯+(−1)nφns_n = \varphi_0 - \varphi_1 + \cdots + (-1)^n\varphi_n. Hence

∣s−sn∣≤φn+1:|s - s_n| \le \varphi_{n+1} :

the error in stopping after a term is at most the size of the first term left out, and it has the sign of that term.

Both conditions on φn\varphi_n are needed. If φn\varphi_n decreases to a positive limit, the terms do not tend to 00 and the series oscillates finitely (Examples LXXVIII, 5). If φn→0\varphi_n \to 0 but not steadily, the series may diverge (Examples LXXVIII, 4, below). As usual, the conditions only need to hold from some nn on.

Proofs

Proof The alternating series test
Strategy

Show that the even partial sums decrease, the odd ones increase, every odd one is below every even one, and their difference tends to zero. Then both monotone sequences converge, to the same limit.

Even partial sums decrease

s2n+2−s2n=−φ2n+1+φ2n+2≤0s_{2n+2} - s_{2n} = -\varphi_{2n+1} + \varphi_{2n+2} \le 0, because φ\varphi decreases.

Odd partial sums increase

s2n+3−s2n+1=φ2n+2−φ2n+3≥0s_{2n+3} - s_{2n+1} = \varphi_{2n+2} - \varphi_{2n+3} \ge 0.

Odd sums lie below even sums

s2n−s2n+1=φ2n+1>0s_{2n} - s_{2n+1} = \varphi_{2n+1} > 0. So for any mm and nn, taking k=max⁡(m,n)k = \max(m, n), we get s2m+1≤s2k+1<s2k≤s2ns_{2m+1} \le s_{2k+1} < s_{2k} \le s_{2n}. In particular s1≤s2n+1<s2n≤s0s_1 \le s_{2n+1} < s_{2n} \le s_0 for every nn.

Both sequences converge

s2ns_{2n} is decreasing and bounded below by s1s_1; s2n+1s_{2n+1} is increasing and bounded above by s0s_0. Monotone bounded sequences converge (§69): say s2n→Ls_{2n} \to L and s2n+1→L′s_{2n+1} \to L'.

To the same limit

L−L′=lim⁡(s2n−s2n+1)=lim⁡φ2n+1=0L - L' = \lim (s_{2n} - s_{2n+1}) = \lim \varphi_{2n+1} = 0. Since both the even and the odd partial sums tend to LL, so does the whole sequence sns_n. (Given δ\delta, choose n0n_0 that works for both subsequences.)

Where the sum lies

The limit ss satisfies s2n+1≤s≤s2ns_{2n+1} \le s \le s_{2n} for every nn, so ss lies between each pair of consecutive partial sums. With n=0n = 0 this says φ0−φ1≤s≤φ0\varphi_0 - \varphi_1 \le s \le \varphi_0, and in general ∣s−sn∣≤∣sn+1−sn∣=φn+1|s - s_n| \le |s_{n+1} - s_n| = \varphi_{n+1}: the corollary.

The steady decrease was used in the first two steps only, but those are what make the even and odd partial sums monotone, and without monotonicity the argument has nothing left. The next figure shows what can go wrong.

Explore When the terms do not decrease steadily

Try this. Choose the series with φn=1/(n+(−1)n)\varphi_n = 1/(\sqrt n + (-1)^n) and show 200 terms. Then choose φn=1+1/(n+1)\varphi_n = 1 + 1/(n+1).

∑n=2∞(−1)nφn,φn=1n+(−1)n\sum_{n=2}^{\infty} (-1)^n \varphi_n, \quad \varphi_n = \frac{1}{\sqrt n + (-1)^n}
nsₙ
  • sₙ, n even
  • sₙ, n odd
  • bar from sₙ to sₙ₊₁
Here φ5=0.809\varphi_{5} = 0.809, φ6=0.2899\varphi_{6} = 0.2899: the terms tend to 0 but do not decrease steadily. Each downward step (odd n) is longer than the upward step before it, so the partial sums drift downwards, slowly, like −log⁡n-\log n: the series diverges to −∞-\infty.
What to notice

In the first, φn→0\varphi_n \to 0, but each odd term 1/(n−1)1/(\sqrt n - 1) is larger than the even term 1/(n−1+1)1/(\sqrt{n-1} + 1) before it, so the even and odd partial sums are not monotone and both drift down to −∞-\infty. In the second, the bars never shrink below length 11: steady decrease without the limit 00 gives finite oscillation.

Worked examples and exercises

Exercise A family of alternating series ●○○ Hardy: Examples LXXVIII, 1–2

Let a>0a > 0. Show that ∑(−1)n(n+a)−s\sum (-1)^n (n + a)^{-s} is absolutely convergent if s>1s > 1, conditionally convergent if 0<s≤10 < s \le 1, and oscillatory if s≤0s \le 0. Deduce that 1−12+13−⋯1 - \tfrac12 + \tfrac13 - \cdots, 1−12+13−⋯1 - \tfrac{1}{\sqrt2} + \tfrac{1}{\sqrt3} - \cdots, ∑(−1)n/n+a\sum (-1)^n/\sqrt{n + a} and ∑(−1)n/(n+a)\sum (-1)^n/(\sqrt n + \sqrt a) are conditionally convergent.

Hint
The moduli are (n+a)−s(n + a)^{-s}: compare with ∑n−s\sum n^{-s}.
Hint
For 0<s≤10 < s \le 1 use the theorem; for s≤0s \le 0 look at the size of the terms.

Solution

The moduli (n+a)−s(n+a)^{-s} behave like n−sn^{-s} (their ratio tends to 11), so ∑∣un∣\sum |u_n| converges exactly when s>1s > 1 (§181, comparison). So for s>1s > 1 the series is absolutely convergent.

For 0<s≤10 < s \le 1, φn=(n+a)−s\varphi_n = (n + a)^{-s} is positive, decreases steadily and tends to 00, so the series converges by the theorem; since ∑∣un∣\sum |u_n| diverges, it converges conditionally.

For s=0s = 0 the series is 1−1+1−⋯1 - 1 + 1 - \cdots, which oscillates finitely; for s<0s < 0 the terms have sizes (n+a)∣s∣→∞(n + a)^{|s|} \to \infty alternating in sign, and the partial sums are unbounded above and below (each even partial sum exceeds the previous odd one by (n+a)∣s∣(n+a)^{|s|}): infinite oscillation.

The four series: the first two are a=1a = 1 with s=1,12s = 1, \tfrac12 (index shifted). For 1/n+a1/\sqrt{n + a}, take s=12s = \tfrac12. For 1/(n+a)1/(\sqrt n + \sqrt a), the terms decrease steadily to 00, and their sizes exceed 1/(2n)1/(2\sqrt{n}) for n≥an \ge a, so the moduli diverge: again conditional convergence.

Exercise How many terms? ●○○ Hardy: Examples LXXVIII, 3

How many terms of 1−13+15−⋯1 - \tfrac13 + \tfrac15 - \cdots (whose sum is π/4\pi/4) guarantee an error less than 10−310^{-3}? Less than 10−610^{-6}?

Hint
After mm terms, the first term left out is 1/(2m+1)1/(2m+1).

Solution

By the corollary the error after mm terms is less than 1/(2m+1)1/(2m + 1) (strictly, because the sum lies strictly between consecutive partial sums when φ\varphi is strictly decreasing). We need 2m+1≥10002m + 1 \ge 1000, so m=500m = 500 terms suffice; for 10−610^{-6}, m=500 000m = 500\,000. The bound is close to the truth: the actual error is roughly half the next term, so about 250250 terms give two or three correct decimals of π/4\pi/4, but not more. This series converges slowly.

Exercise Steady decrease is essential ●●○ Hardy: Examples LXXVIII, 4

Show that ∑n≥2(−1)nn+(−1)n\displaystyle\sum_{n \ge 2} \frac{(-1)^n}{\sqrt n + (-1)^n} diverges, although it alternates in sign and its terms tend to 00.

Hint
Write (−1)nn+(−1)n=(−1)nn−χn\dfrac{(-1)^n}{\sqrt n + (-1)^n} = \dfrac{(-1)^n}{\sqrt n} - \chi_n and find χn\chi_n.
Hint
Is χn\chi_n positive? How does nχnn\chi_n behave?

Solution

Since (−1)nn−(−1)nn+(−1)n=(−1)n(n+(−1)n−n)n (n+(−1)n)=1n+(−1)nn\dfrac{(-1)^n}{\sqrt n} - \dfrac{(-1)^n}{\sqrt n + (-1)^n} = \dfrac{(-1)^n\big(\sqrt n + (-1)^n - \sqrt n\big)}{\sqrt n\,(\sqrt n + (-1)^n)} = \dfrac{1}{n + (-1)^n\sqrt n}, we have

(−1)nn+(−1)n=(−1)nn−χn,χn=1n+(−1)nn>0.\frac{(-1)^n}{\sqrt n + (-1)^n} = \frac{(-1)^n}{\sqrt n} - \chi_n, \qquad \chi_n = \frac{1}{n + (-1)^n \sqrt n} > 0 .

∑(−1)n/n\sum (-1)^n/\sqrt n converges by the theorem. ∑χn\sum \chi_n has positive terms with nχn→1n\chi_n \to 1, so it diverges like ∑1/n\sum 1/n. The difference of a convergent and a divergent series diverges, here to −∞-\infty. The hypothesis that fails is steady decrease: φ2k+1=1/(2k+1−1)\varphi_{2k+1} = 1/(\sqrt{2k+1} - 1) is larger than φ2k=1/(2k+1)\varphi_{2k} = 1/(\sqrt{2k} + 1).

Exercise A positive limit ●○○ Hardy: Examples LXXVIII, 5

If φn\varphi_n decreases steadily to a limit l>0l > 0, show that ∑(−1)nφn\sum (-1)^n \varphi_n oscillates finitely.

Hint
Steps 1–4 of the proof did not use φn→0\varphi_n \to 0.

Solution

As in the proof, s2ns_{2n} decreases to a limit LL and s2n+1s_{2n+1} increases to a limit L′L', and all partial sums lie between s1s_1 and s0s_0, so they are bounded. But L−L′=lim⁡φ2n+1=l>0L - L' = \lim \varphi_{2n+1} = l > 0, so sns_n has no limit. Bounded and not convergent: finite oscillation.

Exercise A Tripos example ●●● Hardy: Examples LXXVIII, 6

Let a,b>0a, b > 0 and φn=a(a+1)⋯(a+n)b(b+1)⋯(b+n)\varphi_n = \dfrac{a(a+1)\cdots(a+n)}{b(b+1)\cdots(b+n)}. Show that ∑(−1)nφn\sum (-1)^n \varphi_n converges if and only if a<ba < b.

Hint
Look at φn+1/φn\varphi_{n+1}/\varphi_n.
Hint
For a<ba < b, take logarithms and use log⁡(1−x)≤−x\log(1 - x) \le -x.

Solution

We have φn+1/φn=(a+n+1)/(b+n+1)\varphi_{n+1}/\varphi_n = (a + n + 1)/(b + n + 1).

If a≥ba \ge b this ratio is at least 11, so φn≥φ0>0\varphi_n \ge \varphi_0 > 0 for all nn; the terms do not tend to 00, and the series cannot converge.

If a<ba < b the ratio is less than 11, so φn\varphi_n decreases steadily. To see that φn→0\varphi_n \to 0, write c=b−a>0c = b - a > 0 and

log⁡φn=∑k=0nlog⁡(1−cb+k)≤−c∑k=0n1b+k→−∞,\log \varphi_n = \sum_{k=0}^{n} \log\Big(1 - \frac{c}{b + k}\Big) \le -c \sum_{k=0}^{n} \frac{1}{b + k} \to -\infty ,

since ∑1/(b+k)\sum 1/(b+k) diverges like the harmonic series. So φn→0\varphi_n \to 0 and the theorem applies. (Hardy also allows negative non-integral aa, bb: then the factors are positive from some point on, and the same argument applies to the tail.)

Check yourself

Check yourself Enter a number

What is the smallest number mm of terms of 1−13+15−⋯1 - \tfrac13 + \tfrac15 - \cdots for which the error bound of the corollary guarantees an error below 0.0010.001?

Why

After mm terms the bound is the next term, 1/(2m+1)1/(2m+1). It is below 0.0010.001 exactly when 2m+1>10002m + 1 > 1000, that is m≥500m \ge 500.

Check yourself True or false?

If the terms of an alternating series tend to zero, the series converges.

Why

False. The terms must also decrease in size steadily (from some point on). ∑n≥2(−1)n/(n+(−1)n)\sum_{n\ge2} (-1)^n/(\sqrt n + (-1)^n) alternates, its terms tend to 00, and it diverges.

Check yourself Choose one

For 1−12+13−14+151 - \tfrac12 + \tfrac13 - \tfrac14 + \tfrac15 the partial sum is s4=47/60≈0.783s_4 = 47/60 \approx 0.783. What does the corollary say about the sum ss?

Why

The next term is −16-\tfrac16, so ss lies between s4s_4 and s5=s4−16s_5 = s_4 - \tfrac16, and the error has the sign of the first omitted term. (In fact s=log⁡2≈0.693s = \log 2 \approx 0.693.) The first option uses the last term included instead of the first term omitted.

Check yourself True or false?

For an alternating series φ0−φ1+⋯\varphi_0 - \varphi_1 + \cdots with φn\varphi_n decreasing, the even partial sums s0,s2,s4,…s_0, s_2, s_4, \dots form a decreasing sequence.

Why

True: s2n+2−s2n=φ2n+2−φ2n+1≤0s_{2n+2} - s_{2n} = \varphi_{2n+2} - \varphi_{2n+1} \le 0. Similarly the odd partial sums increase.

Hardy’s language

Summary

Summary
  • If φn>0\varphi_n > 0 decreases steadily to 00, then φ0−φ1+φ2−⋯\varphi_0 - \varphi_1 + \varphi_2 - \cdots converges.
  • The even partial sums decrease, the odd ones increase, and they squeeze onto the sum.
  • The sum lies between any two consecutive partial sums: ∣s−sn∣≤φn+1|s - s_n| \le \varphi_{n+1}, the first term omitted.
  • Both hypotheses matter: without φn→0\varphi_n \to 0 the series oscillates; without steady decrease it may diverge.