Tutorials › Calculus II › A Degree-Selection Workshop For Prescribed Accuracy

Remainders and Error Estimates · Tutorial 870 of 998

A Degree-Selection Workshop For Prescribed Accuracy

Work through a systematic method for choosing and verifying the least Taylor degree that meets a stated error tolerance.

Advanced 11 min read

What You'll Learn

  • Translate a prescribed tolerance into a requirement on the Taylor remainder.
  • Choose between a Lagrange derivative bound and an alternating-series bound.
  • Find the first degree whose certified error is below the tolerance.
  • Distinguish a bound that certifies accuracy from the actual approximation error.
  • Verify least degree by showing that lower-degree approximations fail.
  • Handle Taylor polynomials whose highest nonzero term is below their nominal degree.

From an Accuracy Target to a Taylor Degree

A Taylor polynomial is useful only if its error is small enough for the task at hand. In a degree-selection problem, the function, expansion center, target point, and tolerance are specified; the question is how many Taylor terms are needed to guarantee the requested accuracy.

The main difficulty is not usually calculating the polynomial. It is choosing a remainder theorem whose hypotheses apply, obtaining a valid numerical bound, and distinguishing “this degree is certified” from “this is the least degree that works.” A bound larger than the tolerance does not prove that an approximation fails. To establish least degree, we need separate evidence that every lower-degree choice misses the target.

Definition: Let \(P_n(x)\) be the Taylor polynomial of degree \(n\) for \(f\) centered at \(a\). At a target \(x\), its actual error is \(R_n(x)=f(x)-P_n(x)\). For tolerance \(\varepsilon>0\), the approximation meets the target when \(|R_n(x)|\leq\varepsilon\). A remainder bound \(B_n\) certifies the target if \(|R_n(x)|\leq B_n\leq\varepsilon\).

Choose a Remainder Bound That Applies

The Lagrange form of the Taylor remainder says that if \(f\) has continuous derivatives through order \(n+1\) on the interval joining \(a\) and \(x\), then for some \(\xi\) between \(a\) and \(x\),

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

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

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

The maximum \(M\) must bound the derivative on the whole interval, not merely at the center or target. An alternative is available when a function has an alternating series at the target: if the term magnitudes decrease to zero, the error after truncation is no larger than the first omitted term. These methods are not interchangeable without their hypotheses. The Lagrange bound requires a derivative bound; the alternating-series bound requires an applicable alternating expansion with decreasing terms tending to zero.

Once a valid bound \(B_n\) is chosen, test integer degrees in increasing order until \(B_n\leq\varepsilon\). Then check whether a lower degree could nevertheless meet the tolerance. Often the bound for a lower degree is too large to decide that question, so a lower bound on the actual error is needed.

A Reliable Selection Procedure

1
Write down the target data.
Identify \(f\), the center \(a\), the target \(x\), and the tolerance \(\varepsilon\). The remainder depends on the distance \(|x-a|\).
2
Check available remainder methods.
For a Lagrange estimate, check the derivative hypothesis and bound the derivative on the full interval. For an alternating estimate, check the series and the decrease of its term magnitudes.
3
Test candidate degrees.
Substitute the target distance and derivative or term bound into the remainder estimate. Keep exact fractions as long as practical.
4
Certify and test minimality.
Show that the chosen degree's bound is at most \(\varepsilon\). Then show that each smaller degree fails, or explain why the selected result is only the least degree certified by that particular bound.

Worked Examples

Worked Example: Exponential at a Nonzero Target

Approximate \(e^{1/2}\) by a Maclaurin polynomial with error at most \(0.0006\), and determine the least degree that meets this tolerance.

For \(f(x)=e^x\), every derivative is \(e^x\). On \([0,1/2]\), \(e^x\leq e^{1/2}<2\), so \(M=2\) is a valid derivative bound. The Lagrange estimate for degree \(n\) is therefore

$$ |R_n(1/2)|\leq \frac{2(1/2)^{n+1}}{(n+1)!}. $$

For \(n=4\), this gives

$$ |R_4(1/2)|\leq \frac{2(1/2)^5}{5!} =\frac{2}{32\cdot120} =\frac{1}{1920} \approx 0.0005208<0.0006. $$

The degree-four polynomial is \(P_4(x)=1+x+x^2/2!+x^3/3!+x^4/4!\). Substitution gives

$$ P_4(1/2)=1+\frac12+\frac18+\frac1{48}+\frac1{384} =\frac{384+192+48+8+1}{384} =\frac{633}{384} =\frac{211}{128} =1.6484375. $$

Thus the approximation \(211/128\) is certified within \(1/1920\), which is below the requested tolerance. To check that degree four is least, note that all terms of the exponential series at \(1/2\) are positive. The error after degree three is therefore greater than its first omitted term:

$$ R_3(1/2)>\frac{(1/2)^4}{4!} =\frac{1}{384} \approx0.002604>0.0006. $$

Every still-lower Taylor polynomial omits at least these same positive terms, so its error is also greater than \(1/384\). Degree four meets the target and all smaller degrees fail. The selected degree is least.

Worked Example: Logarithm with an Alternating-Series Bound

Find the least degree of the Taylor polynomial centered at \(0\) that approximates \(\ln(1.2)\) with error at most \(0.0001\).

For \(|x|<1\), the logarithm series is \(\ln(1+x)=x-x^2/2+x^3/3-\cdots\). At \(x=1/5\), its term magnitudes decrease, so the alternating-series remainder is at most the first omitted term. For a degree-four polynomial,

$$ |R_4(1/5)|\leq\frac{(1/5)^5}{5} =\frac{1}{15625} =0.000064<0.0001. $$

The approximation is

$$ P_4(1/5) =\frac15-\frac{(1/5)^2}{2}+\frac{(1/5)^3}{3}-\frac{(1/5)^4}{4} =\frac15-\frac1{50}+\frac1{375}-\frac1{2500} =\frac{1367}{7500} \approx0.1822667. $$

To establish minimality, use the alternating-series fact that the remainder has the sign of its first omitted term and magnitude greater than the first omitted term minus the next one. After degree three, the first two omitted magnitudes are \(1/2500\) and \(1/15625\), giving

$$ |R_3(1/5)|>\frac1{2500}-\frac1{15625} =\frac{21}{62500} =0.000336>0.0001. $$

The lower degrees also fail. After degree two, the corresponding difference is \(1/375-1/2500=17/7500>0.0001\); after degree one, it is \(1/50-1/375=13/750>0.0001\). The degree-zero error is \(\ln(1.2)=\int_0^{1/5}(1+t)^{-1}\,dt\), which is at least \((1/5)/(6/5)=1/6>0.0001\). Hence degree four is the least degree meeting the tolerance. The exact remainder theorem certifies the stated approximation; the lower bounds verify that the earlier degrees cannot meet the target.

Worked Example: Sine and a Degree That Adds a Nonzero Term

Approximate \(\sin(1)\) with error at most \(0.00001\), using its Maclaurin polynomial, and find the least degree.

The sine series is alternating at \(x=1\), with decreasing term magnitudes \(1/(2k+1)!\) tending to zero. The degree-seven Taylor polynomial is

$$ P_7(1)=1-\frac1{3!}+\frac1{5!}-\frac1{7!} =\frac{5040-840+42-1}{5040} =\frac{4241}{5040} \approx0.8414683. $$

The first omitted term has magnitude \(1/9!\), so

$$ |\sin(1)-P_7(1)|\leq\frac1{9!} =\frac1{362880} \approx0.000002756<0.00001. $$

For minimality, degrees five and six give the same polynomial, since the coefficient of \(x^6\) is zero. Their first omitted nonzero term has magnitude \(1/7!\). The alternating remainder has magnitude greater than this term minus the next one:

$$ |\sin(1)-P_5(1)| >\frac1{7!}-\frac1{9!} =\frac{71}{362880} \approx0.0001957>0.00001. $$

For degree three or four, the corresponding lower bound is \(1/5!-1/7!=41/5040>0.00001\). For degree one or two it is \(1/3!-1/5!=19/120>0.00001\), and degree zero gives error \(\sin(1)\), which is greater than \(1-1/3!=5/6\) by the alternating-series estimate. Thus all degrees below seven fail, while degree seven passes. This also illustrates why the nominal degree and the highest nonzero term need not coincide.

Why the Bound Must Match the Function

A remainder theorem provides a guarantee only when its conditions are satisfied. For the exponential example, it would be incorrect to call the first omitted term an upper bound. The degree-four first omitted term is

$$ \frac{(1/2)^5}{5!}=\frac1{3840}\approx0.0002604. $$

But the exponential remainder contains further positive terms. In particular, it is greater than the sum of its first two omitted terms:

$$ R_4(1/2)>\frac1{3840}+\frac{(1/2)^6}{6!} =\frac{12}{46080}+\frac{1}{46080} =\frac{13}{46080}. $$

So the first omitted term is not an upper bound in this example. The alternating-series theorem does not apply to this positive-term tail. The Lagrange estimate supplies the valid upper bound instead.

Key distinction: If a certified bound is at most the tolerance, the approximation is guaranteed to meet the target. If a certified bound exceeds the tolerance, that alone does not show failure; the actual error could be smaller. A proof of least degree needs a valid lower estimate for the errors of the lower-degree candidates.

Check Your Understanding

For each question, attend to both the error estimate and the reason its hypotheses apply.

  1. For a Lagrange remainder estimate, where must the derivative bound hold: at the center, at the target, or throughout the interval between them?
  2. What two conditions on the terms are needed to use the alternating-series remainder bound?
  3. If a degree-\(n\) remainder bound exceeds the tolerance, what does that tell you—and what does it not tell you?
  4. Why does bounding the first omitted term not generally certify the exponential approximation error?
  5. For \(\sin(x)\), why can the degree-five and degree-six Taylor polynomials be identical?