Choose enough terms for a tolerance
How many terms for an error of 0.01
The series is \(\tfrac12-\tfrac18+\tfrac1{24}-\cdots\), and term \(n\) has size \(\dfrac1{n\,2^n}\). Each bar shows the size of one term.
The tolerance is the largest error that you accept. Here it is 0.01, and the dashed line marks it.
The partial sum \(S_k\) adds the first \(k\) terms, which are the teal bars. Its error is at most the size of the first omitted term, so that bar must not rise above the dashed line.
Move the slider. The ring on the first omitted bar is red above the line and green at or below it.
With 3 terms, the first omitted size is \(\tfrac1{64}\approx0.0156\), which is above the line. With 4 terms, it is \(\tfrac1{160}=0.00625\), which is below the line, so four terms are enough.
As a check, \(S_4\approx0.401\) is within 0.00625 of the sum \(\ln\tfrac32\approx0.405\).
Any tolerance
Write the tolerance as \(\varepsilon\), the Greek letter epsilon. Move the slider to change the height of the dashed line.
The sizes decrease, so the bars fall as \(n\) grows. Once a bar is at or below the line, every later bar is too.
Find the first bar at or below the line, and call its index \(k+1\). Then \(k\) terms are enough, and they are the teal bars.
Fewer terms are not guaranteed, because then the first omitted bar is above the line.
Notation
The dashed line marks the tolerance \(\varepsilon\).
Write \(b_n\) for the size of term \(n\) and \(S\) for the sum of the series. You require the error bound to be at most the tolerance.
\[|S-S_k|\le\cy{b_{k+1}}\le\varepsilon\]The first inequality is the error bound. The second is the condition on \(k\).
Solve \(b_{k+1}\le\varepsilon\) for \(k\). The solution is usually not a whole number.
Write the first omitted size with the index \(k+1\), not \(k\).
The number of terms must be a whole number, so you round up.
Test the answer with two bars. For \(k\) terms, the first omitted bar is at or below the line. For \(k-1\) terms, the first omitted bar is bar \(k\), ringed in red, and it is above the line.
When it fails
Take the sizes \(b_n=\dfrac1{n^2+1}\) and \(\varepsilon=0.0056\). The inequality \(\dfrac1{(k+1)^2+1}\le0.0056\) becomes \((k+1)^2+1\ge178.6\), which gives \(k+1\ge13.3\).
Rounding to the nearest whole number gives 13, so \(k=12\), and \(b_{13}=\tfrac1{170}\approx0.00588\) is above the line. Rounding up gives 14, so \(k=13\), and \(b_{14}=\tfrac1{197}\approx0.00508\) is below the line.
Example 1: solving a linear inequality
How many terms of \(\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{4n}\) guarantee an error of at most 0.003? Find the fewest.
The signs alternate, and the sizes \(\dfrac1{4n}\) decrease to 0, so the alternating error bound applies. The graph shows the bars for \(n=70\) to 97.
The first omitted size is \(b_{k+1}=\dfrac1{4(k+1)}\). Require it to be at most 0.003.
\[\frac1{4(k+1)}\le0.003\]Both sides are positive, so taking reciprocals reverses the inequality. The orange dashed line marks 83.3.
\[k+1\ge\frac1{4\cdot0.003}\approx83.3\]Round up to a whole number. Then \(k+1=84\), so \(k=83\).
\[\cy{k=83}\]Test the answer. The size \(b_{84}=\tfrac1{336}\approx0.002976\) is at most 0.003. The size \(b_{83}=\tfrac1{332}\approx0.003012\) is above 0.003.
Example 2: a cube in the denominator
How many terms of \(\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{n^3}\) guarantee an error of at most 0.004? Find the fewest.
The signs alternate and the sizes decrease to 0, so the bound applies. The first omitted size is \(b_{k+1}=\dfrac1{(k+1)^3}\). Require it to be at most 0.004.
\[\begin{aligned}\frac1{(k+1)^3}&\le0.004\\ (k+1)^3&\ge250\end{aligned}\]Take the cube root of both sides.
\[k+1\ge\sqrt[3]{250}\approx6.30\]A tempting wrong move: The result is 6.30, so \(k\) is 6.30. Round up: use 7 terms.
\[k\approx6.30\;\Rightarrow\;k=7\]The inequality gives \(k+1\), not \(k\). The seventh bar, \(\tfrac1{343}\approx0.0029\), is teal but already below the dashed line, so six terms are enough.
Round \(k+1\) up to 7. Then \(k=6\).
\[\cy{k=6}\]Test the answer. The size \(b_7=\tfrac1{343}\approx0.0029\) is at most 0.004. The size \(b_6=\tfrac1{216}\approx0.0046\) is above 0.004.
Practice
How many terms of \(\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{n^2+3}\) guarantee an error of at most 0.002? Find the fewest.
Round \(k+1\) up before you subtract 1. On the graph, the answer is the smallest \(k\) that makes the ring green.
Solution
The first omitted size is \(b_{k+1}=\dfrac1{(k+1)^2+3}\). Require it to be at most 0.002.
\[\begin{aligned}\frac1{(k+1)^2+3}&\le0.002\\ (k+1)^2+3&\ge500\end{aligned}\]Subtract 3. Then take the positive square root.
\[\begin{aligned}(k+1)^2&\ge497\\ k+1&\ge\sqrt{497}\approx22.3\end{aligned}\]Round \(k+1\) up to 23. Then \(k=22\).
\[\cy{k=22}\]Test the answer. The size \(b_{23}=\tfrac1{532}\approx0.00188\) is at most 0.002. The size \(b_{22}=\tfrac1{487}\approx0.00205\) is above 0.002.
Questions
The bars show the sizes of the terms of \(\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{2^n}\). The two dashed lines mark the tolerances 0.02 and 0.03.
How many terms are enough to guarantee an error of at most 0.02?
- 5
- 6
- 4
Answer
5
A student adds four terms and claims that the error is at most 0.03. Does the alternating error bound guarantee this?
- No, because the first omitted bar, 0.03125, is above the line at 0.03.
- Yes, because 0.03125 is about 0.03.
- Yes, because all later bars are lower than the line.
Answer
No, because the first omitted bar, 0.03125, is above the line at 0.03.
How many terms of \(\sum_{n=1}^{\infty}\dfrac{(-1)^{n+1}}{2n+1}\) guarantee an error of at most 0.002?
- 249
- 248
- 250
Answer
249
Summary
You require the first omitted size to be at most the tolerance, solve for the number of terms, and round up.
This works because the error is at most the first omitted size, and later sizes are smaller, so more terms also meet the tolerance.
You use it when a question asks how many terms give an alternating sum within a given error.
This is one of four skills in topic 10.10 of Which & Why: AP Calculus.