Mathematics · Article
Taylor expansions and error estimates
Construct finite derivative-matching polynomials, prove and use remainder bounds, and distinguish local approximation from an infinite function representation. Certify square-root, exponential and trigonometric calculations while keeping domains and other error sources explicit.
Back to MathematicsAfter reading, you can
- Construct a Taylor polynomial with the correct centre, factorials, order and zero coefficients.
- Use Lagrange and integral remainders with verified derivative hypotheses.
- Choose a degree or nearby centre to meet an explicit truncation tolerance.
- Prove exponential and trigonometric Taylor representations by vanishing remainders.
- Distinguish fixed-order local limits, increasing-order series limits and numerical error guarantees.
- Explain, with a smooth counterexample, why a convergent Taylor series need not represent its function.
Build an approximation from information at one point
Near x=4, the function √x has value 2 and slope 1/4. Its tangent approximation at x=4+h is 2+h/4. Including its second derivative gives 2+h/4−h²/64. These polynomials use local derivative information; an error estimate will say how far we may trust their values.
At h=1/5 the quadratic gives 3279/1600=2.049375. The exact value is √(21/5). We will prove that the approximation is below the function and that the gap is at most 1/64000. Agreement of several displayed digits is evidence from a calculation; the derivative bound supplies the guarantee.
Preparation: use derivative rules, Taylor-style linear approximation, the mean value theorem, integration and power series. Start with the finite polynomial and remainder estimate. The integral proof, local asymptotic notation and smooth-function counterexample are optional deeper routes. An infinite Taylor series requires an additional convergence-to-the-function argument.
Factorials make the first derivatives agree
For a function with derivatives through order N at a, define T_N(x)=Σₖ₌₀ᴺ[f⁽ᵏ⁾(a)/k!](x−a)ᵏ, with f⁽⁰⁾=f and 0!=1. This is its order-N Taylor polynomial at a. When a=0, it is also called a Maclaurin polynomial. Its degree is at most N: zero derivative coefficients can lower the actual degree.
Differentiating (x−a)ᵏ exactly k times gives k!, so T_N⁽ᵏ⁾(a)=f⁽ᵏ⁾(a) for 0≤k≤N. All other powers either differentiate to zero or retain a positive power of x−a. Dividing by k! is what makes the kth derivative match, rather than multiplying that derivative by an extra factorial.
This polynomial is unique among polynomials of degree at most N with those derivative values. If two such polynomials existed, their difference would have every derivative through N equal to zero at a, forcing every coefficient in powers of x−a to be zero. Matching derivatives describes how the approximation is built; it does not yet bound a finite-distance error.
An unknown intermediate derivative gives an exact remainder
Write R_N(x)=f(x)−T_N(x). A convenient sufficient hypothesis is that f has N+1 continuous derivatives on a closed interval containing a and x. For x≠a, Taylor’s theorem gives a point ξ strictly between a and x such that R_N(x)=f⁽ᴺ⁺¹⁾(ξ)(x−a)ᴺ⁺¹/(N+1)!. At x=a the remainder is zero directly.
The point ξ generally depends on x and N and is not usually known. Replacing f⁽ᴺ⁺¹⁾(ξ) with f⁽ᴺ⁺¹⁾(a) is not an exact error formula. Instead, bound the magnitude of that derivative on the whole segment between a and x. If it is at most M, then |R_N(x)|≤M|x−a|ᴺ⁺¹/(N+1)!.
For a uniform guarantee on |x−a|≤h, verify the derivative bound on that entire interval and use M hᴺ⁺¹/(N+1)!. The constant may depend on N. A bound on one sampled derivative value or only at the centre does not establish a bound at the unknown intermediate point.
The case N=0 is the mean value theorem. The theorem concerns a finite polynomial and exact remainder; it does not require an infinite series to converge. Derivative bounds may be conservative, so a sufficient degree from them need not be the smallest degree that actually meets the target.
Optional: repeated Rolle arguments locate the missing derivative
For x≠a, set K=[f(x)−T_N(x)]/(x−a)ᴺ⁺¹ and define g(t)=f(t)−T_N(t)−K(t−a)ᴺ⁺¹. Then g(x)=0 and g⁽ᵏ⁾(a)=0 for every k from 0 through N. Apply Rolle’s theorem between a and x to find a zero of g′, then between that zero and a to find a zero of g″. Continue through N+1 applications.
The result is a point ξ between a and x with g⁽ᴺ⁺¹⁾(ξ)=0. The Taylor polynomial has no derivative of that order, so f⁽ᴺ⁺¹⁾(ξ)−(N+1)!K=0. Substituting the definition of K gives the exact remainder formula. The stated continuity and differentiability hypotheses justify every Rolle step, in either direction from the centre.
Optional: the error is a weighted accumulation of derivatives
Under the same continuous-derivative hypotheses, the exact remainder also equals (1/N!) times the integral from a to x of f⁽ᴺ⁺¹⁾(t)(x−t)ᴺ dt. For N=0 this is the fundamental theorem of calculus. For N≥1, integration by parts turns that integral into the corresponding order-(N−1) remainder minus f⁽ᴺ⁾(a)(x−a)ᴺ/N!. Induction gives f(x)−T_N(x).
Writing x=a+h and substituting t=a+uh gives R_N(a+h)=hᴺ⁺¹/N! times the integral from 0 to 1 of f⁽ᴺ⁺¹⁾(a+uh)(1−u)ᴺ du. This formula retains the correct orientation when h<0. The weight is nonnegative and integrates to 1/(N+1). Bounding the derivative magnitude by M therefore yields the same M|h|ᴺ⁺¹/(N+1)! estimate.
The weighted form can also reveal the sign. For h>0 and f⁽ᴺ⁺¹⁾≥0 throughout the segment, R_N≥0, so the polynomial is a lower approximation. For h<0 the factor hᴺ⁺¹ and the actual derivative sign must both be considered. A bound on absolute error alone does not decide which side of the function the polynomial lies on.
Use a nearby centre and a derivative bound on the segment
For f(x)=√x at a=4, f′(4)=1/4 and f″(4)=−1/32. Thus T₂(4+h)=2+h/4−h²/64. Its third derivative is f‴(x)=3/(8x⁵ᐟ²), positive and decreasing for x>0.
On [4,21/5], the third derivative is at most its value 3/256 at 4. At h=1/5, Taylor’s theorem gives 0<R₂≤(3/256)(1/5)³/3!=1/64000. Hence 3279/1600<√(21/5)≤3279/1600+1/64000. The upper endpoint is 131161/64000=2.049390625.
The bound is valid because the whole segment stays away from x=0, where derivatives of √x become unbounded. A centre near the desired input keeps the displacement small and makes a useful derivative bound easier to obtain. Increasing the degree is only one way to improve an approximation.
The remainder is positive: the polynomial is below the function.
| Quantity | Value |
|---|---|
| Taylor order used for the bound | 2 |
| Input x | 21/5 |
| Displacement h | 1/5 |
| Exact polynomial value | 3279/1600 |
| Proved absolute error bound | 1/64000 |
| Certified lower value | 3279/1600 |
| Certified upper value | 131161/64000 |
| Approximate function value | 2.0493901532 |
| Error-panel normalisation B_max | 1/4096 |
A local approximation and an infinite representation use different limits
Fix N and let x approach a. With a bounded next derivative, Taylor’s theorem gives an error of order |x−a|ᴺ⁺¹. This explains why a finite polynomial describes local behaviour. It does not involve increasing N.
Now fix x and increase N. The formal Taylor series is Σₖ₌₀∞f⁽ᵏ⁾(a)(x−a)ᵏ/k!. It represents f(x) exactly when R_N(x)→0. Convergence of the coefficient series to some number is not enough: that limit must be the intended function value.
A sufficient condition on a whole interval |x−a|≤h is M_(N+1) hᴺ⁺¹/(N+1)!→0, where M_(N+1) bounds the derivative of order N+1 on the interval. One must account for how these derivative bounds grow with N. A factorial in the denominator alone is not a universal proof, because the numerator can also grow rapidly.
A factorial bound proves the exponential identity everywhere
All derivatives of eˣ are eˣ, so its Maclaurin polynomial is E_N(x)=Σₖ₌₀ᴺxᵏ/k!. On |x|≤A with A>0, every derivative magnitude is at most eᴬ. Thus |eˣ−E_N(x)|≤eᴬ Aᴺ⁺¹/(N+1)! for every input in that closed interval.
For fixed A, the ratio of consecutive numerical bounds is A/(N+2), eventually at most 1/2. Their tail therefore tends to zero geometrically. This proves eˣ=Σₖ₌₀∞xᵏ/k! for every real x, with uniform convergence on each bounded interval. The identity follows from the remainder argument, not solely from a ratio test showing that the series converges.
At x=1/2 the degree-5 polynomial is 6331/3840. Its positive omitted tail can be bounded more tightly using the now-proved series: the first omitted term is 1/46080, and each subsequent ratio is at most 1/14. Therefore 0<R₅≤(1/46080)/(1−1/14)=7/299520<1/40000. This geometric-tail bound and the derivative remainder are two valid certificates with different tightness.
| Quantity | Value |
|---|---|
| Polynomial degree | 5 |
| Input x | 1/2 |
| Exact polynomial value | 6331/3840 |
| First omitted term | 1/46080 |
| Upper bound q on every following ratio | 1/14 |
| Proved absolute error bound | 7/299520 |
| Certified lower value | 6331/3840 |
| Certified upper value | 98765/59904 |
| Approximate function value | 1.6487212707 |
Zero coefficients can improve a remainder estimate
For sine at 0 the derivative cycle gives sin x=Σₖ₌₀∞(−1)ᵏx²ᵏ⁺¹/(2k+1)!. For cosine it gives cos x=Σₖ₌₀∞(−1)ᵏx²ᵏ/(2k)!. Every derivative magnitude is at most 1. The same factorial remainder argument proves both identities for all real x. Angles here are measured in radians.
The sine polynomial x−x³/6 has degree 3 but is also the order-4 Taylor polynomial, because the fourth coefficient is zero. Applying the remainder theorem at order 4 gives |sin x−(x−x³/6)|≤|x|⁵/120. At x=3/10 its value is 591/2000 and the error is at most 81/4000000=0.00002025.
Similarly 1−x²/2+x⁴/24 is both the order-4 and order-5 cosine polynomial. Using order 5 gives error at most |x|⁶/720. At x=3/10 the polynomial is 76427/80000 and the bound is 81/80000000. The order used in the theorem is distinct from the number of nonzero terms.
A next-nonzero-term estimate can also follow from an alternating-series theorem when its magnitude conditions hold. It is not a universal shortcut for every Taylor series or every input. The derivative argument above supplies an independent bound for these sine and cosine polynomials.
| Quantity | Value |
|---|---|
| Input x | 3/10 |
| Polynomial degree | 5 |
| Taylor order used for the bound | 6 |
| Exact polynomial value | 1182081/4000000 |
| Proved absolute error bound | 243/5600000000 |
| Approximate function value | 0.2955202067 |
| Quantity | Value |
|---|---|
| Input x | 3/10 |
| Polynomial degree | 4 |
| Taylor order used for the bound | 5 |
| Exact polynomial value | 76427/80000 |
| Proved absolute error bound | 81/80000000 |
| Approximate function value | 0.9553364891 |
Local derivative bounds can be weaker than another valid argument
At 0, the derivatives of log(1+x) give Σₙ₌₁∞(−1)ⁿ⁺¹xⁿ/n. The preceding power-series lesson established the identity on (−1,1) by integration of a geometric series and proved the value log 2 at x=1 by a separate finite-integral remainder. The full convergence interval is (−1,1], while the function itself is defined for every x>−1.
For 0≤x≤1, the alternating magnitudes xⁿ/n decrease to zero, giving a next-term error bound xᴺ⁺¹/(N+1) after N terms, including the endpoint x=1. On negative inputs −1<x<0, the terms are all negative, so that alternating argument is unavailable. Writing r=|x| gives an absolute-tail bound rᴺ⁺¹/[(N+1)(1−r)], since 1/n≤1/(N+1) for every omitted index n≥N+1.
A crude derivative bound for log(1+x) on a negative-input segment can fail to tend to zero even where the series represents the function. An inconclusive bound is a limitation of that estimate. Use a sharper bound or the already justified series identity rather than declaring the Taylor representation false. The singularity at x=−1 and endpoint tests still constrain its domain.
Optional: order notation describes a limit, not a decimal guarantee
For h→0, writing R(h)=O(hᵐ) means that |R(h)|≤C|h|ᵐ for some fixed C and all sufficiently small nonzero h. Writing R(h)=o(hᵐ) means R(h)/hᵐ→0. The constants and neighbourhood belong to the claim. Neither notation alone supplies a numerical error guarantee at an arbitrary finite h.
If f has N continuous derivatives near a, then f(a+h)=T_N(a+h)+o(hᴺ). For N≥1, apply the integral remainder one order lower to f and subtract its degree-N contribution. The remaining integral uses f⁽ᴺ⁾(a+uh)−f⁽ᴺ⁾(a); its supremum on the shrinking segment tends to zero by continuity. Multiplication by |h|ᴺ/N! gives the stated little-o result. For N=0 it is simply continuity.
This local result needs fewer derivatives than the displayed next-derivative error certificate, but provides no explicit next-power constant. In applications, retain the centre, the small parameter and the domain in an expansion. A formal manipulation of small terms does not replace an estimate when a numerical tolerance matters.
Optional: every derivative can miss a nonzero function
Define g(x)=e⁻¹ᐟˣ² for x≠0 and g(0)=0. It is positive away from 0. Nevertheless every derivative at 0 is zero, so every Maclaurin polynomial is the zero polynomial and its Taylor series converges everywhere to zero, rather than to g away from the centre.
To justify the derivatives, first note that |x|⁻ᵐe⁻¹ᐟˣ²→0 for every fixed nonnegative integer m. Set u=1/x². Exponential growth beats every fixed power: for an integer k>m/2, eᵘ≥uᵏ/k! makes uᵐᐟ²e⁻ᵘ≤k!uᵐᐟ²⁻ᵏ→0. The inequality follows from the already-proved positive-term exponential series.
Away from 0, differentiating a polynomial in 1/x times e⁻¹ᐟˣ² produces another polynomial in 1/x times that exponential. Suppose the derivative of order j has this form away from 0 and value 0 at 0. Its difference quotient at 0 is again such an exponential times a polynomial in 1/x, so the preceding limit makes the next derivative zero. Its values also tend to zero, proving continuity at 0. Induction establishes smoothness and all zero derivatives.
A function is real analytic near a when it agrees with a convergent power series on some neighbourhood of a. This example is smooth but not analytic at 0. It separates three claims: the derivatives exist, the Taylor series converges, and that series represents the original function. The third claim needs a remainder tending to zero.
Away from the centre the function is positive, while every Taylor polynomial is zero.
| Quantity | Value |
|---|---|
| Input x | 1/2 |
| Exact function expression | exp(-4) |
| Exact polynomial value | 0 |
| Approximate function value | 0.0183156389 |
Use finite expansions with their assumptions intact
For a limit, a short local expansion may be enough. Taylor’s theorem gives sin h=h−h³/6+O(h⁵), so (sin h−h)/h³→−1/6 as h→0. The omitted term divided by h³ is O(h²), which tends to zero. This conclusion depends on a limit near 0 and does not claim that a cubic is accurate at every angle.
For a numerical calculation, choose a centre with known derivatives, keep the segment inside the derivative domain, compute the finite polynomial and verify a bound below the tolerance. If the estimate is too large, move the centre, raise the order or use another justified tail bound.
The remainder bounds in this lesson control mathematical truncation error. Rounding coefficients, finite-precision evaluation and uncertain measured inputs create separate errors. A rigorous decimal result must allow for those as well; an exact rational polynomial value and an exact rational upper bound keep the illustrated truncation certificate separate from a displayed rounded function value.
State the polynomial, the domain and the guaranteed error
A complete Taylor approximation names f, centre a, order N and evaluation input or interval. It writes the polynomial with factorials and zero coefficients handled correctly, checks the derivative or series hypotheses, and states an absolute or signed error certificate. For a claimed infinite representation, it also proves that the remainders tend to zero on the stated domain.
The explorer compares finite polynomials, nearby function values and proved error intervals. Predict the effect of the order or distance before revealing the result. A plotted numerical function value illustrates the certificate; the derivative and tail arguments establish it. This closes the sequences-and-series chapter and prepares the next chapter’s geometric language of vectors and linear systems.
Predict an error certificate, not just a close-looking curve
Choose a function and a listed case. Predict the error direction, the effect of degree or whether the Taylor series represents the function before revealing the diagram and exact data.
Approximate √(4+h) with order 1, 2 or 3 at a positive displacement. Predict the side of the function and the guaranteed error.
Make your prediction before revealing the result.
Exact polynomial fractions and derivative or whole-tail bounds describe truncation. Approximate function evaluations, rounding and uncertain input errors remain separate.
Worked examples
Certify a shifted square-root approximation
Approximate √(21/5) with a quadratic centred at 4 and bound its error.
- Use T₂(4+h)=2+h/4−h²/64 and h=1/5. This gives 3279/1600.
- On [4,21/5], 0<f‴≤3/256.
- Taylor gives 0<R₂≤(3/256)(1/5)³/6=1/64000.
3279/1600<√(21/5)≤131161/64000; the truncation error is at most 0.000015625.
Use the zero fourth coefficient
Approximate sin(3/10) with x−x³/6 and certify the error.
- The polynomial has degree 3 but is the Taylor polynomial through order 4.
- The fifth derivative has magnitude at most 1.
- At x=3/10 the polynomial is 591/2000 and the error is at most (3/10)⁵/120=81/4000000.
sin(3/10) lies in the closed interval 591/2000±81/4000000. Angles are in radians.
Use a sharper geometric tail after proving the representation
Bound the error of the degree-5 Maclaurin approximation to e¹ᐟ².
- The polynomial is 6331/3840 and the first omitted term is 1/46080.
- Successive ratios after that term are at most 1/14.
- The positive whole tail is at most (1/46080)/(1−1/14)=7/299520<1/40000.
6331/3840<e¹ᐟ²≤6331/3840+7/299520; the error is below 0.000025.
Choose an error theorem that fits the signs
After four terms of log(1+x), compare valid error bounds at x=1/2 and x=−1/2.
- At x=1/2 the series is alternating, so |R₄|≤(1/2)⁵/5=1/160.
- At x=−1/2 the terms are all negative; use absolute comparison for the omitted tail.
- That bound is (1/2)⁵/[5(1−1/2)]=1/80.
The stated guaranteed bounds are 1/160 and 1/80. They are sufficient bounds, not asserted exact errors.
Divide the remainder as well as the leading term
Find limₕ→₀(sin h−h)/h³.
- Taylor through order 4 gives sin h=h−h³/6+R₄(h), with |R₄(h)|≤|h|⁵/120.
- For h≠0, divide by h³. The leading contribution is −1/6.
- The remainder quotient has magnitude at most h²/120→0.
The limit is −1/6.
Try it yourself
What coefficient multiplies (x−a)³ in T₃?
Show the answer and reasoning
f‴(a)/6.
The third derivative of (x−a)³ at a is 3!=6.
Can the order-4 Taylor polynomial of sine have degree 3?
Show the answer and reasoning
Yes.
The fourth derivative at 0 is zero, so T₄=T₃=x−x³/6.
Can the intermediate ξ in the exact remainder always be replaced by a?
Show the answer and reasoning
No.
The theorem locates ξ somewhere between centre and input; use a bound valid on the whole segment.
Why does a derivative bound for √x near 4 not apply across x=0?
Show the answer and reasoning
The required higher derivatives are not bounded and defined across that point.
The approximation certificate must stay in the verified derivative domain.
Does a fixed-degree error tending to zero as x→a prove that the Taylor series represents f at a fixed distant x?
Show the answer and reasoning
No.
The first limit changes x at fixed degree. A series representation requires R_N(x)→0 as N grows at fixed x.
Does (N+1)! in a denominator alone prove every Taylor remainder tends to zero?
Show the answer and reasoning
No.
The derivative bound in the numerator can depend on N and grow faster.
Give the order-5 bound for approximating cos x by 1−x²/2+x⁴/24.
Show the answer and reasoning
|R₅(x)|≤|x|⁶/720.
The order-5 polynomial is unchanged by its zero fifth coefficient, and the sixth derivative is bounded by 1.
At x=−1/2, are the terms of the Maclaurin series for log(1+x) alternating?
Show the answer and reasoning
No, all are negative.
Both the coefficient sign and the input power contribute a sign; the alternating next-term theorem does not apply there.
What is the Maclaurin series of g(0)=0, g(x)=e⁻¹ᐟˣ² for x≠0?
Show the answer and reasoning
The zero series.
All derivatives at 0 vanish, although g is positive elsewhere. Series convergence alone does not prove equality with g.
Does R(h)=O(h³) by itself give a numerical bound at h=1/5?
Show the answer and reasoning
No.
A concrete constant and valid neighbourhood are required for a finite-input guarantee.
Does a truncation bound automatically include rounding of the polynomial evaluation?
Show the answer and reasoning
No.
Truncation, rounding and input uncertainty are different error contributions.
If a valid bound is below the tolerance, must the chosen degree be the smallest possible?
Show the answer and reasoning
No.
A sufficient bound can be conservative; another certificate or actual smaller-degree error may be tighter.
What to carry forward
- Taylor coefficients divide the kth derivative at the centre by k!; the actual polynomial degree can be lower than its order.
- The exact Lagrange remainder uses an unknown intermediate derivative, requiring a bound on the whole segment.
- Integral remainders express the signed error as a weighted derivative accumulation.
- A finite truncation certificate does not require an infinite series representation.
- A representation requires R_N(x)→0 as N grows; fixed-order approximation near the centre is a different limit.
- A nearby centre and a suitable theorem can matter as much as raising the degree.
- Smooth functions can have convergent Taylor series that fail to equal them away from the centre.
- Truncation, rounding and uncertain inputs contribute separate errors.
References
Sources for the concepts and teaching approaches in this article.
- Calculus Volume 2 · Published 30 March 2016; current online editionGilbert Strang and Edwin “Jed” Herman (senior contributing authors)Open calculus textbookTaylor and Maclaurin series — §6.3
- Basic Analysis I · Current online editionJiří LeblOpen real analysis textbookTaylor theorem and repeated-Rolle proof — §4.3Exponential/logarithm and smooth-flat examples — §5.4
- Digital Library of Mathematical Functions · Current online editionNational Institute of Standards and TechnologyMathematical referenceTaylor theorem for real variables — §1.4(vi)Integral remainder — equation1.4.37