Tutorials › AP Calculus › Finding the Degree Needed for a Tolerance

Taylor Series and Error Bounds · Tutorial 893 of 999

Finding the Degree Needed for a Tolerance

Turn a requested error tolerance into a degree choice by applying a valid remainder bound, testing integer candidates, and checking that no smaller degree is certified.

Advanced 9 min read

What You'll Learn

  • Translate an absolute-error tolerance into a remainder-bound inequality.
  • Use a Lagrange remainder bound to select a Taylor-polynomial degree.
  • Use an alternating-series remainder bound when its hypotheses hold.
  • Test adjacent integer degrees with exact arithmetic before rounding.
  • Distinguish a degree certified by a chosen bound from the true error.
  • Verify minimality by checking every smaller candidate or proving the bounds decrease.

From an Error Tolerance to a Degree

A Taylor polynomial can approximate a function near its center, but a requested tolerance adds a practical question: how many terms are enough to guarantee the desired accuracy? The answer is not simply “keep adding terms until the numbers look close.” Instead, use a valid remainder bound, translate the tolerance into an inequality, and find the smallest integer degree for which that inequality holds.

The result is a guarantee based on the bound used. A remainder bound may be larger than the actual error, so the degree it certifies need not be the smallest degree that would succeed in reality. Keep that distinction clear when describing your answer.

Definition: For a requested absolute-error tolerance \(\varepsilon>0\), a Taylor polynomial \(P_n(x)\) meets the tolerance at \(x\) if \(|f(x)-P_n(x)|\leq\varepsilon\). A remainder bound \(B_n\) certifies the tolerance when the hypotheses for that bound hold and \(B_n\leq\varepsilon\).

The Candidate-Degree Procedure

A degree is a nonnegative integer. Begin with a formula that bounds the remainder after the degree-\(n\) Taylor polynomial, and make sure the bound applies to the function, interval, and point in the problem. Then solve the inequality \(B_n\leq\varepsilon\) for integer values of \(n\). If the bound decreases as \(n\) increases, testing the first passing degree and the degree immediately before it establishes that it is the smallest degree certified by this bound. If the bound is not known to decrease throughout the candidates, check all smaller degrees as well.

1
Identify the Taylor polynomial and the error target.
Record the center, evaluation point, degree variable \(n\), and tolerance \(\varepsilon\).
2
Choose an applicable remainder bound.
State its hypotheses, and find any required derivative bound or alternating-series condition.
3
Solve the bound inequality for integer degrees.
Use exact expressions where possible; do not round a candidate before deciding whether it passes.
4
Verify sufficiency and minimality.
Substitute the selected degree into the bound and check that smaller degrees do not meet the same certification criterion.

Bounds Used to Choose a Degree

For a Taylor polynomial of degree \(n\) centered at \(a\), Taylor’s theorem with the Lagrange remainder says that, if \(f\) has a continuous derivative of order \(n+1\) on the interval between \(a\) and \(x\), then for some point \(c\) between them,

$$ f(x)-P_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. $$

Consequently, if \(\left|f^{(n+1)}(t)\right|\leq M\) throughout that interval, then

$$ |f(x)-P_n(x)|\leq \frac{M|x-a|^{n+1}}{(n+1)!}. $$

To certify tolerance \(\varepsilon\), it is enough to find an integer \(n\geq0\) such that \(M|x-a|^{n+1}/(n+1)!\leq\varepsilon\). The derivative bound must apply to the derivative of order \(n+1\), not just to \(f\) itself.

Another option is the alternating-series remainder bound. If the Taylor series at the evaluation point is alternating, its term magnitudes decrease to zero, and the series converges to the function value, then the error after a partial sum is at most the magnitude of the first omitted term. This bound is appropriate only when those conditions hold. The first omitted term depends on the terms retained, so identify the partial sum carefully before writing the inequality.

Why the Bound Gives a Guarantee

The guarantee follows directly from what a remainder bound states. If the error satisfies \(|f(x)-P_n(x)|\leq B_n\), and \(B_n\leq\varepsilon\), then the order of these inequalities gives

$$ |f(x)-P_n(x)|\leq B_n\leq\varepsilon. $$

Thus the requested absolute-error condition holds. This argument proves sufficiency; it does not say that the actual error equals the bound. To claim the smallest degree certified by a particular bound, also verify that no smaller degree passes that bound. When the candidate bounds decrease with degree, the immediately preceding degree is enough: every still smaller degree has an equal or larger bound. Otherwise, test the remaining smaller candidates individually.

Worked Example: An Exponential Bound

Worked Example: An Exponential Bound

Find the smallest degree certified by the Lagrange bound for the Maclaurin polynomial of \(e^x\) at \(x=1\), with tolerance \(\varepsilon=0.001\).

The degree-\(n\) Maclaurin polynomial has Lagrange remainder involving the derivative of order \(n+1\). Every derivative of \(e^x\) is \(e^x\). On the interval \([0,1]\), \(e^x\leq e<3\), so \(M=3\) is a valid upper bound. Therefore,

$$ |e-P_n(1)|\leq \frac{3}{(n+1)!}. $$

Require \(3/(n+1)!\leq0.001=1/1000\). Test consecutive degrees around the point where the factorial makes the bound small enough. For \(n=5\),

$$ \frac{3}{(5+1)!} =\frac{3}{720} =\frac{1}{240} \approx0.004167>0.001. $$

Degree 5 does not pass this bound. For \(n=6\),

$$ \frac{3}{(6+1)!} =\frac{3}{5040} =\frac{1}{1680} \approx0.0005952<0.001. $$

The bound decreases as \(n\) increases here, since each step from \(n\) to \(n+1\) divides the bound by \(n+2\). In particular, all degrees below 5 have bounds at least as large as the degree-5 bound, and degree 5 fails. Substituting degree 6 gives a bound below the tolerance. Thus degree 6 is the smallest degree certified by this Lagrange bound. The conclusion concerns the guarantee from this bound, not a claim that the actual error for every smaller polynomial exceeds the tolerance.

Worked Example: A Sine Bound

Worked Example: A Sine Bound

Find the smallest degree certified by the Lagrange remainder for the Maclaurin polynomial of \(\sin x\) at \(x=0.4\), with tolerance \(\varepsilon=0.00001\).

Every derivative of \(\sin x\) is \(\sin x\), \(\cos x\), \(-\sin x\), or \(-\cos x\), each of which has absolute value at most 1. Hence \(M=1\) works for every derivative order on the interval from 0 to 0.4. The bound is

$$ |\,\sin(0.4)-P_n(0.4)\,| \leq \frac{(0.4)^{n+1}}{(n+1)!}. $$

For \(n=4\), use \(0.4=2/5\):

$$ \frac{(0.4)^5}{5!} =\frac{(2/5)^5}{120} =\frac{32}{3125\cdot120} =\frac{32}{375000} \approx0.00008533>0.00001. $$

Degree 4 fails. For \(n=5\),

$$ \frac{(0.4)^6}{6!} =\frac{(2/5)^6}{720} =\frac{64}{15625\cdot720} =\frac{64}{11250000} \approx0.000005689<0.00001. $$

The ratio of the bound for degree \(n+1\) to the bound for degree \(n\) is \(0.4/(n+2)\), which is less than 1 for every \(n\geq0\). The bounds therefore decrease with degree. Since degree 4 fails and degree 5 passes, and every lower degree has a bound at least as large as the degree-4 bound, degree 5 is the smallest degree certified by this Lagrange bound. The final comparisons use unrounded fractions, so rounding has not changed the pass-or-fail decisions.

Worked Example: An Alternating Logarithmic Series

Worked Example: An Alternating Logarithmic Series

Find the smallest degree whose alternating-series remainder bound certifies an absolute error no greater than \(0.0001\) for the Taylor polynomial of \(\ln(1+x)\) at \(x=1/2\).

For \(0<x\leq1\), the series is

$$ \ln(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\cdots. $$

At \(x=1/2\), the term magnitudes \((1/2)^k/k\) decrease to zero. The alternating-series remainder bound therefore applies. The degree-\(n\) polynomial retains terms through power \(n\), and its error is at most the magnitude of the next term:

$$ |\,\ln(1+1/2)-P_n(1/2)\,| \leq \frac{(1/2)^{n+1}}{n+1}. $$

For \(n=8\), the first omitted term is the term with power 9:

$$ \frac{(1/2)^9}{9} =\frac{1}{512\cdot9} =\frac{1}{4608} \approx0.0002170>0.0001. $$

Degree 8 does not meet the tolerance by this bound. For \(n=9\), the first omitted term has power 10:

$$ \frac{(1/2)^{10}}{10} =\frac{1}{1024\cdot10} =\frac{1}{10240} =0.00009765625<0.0001. $$

For each \(n\geq0\), the next-term bound at degree \(n+1\), divided by the bound at degree \(n\), is \(\frac{n+1}{2(n+2)}<1\). Thus these bounds decrease with degree. Since degree 8 fails and degree 9 passes, degree 9 is the smallest degree certified by the alternating-series bound. This conclusion uses the fact that the terms decrease and alternate at the specified input; without those conditions, the alternating-series remainder estimate would not be justified.

Common Pitfall: Rounding Before Testing

A common error is to round a bound or an intermediate quantity too early, then use the rounded value to decide whether a degree passes. Suppose a candidate gives a bound of \(0.0001004\) and the tolerance is \(0.0001\). Rounding the bound to four decimal places gives \(0.0001\), which might suggest that the candidate passes. But the unrounded comparison is

$$ 0.0001004>0.0001, $$

so it does not pass. Compare exact fractions when available, or retain enough digits to make the inequality decision certain; round only when reporting the final approximation. Also avoid interpreting a failed bound as proof that the actual error exceeds the tolerance. It shows only that this particular bound has not certified the tolerance.

What the Degree Answer Means

When a problem asks for the degree needed for a tolerance using a specified remainder estimate, state the bound and the degree it certifies. To support a minimality claim, show a passing candidate and demonstrate that smaller degrees fail the chosen criterion. If the bounds decrease with degree, checking the preceding integer is sufficient; otherwise, check each smaller candidate.

Always distinguish these conclusions:

StatementWhat it establishes
The bound is at most the tolerance.The polynomial is guaranteed to meet the tolerance.
The bound is greater than the tolerance.This bound does not certify the tolerance at that degree.
The next smaller degree fails and the bounds decrease.The selected degree is the smallest one certified by that bound.

A clear solution therefore includes more than a candidate integer. It identifies the applicable remainder estimate, checks its conditions, evaluates the bound at the chosen degree, and justifies why a smaller degree is not certified.

Check Your Understanding

For each question, focus on the bound’s hypotheses as well as the integer comparison.

  1. For the Lagrange remainder, which derivative order must be bounded when the Taylor polynomial has degree \(n\)?
  2. If a degree-\(n\) bound is below the tolerance but the degree-\((n-1)\) bound is above it, what additional fact lets you conclude that \(n\) is the smallest certified degree?
  3. For an alternating-series estimate, what must be true of the term magnitudes for the first omitted term to bound the error?
  4. If a remainder bound exceeds the tolerance, does that prove that the actual error exceeds the tolerance? Explain.
  5. A degree-7 bound is \(0.00008\) for a tolerance of \(0.0001\), and the bounds decrease with degree. What can you conclude about degree 7 and any smaller degree whose bound is at least \(0.0001\)?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon