Tutorials › Calculus II › Taylor Error Estimates For Nonzero Centers

Remainders and Error Estimates · Tutorial 866 of 998

Taylor Error Estimates For Nonzero Centers

Use the Lagrange remainder at a nonzero center to certify approximation accuracy and choose a Taylor degree for a target tolerance.

Advanced 9 min read

What You'll Learn

  • Write and evaluate Taylor polynomials centered at a nonzero value.
  • Apply the Lagrange remainder bound on the interval between the center and target.
  • Distinguish the target point from the interval used to bound derivatives.
  • Check degrees from zero upward when seeking the first certified degree.
  • Verify an approximation against its exact value when available.

Why the Center Matters

A Taylor polynomial is built from the value of a function and its derivatives at a chosen center. The center need not be zero. When the target value \(x\) is near a nonzero center \(a\), the powers in the approximation are powers of the displacement \(x-a\), not powers of \(x\). To certify accuracy, we must also bound the relevant derivative on the interval from \(a\) to \(x\).

This distinction matters in applications: the function may be well behaved near the chosen center even when a bound based on a larger interval would be unnecessarily weak. A valid estimate depends on the interval actually connecting the center to the target, as well as on the derivative bound over that interval.

Definition: If \(f\) has \(n\) derivatives at \(a\), its degree-\(n\) Taylor polynomial centered at \(a\) is $$ T_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$ Here \(f^{(0)}(a)=f(a)\) and \(0!=1\). The center is nonzero when \(a\ne 0\).

The formula uses derivatives evaluated at the center \(a\), but the polynomial is evaluated at the target \(x\). If \(x=a\), every term with \(k\ge 1\) vanishes and \(T_n(a)=f(a)\). For \(x\ne a\), the size of the displacement \(|x-a|\) affects the remainder.

The Lagrange Bound Between the Center and Target

Suppose \(f\) has \(n+1\) continuous derivatives on a closed interval containing both \(a\) and \(x\). Taylor’s theorem with the Lagrange form of the remainder states that for some \(\xi\) between \(a\) and \(x\),

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

In particular, if \(\left|f^{(n+1)}(t)\right|\le M_{n+1}\) everywhere on the interval between \(a\) and \(x\), then taking absolute values gives the error estimate

$$ \left|f(x)-T_n(x)\right| \le \frac{M_{n+1}|x-a|^{n+1}}{(n+1)!}. $$

The interval here is the closed interval with endpoints \(a\) and \(x\), regardless of which endpoint is larger. The derivative bound must hold throughout that interval. A bound valid only at the center, or only at the target, is not enough.

Theorem: If \(f^{(n+1)}\) is continuous on the interval between \(a\) and \(x\), and \(\left|f^{(n+1)}(t)\right|\le M_{n+1}\) there, then the degree-\(n\) Taylor approximation at \(a\) has error at most $$ \frac{M_{n+1}|x-a|^{n+1}}{(n+1)!}. $$ For \(x=a\), the error is zero.

Why the Bound Works

The remainder formula identifies the error as a derivative value at some intermediate point, multiplied by the displacement to the power \(n+1\), and divided by \((n+1)!\). The derivative bound controls the intermediate derivative, while the absolute value removes any dependence on the sign of the remainder.

1
Start with the remainder.
For some \(\xi\) between \(a\) and \(x\), the error is \(f^{(n+1)}(\xi)(x-a)^{n+1}/(n+1)!\).
2
Use the derivative bound.
Since \(\xi\) lies in the interval where the bound holds, \(\left|f^{(n+1)}(\xi)\right|\le M_{n+1}\).
3
Take absolute values.
It follows that \(\left|f(x)-T_n(x)\right|\le M_{n+1}|x-a|^{n+1}/(n+1)!\), as claimed.

This reasoning explains the two main ingredients in a certified estimate: a valid bound for the next derivative and the distance from the center to the target. The derivative order is \(n+1\), one higher than the degree of the Taylor polynomial.

Worked Example: Certifying the First Degree That Meets a Tolerance

Worked Example: Finding the First Certified Degree

Let \(f(t)=0.005(t-2)+0.02(t-2)^2+0.01(t-2)^3\). Approximate \(f(2.5)\) with Taylor polynomials centered at \(a=2\), and use Lagrange bounds to find the first degree certified to have error at most \(0.00001\).

Set \(u=t-2\). The target displacement is \(h=2.5-2=0.5\), and the interval is \(2\le t\le 2.5\), or \(0\le u\le 0.5\). The derivatives are

$$ f'(t)=0.005+0.04u+0.03u^2,\qquad f''(t)=0.04+0.06u,\qquad f'''(t)=0.06,\qquad f^{(4)}(t)=0. $$

On the interval, \(f'(t)\) increases from \(0.005\) to \(0.0325\), so \(M_1=0.05\) is a valid bound. Also \(f''(t)\le 0.04+0.06(0.5)=0.07\), so take \(M_2=0.07\); take \(M_3=0.06\) and \(M_4=0\).

For degree zero, \(T_0(2.5)=f(2)=0\). Its bound is

$$ \left|f(2.5)-T_0(2.5)\right| \le \frac{0.05(0.5)}{1!}=0.025=\frac{0.1}{2^2}>0.00001. $$

For degree one, \(f'(2)=0.005\), so \(T_1(2.5)=0+0.005(0.5)=0.0025\). Its bound is

$$ \left|f(2.5)-T_1(2.5)\right| \le \frac{0.07(0.5)^2}{2!} =\frac{0.0175}{2}=0.00875>0.00001. $$

For degree two, \(f''(2)=0.04\), and therefore

$$ T_2(2.5)=0+0.005(0.5)+\frac{0.04}{2!}(0.5)^2 =0.0025+0.005=0.0075. $$

The degree-two error bound is

$$ \left|f(2.5)-T_2(2.5)\right| \le \frac{0.06(0.5)^3}{3!} =\frac{0.0075}{6}=0.00125>0.00001. $$

For degree three, the polynomial includes every term of \(f\), so \(T_3(2.5)=0.0025+0.005+0.00125=0.00875\). Since \(f^{(4)}(t)=0\), its error bound is \(0\), which meets the tolerance. Direct substitution gives \(f(2.5)=0.005(0.5)+0.02(0.25)+0.01(0.125)=0.00875\), confirming the approximation exactly. The degree-zero case has been checked as well as degrees one and two; thus degree three is the first certified degree.

Worked Example: A Rational Function at a Nonzero Center

Worked Example: Approximating a Reciprocal Near Two

Use a Taylor polynomial centered at \(a=2\) to approximate \(f(2.5)\), where \(f(t)=1/t\). Find the first degree certified to have error at most \(0.01\).

The interval is \([2,2.5]\), and \(h=0.5\). The derivatives are \(f'(t)=-t^{-2}\), \(f''(t)=2t^{-3}\), and \(f'''(t)=-6t^{-4}\). On this interval, their absolute values are largest at \(t=2\). Thus we may use \(M_1=1/4\), \(M_2=1/4\), and \(M_3=6/16=3/8\).

For degree zero, \(T_0(2.5)=f(2)=1/2\), and the bound is \((1/4)(0.5)=0.125\), which exceeds \(0.01\). For degree one, \(f'(2)=-1/4\), so \(T_1(2.5)=1/2-(1/4)(0.5)=3/8\). Its bound is

$$ \frac{M_2(0.5)^2}{2!} =\frac{(1/4)(1/4)}{2} =\frac{1}{32}=0.03125>0.01. $$

For degree two, \(f''(2)=1/4\), so

$$ T_2(2.5)=\frac12-\frac14(0.5)+\frac{1/4}{2!}(0.5)^2 =\frac12-\frac18+\frac1{32} =\frac{13}{32}. $$

The degree-two error bound is

$$ \frac{M_3(0.5)^3}{3!} =\frac{(3/8)(1/8)}{6} =\frac{1}{128}=0.0078125<0.01. $$

Therefore degree two is the first degree certified to meet the tolerance: degrees zero and one fail their bounds, and degree two passes. Checking against the exact value, \(f(2.5)=1/(5/2)=2/5=0.4\), while \(13/32=0.40625\). The actual absolute error is \(13/32-2/5=1/160=0.00625\), which is below both the certified bound \(1/128\) and the requested tolerance.

Worked Example: Approximating to the Left of the Center

Worked Example: A Square Root Centered at Four

Approximate \(\sqrt{3}\) using the degree-two Taylor polynomial for \(f(t)=\sqrt{t}\) centered at \(a=4\), and certify the error. The target is to the left of the center, so the interval to use is \([3,4]\), and \(h=3-4=-1\).

The derivatives at \(4\) are \(f(4)=2\), \(f'(4)=1/4\), and \(f''(4)=-1/32\). Hence

$$ T_2(3)=2+\frac14(-1)+\frac{-1/32}{2!}(-1)^2 =2-\frac14-\frac1{64} =\frac{111}{64}=1.734375. $$

For \(t>0\), \(f'''(t)=3/(8t^{5/2})\), which decreases as \(t\) increases. On \([3,4]\), it is therefore bounded by \(M_3=3/(8\cdot 3^{5/2})=1/(24\sqrt{3})\). The Lagrange estimate is

$$ \left|\sqrt{3}-\frac{111}{64}\right| \le \frac{M_3|{-1}|^3}{3!} =\frac{1}{144\sqrt{3}} \approx 0.004009. $$

For a direct check, \(\sqrt{3}\approx 1.732051\), so the absolute error is approximately \(1.734375-1.732051=0.002324\), below the bound. The displayed decimals are rounded to six places; the exact Taylor approximation is \(111/64\), and the inequality itself uses the exact bound \(1/(144\sqrt{3})\).

Choosing a Degree Reliably

For a prescribed tolerance \(\varepsilon>0\), a degree \(n\) is certified if a valid derivative bound gives

$$ \frac{M_{n+1}|x-a|^{n+1}}{(n+1)!}\le \varepsilon. $$

The bound may depend on \(n\), because each degree uses a different derivative. Therefore, do not assume that a familiar pattern in the bounds applies unless it has been justified. Check the derivative bound and the inequality for each candidate degree.

To identify the first certified degree, start with \(n=0\) and proceed upward. A degree that fails the bound is not certified by that particular estimate; this does not prove that the actual error exceeds the tolerance. Conversely, a bound below the tolerance guarantees the actual error is below it. This distinction between an actual error and a certified upper bound is essential.

Common Pitfall: Bounding the Derivative Only at the Center

A tempting but invalid shortcut is to evaluate \(f^{(n+1)}\) only at \(a\) and use that value as \(M_{n+1}\). The Lagrange remainder involves a derivative at an intermediate point \(\xi\), not necessarily at the center. Unless you have shown that the derivative’s absolute value is bounded by its center value throughout the interval, that substitution is unjustified.

For example, for \(f(t)=1/t\) centered at \(2\), \(f'''(2)=-3/8\), so its absolute value is \(3/8\). In this particular example, that value does bound \(\left|f'''(t)\right|\) on \([2,2.5]\), because \(6/t^4\) decreases there. But the validity comes from checking the whole interval, not merely evaluating at \(2\). For another function, the derivative could become larger between the endpoints.

Takeaway: A Taylor error estimate at a nonzero center uses the displacement \(|x-a|\) and a bound for the next derivative over the entire interval joining \(a\) and \(x\). To find the first certified degree, include degree zero and test each lower degree before claiming that a later one is first.

Check Your Understanding

For each question, identify the center, target, relevant interval, and derivative order before calculating.

  1. State the Lagrange error bound for a degree-\(n\) Taylor polynomial centered at \(a\), including the condition required of the derivative.
  2. If \(a=5\) and \(x=4.6\), what is the interval on which the derivative bound must hold, and what is the displacement magnitude?
  3. For a degree-four Taylor approximation, which derivative must be bounded?
  4. Why does evaluating the next derivative only at the center generally fail to provide a valid remainder bound?
  5. When seeking the first degree certified to meet a tolerance, why should degree zero be checked?