Unit 7, lesson 102

Estimates of Sums and Test Selection

How to bound the error of a partial sum with integrals, geometric tails or the alternating estimate, how many terms that bound requires, and how to choose a convergence test quickly.

  • Theory part 203
  • Practice part 204
  • Convergence and Convergence Tests

Knowing that a series converges is often only half the job. A calculator or a computer still has to stop after finitely many terms, and you want to know how far off the answer can be. The tests from the previous lessons come with error bounds, and those bounds tell you in advance how many terms are enough. The second half of the job is choosing the right test in the first place.

Key terms

Absolute error

Definition If a convergent series has sum SS and you approximate it by the partial sum sns_n, the absolute error is

∣S−sn∣=∣Rn∣,\lvert S - s_n \rvert = \lvert R_n \rvert,

where the remainder is

Rn=∑k=n+1∞ak.R_n = \sum_{k=n+1}^{\infty} a_k.

More generally, the absolute error of any approximation AA to SS is ∣S−A∣\lvert S - A \rvert.

In plain words The absolute error is how far your estimate is from the true value, without caring about the direction.

Example For ∑1n2=π26≈1.644934\sum \frac{1}{n^2} = \frac{\pi^2}{6} \approx 1.644934 the partial sum s10≈1.549768s_{10} \approx 1.549768 has absolute error about 0.0951660.095166.

Integral bounds

Definition Suppose ff is continuous, positive and decreasing on [n,∞)[n, \infty), ak=f(k)a_k = f(k) for k≥nk \ge n, and ∑ak\sum a_k converges with sum SS. Then

sn+∫n+1∞f(x) dx≤S≤sn+∫n∞f(x) dx.s_n + \int_{n+1}^{\infty} f(x)\,dx \le S \le s_n + \int_n^{\infty} f(x)\,dx.

Taking the midpoint of this interval as the estimate gives an absolute error of at most half its width, which is

12∫nn+1f(x) dx.\frac{1}{2}\int_n^{n+1} f(x)\,dx.

In plain words Two improper integrals fence in the sum. The middle of the fence is usually a much better estimate than the partial sum alone.

Example Take ∑1n3\sum \frac{1}{n^3} with n=5n = 5. The partial sum is

s5=1+18+127+164+1125≈1.185662,s_5 = 1 + \frac{1}{8} + \frac{1}{27} + \frac{1}{64} + \frac{1}{125} \approx 1.185662,

and the two integrals are

∫6∞x−3 dx=172,∫5∞x−3 dx=150,\int_6^{\infty} x^{-3}\,dx = \frac{1}{72}, \qquad \int_5^{\infty} x^{-3}\,dx = \frac{1}{50},

so

1.199551≤S≤1.205662.1.199551 \le S \le 1.205662.

The midpoint 1.2026061.202606 is guaranteed to be within half the width, 0.0030560.003056, of SS. The true sum is about 1.2020571.202057, so the actual error is only about 0.000550.00055.

Geometric tail bounds

Definition Suppose ak≠0a_k \ne 0 for k≥n+1k \ge n + 1 and there is a number rr with 0≤r<10 \le r < 1 such that

∣ak+1ak∣≤rfor all k≥n+1.\left\lvert \frac{a_{k+1}}{a_k} \right\rvert \le r \quad \text{for all } k \ge n + 1.

Then ∣an+1+j∣≤∣an+1∣rj\lvert a_{n+1+j} \rvert \le \lvert a_{n+1} \rvert r^j for every j≥0j \ge 0, so the series converges absolutely and

∣Rn∣≤∑j=0∞∣an+1∣rj=∣an+1∣1−r.\lvert R_n \rvert \le \sum_{j=0}^{\infty} \lvert a_{n+1} \rvert r^j = \frac{\lvert a_{n+1} \rvert}{1 - r}.

In plain words If from some point on each term is at most a fixed fraction rr of the one before, the tail is smaller than a geometric series you can add exactly. This is the error bound that goes with the ratio test.

Example Take e=∑k=0∞1k!e = \sum_{k=0}^{\infty} \frac{1}{k!} and stop after the term k=6k = 6. For k≥7k \ge 7 the ratio is 1k+1≤18\frac{1}{k + 1} \le \frac{1}{8}, so the tail after 16!\frac{1}{6!} satisfies

0<e−∑k=061k!≤1/7!1−1/8=87⋅5040≈0.000227.0 < e - \sum_{k=0}^{6} \frac{1}{k!} \le \frac{1/7!}{1 - 1/8} = \frac{8}{7 \cdot 5040} \approx 0.000227.

Indeed ∑k=061k!≈2.718056\sum_{k=0}^{6} \frac{1}{k!} \approx 2.718056 and e≈2.718282e \approx 2.718282, a difference of about 0.0002260.000226. The bound is almost exactly the true error.

Alternating error estimates

Definition If ∑(−1)k−1bk\sum (-1)^{k-1} b_k has bk>0b_k > 0, bk+1≤bkb_{k+1} \le b_k for all k≥1k \ge 1, and bk→0b_k \to 0, then

∣S−sn∣≤bn+1,\lvert S - s_n \rvert \le b_{n+1},

and S−snS - s_n has the sign of the first omitted term.

In plain words For a well behaved alternating series, the error is at most the size of the next term.

Example For ∑(−1)k−1k2\sum \frac{(-1)^{k-1}}{k^2} with n=10n = 10, the bound is b11=1121≈0.00826b_{11} = \frac{1}{121} \approx 0.00826. In fact s10≈0.817962s_{10} \approx 0.817962 and S=π212≈0.822467S = \frac{\pi^2}{12} \approx 0.822467, an error of about 0.004500.00450. Since the first omitted term is positive, s10s_{10} lies below SS.

Certified number of terms

Definition Given a tolerance ε>0\varepsilon > 0, a number of terms nn is certified if a proven bound BnB_n on the error, such as one of the three above, satisfies Bn≤εB_n \le \varepsilon. Then the error is guaranteed to be at most ε\varepsilon. The smallest certified nn depends on the bound used, and it can be larger than the number of terms that actually achieve the tolerance.

In plain words Watching the partial sums stop changing on the screen proves nothing. A certificate is a bound you have proved that is already below the tolerance.

Example Suppose you want ∑1n2\sum \frac{1}{n^2} within 0.010.01. Using sns_n alone, the integral bound gives

Rn≤∫n∞x−2 dx=1n,R_n \le \int_n^{\infty} x^{-2}\,dx = \frac{1}{n},

so n=100n = 100 terms are certified. Using the midpoint of the integral bounds instead, the error is at most

12(1n−1n+1)=12n(n+1),\frac{1}{2}\left(\frac{1}{n} - \frac{1}{n + 1}\right) = \frac{1}{2n(n + 1)},

which is at most 0.010.01 once n(n+1)≥50n(n + 1) \ge 50, so n=7n = 7 terms are certified. Indeed the estimate

s7+12(18+17)≈1.645726s_7 + \frac{1}{2}\left(\frac{1}{8} + \frac{1}{7}\right) \approx 1.645726

is within 0.00080.0008 of π26\frac{\pi^2}{6}.

Selecting a convergence test

Definition Selecting a convergence test means reading the form of ana_n and choosing a test whose hypotheses are easy to check for that form. No single test decides every series. The table lists the usual matches, roughly in the order to ask about them.

What you see in ana_nTest to try first
an↛0a_n \not\to 0nth term test, the series diverges
arnar^ngeometric series, converges exactly when ∣r∣<1\lvert r \rvert < 1
1np\frac{1}{n^p}p-series, converges exactly when p>1p > 1
bn−bn+1b_n - b_{n+1}telescoping
rational or algebraic in nnlimit comparison with a p-series
factorials or cnc^nratio test
(bn)n(b_n)^nroot test
(−1)nbn(-1)^n b_n with bn>0b_n > 0absolute convergence first, then the alternating series test
f(n)f(n) with ∫f\int f easyintegral test

In plain words Look at the shape of the terms before computing anything. First rule out divergence by the nth term test, then match the form to the test that handles it best.

Example For ∑n33n\sum \frac{n^3}{3^n} the exponential points to the ratio test, and

an+1an=(n+1)33n+1⋅3nn3=(n+1)33n3→13<1,\frac{a_{n+1}}{a_n} = \frac{(n + 1)^3}{3^{n+1}} \cdot \frac{3^n}{n^3} = \frac{(n + 1)^3}{3n^3} \to \frac{1}{3} < 1,

so it converges. For ∑1n2+n\sum \frac{1}{n^2 + \sqrt{n}} the terms are algebraic, and 1n2+n≤1n2\frac{1}{n^2 + \sqrt{n}} \le \frac{1}{n^2} settles it by direct comparison. Trying the ratio test on the second series would waste time, since its limit is 11.

Check yourself

  1. How many terms of ∑(−1)n−1n4\sum \frac{(-1)^{n-1}}{n^4} guarantee an error less than 10−410^{-4}?
Show the answer

The sizes 1n4\frac{1}{n^4} are positive, decreasing and tend to 00, so the alternating estimate applies. We need 1(n+1)4<10−4\frac{1}{(n + 1)^4} < 10^{-4}, that is n+1>10n + 1 > 10. So n=10n = 10 terms suffice. With n=9n = 9 the bound is exactly 10−410^{-4}, which is not strictly less.

  1. Bound the error of ∑k=0412kk!\sum_{k=0}^{4} \frac{1}{2^k k!} as an estimate of ∑k=0∞12kk!=e\sum_{k=0}^{\infty} \frac{1}{2^k k!} = \sqrt{e}.
Show the answer

For k≥5k \ge 5 the ratio of consecutive terms is 12(k+1)≤112\frac{1}{2(k + 1)} \le \frac{1}{12}. The first omitted term is 125⋅5!=13840\frac{1}{2^5 \cdot 5!} = \frac{1}{3840}, so the geometric tail bound gives

0<e−∑k=0412kk!≤1/38401−1/12=13520≈0.00028.0 < \sqrt{e} - \sum_{k=0}^{4} \frac{1}{2^k k!} \le \frac{1/3840}{1 - 1/12} = \frac{1}{3520} \approx 0.00028.
  1. Which test would you try first on ∑2nn!\sum \frac{2^n}{n!} and what does it give?
Show the answer

The factorial points to the ratio test. The ratio is 2n+1→0<1\frac{2}{n + 1} \to 0 < 1, so the series converges absolutely.

How this lesson connects