From an Accuracy Target to a Taylor Degree
A Taylor polynomial is useful in computation only if its error is small enough for the task. Often the target is stated first: approximate a function value at a specified point with absolute error at most a given tolerance. The practical question is then not merely how to form a polynomial, but how many terms to retain to guarantee that tolerance.
The degree-selection process depends on an error bound. A bound is a guarantee, not usually the exact error: if it is larger than the tolerance, the approximation might still be accurate enough, but that bound has not certified it. Conversely, if the bound is at most the tolerance, the requested accuracy is guaranteed, assuming the bound’s hypotheses hold.
The distance from the center matters: Taylor remainder bounds contain a factor involving \(|x-a|^{n+1}\). A degree that is adequate near the center may not be adequate farther away. The examples below treat the evaluation point and tolerance as fixed, then test candidate degrees using a suitable bound.
The Lagrange-Bound Selection Test
Suppose \(f\) has continuous derivatives through order \(n+1\) on the closed interval between \(a\) and \(x\). If a number \(M\) satisfies \(|f^{(n+1)}(t)|\leq M\) throughout that interval, Taylor’s theorem gives the Lagrange remainder estimate
Thus, a candidate degree \(n\) is certified whenever the right-hand side is at most \(\varepsilon\). The derivative bound \(M\) can depend on the candidate degree, because each degree uses a derivative of a different order. Recalculate or justify the bound for each candidate rather than assuming it stays the same.
A useful workflow is to start with a low degree, evaluate a valid remainder bound, and increase the degree until the bound falls below the tolerance. To claim that this is the smallest degree certified by the chosen bound, also check that the bound for the preceding degree exceeds the tolerance. That comparison concerns the chosen estimate; it need not prove that a lower-degree polynomial’s actual error is too large.
Worked Example: An Exponential Approximation at Distance One-Half
Approximate \(e^{1/2}\) by its Maclaurin polynomial and find a degree certified to have absolute error at most \(10^{-4}\). For every nonnegative integer \(k\), the \(k\)-th derivative of \(e^t\) is \(e^t\). On \(0\leq t\leq 1/2\), \(e^t\leq e^{1/2}<2\), so we may use \(M=2\) for every candidate remainder order.
For degree \(4\), the bound uses the fifth derivative and the factor \((1/2)^5/5!\):
Degree \(4\) is not certified by this bound. For degree \(5\):
Therefore degree \(5\) meets the requested tolerance. Its polynomial value is
The degree and arithmetic check are consistent with the certificate: the stated approximation is the sum of the six terms through degree \(5\), and the Lagrange bound guarantees its distance from \(e^{1/2}\) is less than \(0.0001\). Degree \(4\) fails the same conservative test, so degree \(5\) is the first degree certified by this particular bound.
Using an Alternating-Series Bound
For some Taylor series, the terms at the evaluation point alternate in sign and decrease in magnitude to zero. If the series converges to \(f(x)\) at that point, the alternating-series estimate says that the error after truncation is no greater than the magnitude of the first omitted term.
The convergence-to-\(f(x)\) condition is essential. Alternating-series reasoning by itself bounds the difference between a partial sum and the sum of the series; it does not establish that the series sum equals the function value. One way the estimate works is that consecutive partial sums bracket the series sum: the even partial sums move in one direction, the odd partial sums in the other, and the gap between consecutive partial sums is the next term. As the terms tend to zero, the limit lies within one next-term gap of either partial sum. If that limit is \(f(x)\), the desired function error is bounded too.
For Taylor series with zero coefficients, inspect the nonzero terms in order. The first omitted nonzero term may have degree greater than \(n+1\). The alternating bound uses that term’s magnitude, provided the signed terms alternate and decrease as required.
Worked Example: Choosing a Degree for the Cosine Series
Approximate \(\cos(0.6)\) with absolute error at most \(10^{-4}\). The Maclaurin series is \(\sum_{k=0}^{\infty}(-1)^k x^{2k}/(2k)!\), and it converges to \(\cos x\) for every real \(x\). At \(x=0.6\), its nonzero term magnitudes decrease: the ratio of a term to its predecessor is \[ \frac{0.6^{2k+2}/(2k+2)!}{0.6^{2k}/(2k)!} =\frac{0.36}{(2k+2)(2k+1)}<1 \quad(k\geq0). \] Thus the alternating-series estimate applies to the function error.
The degree-\(2\) polynomial keeps \(1-x^2/2!\); its first omitted term has magnitude
For degree \(4\), the next nonzero term has degree \(6\), so the bound is
Hence degree \(4\) is certified, while degree \(2\) is not certified by this estimate. The intervening degree-\(3\) Taylor polynomial equals the degree-\(2\) polynomial, since the coefficient of \(x^3\) is zero; it has the same first omitted nonzero term and does not meet the bound. The approximation is \[ T_4(0.6)=1-\frac{0.36}{2}+\frac{0.1296}{24} =1-0.18+0.0054=0.8254. \] The computed polynomial value and first omitted term verify the calculation: the alternating-series guarantee places \(\cos(0.6)\) within \(0.0000648\) of \(0.8254\).
A Second Alternating-Series Selection
The same approach works when the terms are not powers of a single even exponent, as long as the hypotheses are checked at the chosen evaluation point. The following example also illustrates that the first omitted term determines the degree test directly.
Worked Example: Approximating a Logarithm at One-Third
Choose a Taylor degree to approximate \(\ln(1+1/3)\) with absolute error at most \(10^{-4}\). For \(|x|<1\), the Taylor series \[ \ln(1+x)=\sum_{k=1}^{\infty}(-1)^{k+1}\frac{x^k}{k} \] converges to \(\ln(1+x)\). At \(x=1/3\), the term magnitudes \(b_k=(1/3)^k/k\) decrease to zero, since \[ \frac{b_{k+1}}{b_k}=\frac{k}{3(k+1)}<1. \] The alternating-series estimate therefore bounds the error in approximating the logarithm itself.
A degree-\(5\) Taylor polynomial retains terms through \(k=5\). Its first omitted term has magnitude
For degree \(6\), the first omitted term has magnitude
Thus degree \(6\) is the first degree certified by this bound. Evaluating its polynomial gives
The bound \(1/15309\) verifies that this computed value differs from \(\ln(4/3)\) by less than \(10^{-4}\). The degree-\(5\) bound is larger than the tolerance, so it does not certify degree \(5\).
Choosing Between the Bounds
The Lagrange and alternating-series approaches answer the same practical question, but they require different information. A derivative bound can be used even when the Taylor series is not known to converge to the function at the evaluation point. The alternating estimate can be sharper for a suitable series, but requires both the alternating, decreasing-term conditions and convergence of that series to the function value.
| Method | What must be checked | Degree test |
|---|---|---|
| Lagrange remainder | The required derivatives exist on the interval, and the derivative of order \(n+1\) has a valid bound \(M\). | \(M|x-a|^{n+1}/(n+1)!\leq\varepsilon\). |
| Alternating-series remainder | The series represents \(f(x)\) there; its terms alternate, decrease in magnitude, and tend to zero. | The first omitted term’s magnitude is at most \(\varepsilon\). |
In either method, test the actual evaluation point and candidate degree. If a bound is not small enough, that does not prove the approximation is inaccurate; it means only that this bound has not supplied the requested guarantee. Another valid bound may certify the same degree, or a higher degree may be needed.
Common Pitfall: Bounding a Series Is Not Yet Bounding the Function Error
A common error is to observe alternating Taylor terms and immediately apply the first-omitted-term estimate to \(|f(x)-T_n(x)|\). That conclusion skips an important step: the estimate first controls the error relative to the sum of the series. Unless that sum is known to equal \(f(x)\) at the evaluation point, it does not give the required function error.
Another useful distinction is between the smallest degree certified by an estimate and the smallest degree that actually achieves the tolerance. A conservative bound can fail its test even when the true error is small. Degree selection is therefore a guarantee based on stated assumptions, not a claim that every lower-degree approximation must fail.
Check Your Understanding
For each question, identify which condition or calculation is needed to justify the degree choice.
- For a degree-\(n\) Taylor polynomial centered at \(a\), what derivative and interval information is needed to apply the Lagrange remainder bound at \(x\)?
- If the Lagrange bound at degree \(n\) is below the tolerance, what has been established? What has not necessarily been established about degree \(n-1\)?
- Why does an alternating Taylor series with decreasing terms not automatically bound the difference between \(f(x)\) and its Taylor polynomial?
- For \(\cos x\), why can a degree-\(3\) Taylor polynomial have the same first omitted nonzero term as the degree-\(2\) polynomial?
- When selecting a degree using an alternating-series bound, which term’s magnitude is compared with the tolerance?