The Taylor polynomial of degree n for f at a is the polynomial that matches f and its first n derivatives at a: Pₙ(x) is the sum of f⁽ᵏ⁾(a)/k! times (x − a)ᵏ for k from 0 to n. The degree-1 polynomial is the tangent line; higher degrees bend to follow the curve farther from a. The Lagrange error bound says |f(x) − Pₙ(x)| ≤ M|x − a|ⁿ⁺¹/(n + 1)!, where M bounds the size of the next derivative between a and x.
What you'll learn
Build the Taylor polynomial of a given degree from derivatives
Use Taylor polynomials to approximate function values
Read derivatives from the coefficients of a Taylor polynomial
The tangent line matches a function’s value and slope at one point, and it is
a good approximation nearby. A parabola can match the curvature too, and a
cubic the rate at which curvature changes. The Taylor polynomial of degree
n for f at a matches f and its first n derivatives there:
Differentiate (x−a)kk times and you get k!, a constant; differentiate
it fewer times and it still vanishes at x=a. So the kth derivative of
Pn at a comes only from the term ck(x−a)k, and equals ck⋅k!.
To make it equal f(k)(a), choose ck=k!f(k)(a). Each
coefficient is chosen so that one more derivative matches, and the factorial
undoes what differentiation does to the power.
How good is the approximation? The error depends on the next derivative, the
first one the polynomial does not match.
Lagrange error bound
If ∣f(n+1)(t)∣≤M for every t between a and x, then
∣f(x)−Pn(x)∣≤(n+1)!M∣x−a∣n+1
It looks like the next term of the polynomial, with the unknown derivative
replaced by its largest possible size. Close to a, the power
∣x−a∣n+1 is tiny, and the factorial shrinks it further.
The kth derivative is (1−x)k+1k!, which is k! at 0, so every coefficient is k!k!=1.
Find P2 for x at 4, and estimate 4.2.
Answer
2+4x−4−64(x−4)2; about 2.049375
Full solution
f(4)=2, f′(4)=241=41, f′′(4)=−4⋅43/21=−321, and 2!−1/32=−641. At 4.2: 2+0.05−0.000625. The true value is 2.04939…
The Taylor polynomial of f at 1 is 2−3(x−1)+5(x−1)2−(x−1)3. Find f′′(1) and f′′′(1).
Answer
f′′(1)=10 and f′′′(1)=−6
Full solution
The coefficient of (x−1)k is k!f(k)(1). So f′′(1)=2!⋅5 and f′′′(1)=3!⋅(−1).
Estimate e0.2 with P2 at 0.
Answer
1.22
Full solution
1+0.2+20.04=1.22. The true value is 1.2214…
Bound the error in problem 5.
Answer
Less than 0.002
Full solution
The third derivative is et≤e0.2<1.3 on [0,0.2]. The bound is 3!1.3(0.2)3=61.3⋅0.008≈0.0017.
What degree n of the Maclaurin polynomial of ex guarantees e to within 0.001, using e<3?
Answer
n=6
Full solution
The error at x=1 is at most (n+1)!3. 6!3=7203≈0.004 is too big, but 7!3=50403≈0.0006 works, so n+1=7.
Find P4 for ln(1+x) at 0.
Answer
x−2x2+3x3−4x4
Full solution
The derivatives at 0 are 1, −1, 2 and −6. Dividing by 1!, 2!, 3! and 4! gives 1, −21, 31 and −41.
Find P3 for sinx at 2π.
Answer
1−21(x−2π)2
Full solution
At 2π: sin=1, cos=0, −sin=−1 and −cos=0. Only the constant and squared terms survive.
A student writes the Maclaurin polynomial of degree 3 for ex as 1+x+x2+x3. What went wrong?
Hint
What is the second derivative of the student’s polynomial at 0?
Answer
The factorials are missing. The polynomial is 1+x+2x2+6x3.
Full solution
The student’s polynomial has second derivative 2 at 0, but ex has second derivative 1 there. Dividing each coefficient by k! fixes every derivative: the correct cubic has f′′(0)=1 and f′′′(0)=1.
Frequently asked questions
What is a Taylor polynomial?
The polynomial of degree n whose value and first n derivatives at x = a match those of f. Its coefficients are f⁽ᵏ⁾(a)/k!.
What is a Maclaurin polynomial?
A Taylor polynomial centered at a = 0.
Why is there a factorial in the coefficients?
Differentiating (x − a)ᵏ k times produces k!, so dividing by k! makes the kth derivative of the polynomial equal f⁽ᵏ⁾(a).
What is the Lagrange error bound?
|f(x) − Pₙ(x)| ≤ M|x − a|ⁿ⁺¹/(n + 1)!, where M is at least the largest value of |f⁽ⁿ⁺¹⁾| between a and x.
How do I get a better approximation?
Raise the degree, or approximate closer to the center. Both shrink |x − a|ⁿ⁺¹/(n + 1)!.