Unit 10 Topic 10.11

Taylor Polynomials

every AB topic, then series

3 min readfreeNot practiced

In Unit 4 the tangent line gave a quick estimate of a function near a point: it matched the function's value and slope there. A Taylor polynomial carries that idea further. It matches the value, the slope, the concavity and as many higher derivatives as you like, and the more it matches, the better it follows the function.

From the tangent line to a parabola

Near x=0x = 0, the tangent line to cos⁡x\cos x is y=1y = 1: right value, right slope, but flat, while cos⁡x\cos x bends downward. To copy the bending, add a squared term c(x−a)2c(x - a)^2 chosen so that the second derivatives agree. The second derivative of c(x−a)2c(x - a)^2 is 2c2c, so we need 2c=f″(a)2c = f''(a), that is c=f″(a)2c = \frac{f''(a)}{2}. For cos⁡x\cos x at 0, f″(0)=−1f''(0) = -1, which gives

P2(x)=1−x22.P_2(x) = 1 - \frac{x^2}{2}.

The same reasoning works for every degree: the nnth derivative of (x−a)n(x - a)^n is n!n!, so the coefficient that matches f(n)(a)f^{(n)}(a) is f(n)(a)n!\frac{f^{(n)}(a)}{n!}.

The Taylor polynomial

The Taylor polynomial of degree nn for ff about x=ax = a is

Pn(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3+⋯+f(n)(a)n!(x−a)n.P_n(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \frac{f'''(a)}{3!}(x - a)^3 + \cdots + \frac{f^{(n)}(a)}{n!}(x - a)^n.

The number aa is the center. PnP_n and ff have the same value and the same first nn derivatives at aa. A Taylor polynomial about a=0a = 0 is also called a Maclaurin polynomial.

The graph of y = cos x from x = -6.5 to 6.5 with three Taylor polynomials about x = 0: P sub 2 = 1 minus x squared over 2, a downward parabola that follows cos x for about |x| < 1; P sub 4, which adds x to the fourth over 24 and follows it to about |x| = 2; and P sub 6, which follows it to about |x| = 3. All three agree with cos x at x = 0 and peel away farther out.
Figure 1. Higher-degree Taylor polynomials follow cos⁡x\cos x farther from the center. LevlPrep original diagram.

The figure shows P2P_2, P4P_4 and P6P_6 for cos⁡x\cos x. All three agree with cos⁡x\cos x at the center; each extra term keeps the polynomial close for a wider stretch before it peels away.

Building one step by step

Worked example 1. Find the third-degree Taylor polynomial for f(x)=ln⁡xf(x) = \ln x about x=1x = 1, and use it to estimate ln⁡1.1\ln 1.1.

nnf(n)(x)f^{(n)}(x)f(n)(1)f^{(n)}(1)coefficient f(n)(1)n!\frac{f^{(n)}(1)}{n!}
00ln⁡x\ln x0000
11x−1x^{-1}1111
22−x−2-x^{-2}−1-1−12-\frac{1}{2}
332x−32x^{-3}2226=13\frac{2}{6} = \frac{1}{3}

So P3(x)P_3(x)=(x−1)−12(x−1)2= (x - 1) - \frac{1}{2}(x - 1)^2+13(x−1)3+ \frac{1}{3}(x - 1)^3.

P3(1.1)P_3(1.1)=0.1−12(0.01)= 0.1 - \frac{1}{2}(0.01)+13(0.001)+ \frac{1}{3}(0.001)=0.1−0.005= 0.1 - 0.005+13000+ \frac{1}{3000}≈0.09533\approx 0.09533. A calculator gives ln⁡1.1≈0.09531\ln 1.1 \approx 0.09531.

Organizing the work in a table, derivative, value at the center, coefficient, keeps the factorials and the center straight.

Reading a Taylor polynomial backward

A Taylor polynomial stores derivatives: the coefficient of (x−a)n(x - a)^n times n!n! is f(n)(a)f^{(n)}(a).

Worked example 2. The third-degree Taylor polynomial for gg about x=2x = 2 is P3(x)P_3(x)=7−4(x−2)2= 7 - 4(x - 2)^2+12(x−2)3+ \frac{1}{2}(x - 2)^3. Find g′(2)g'(2), g″(2)g''(2) and g‴(2)g'''(2), and say what happens at x=2x = 2.

g′(2)=0g'(2) = 0 (there is no (x−2)(x - 2) term). g″(2)=2!⋅(−4)=−8g''(2) = 2! \cdot (-4) = -8. g‴(2)=3!⋅12=3g'''(2) = 3! \cdot \frac{1}{2} = 3.

Since g′(2)=0g'(2) = 0 and g″(2)<0g''(2) < 0, gg has a relative maximum at x=2x = 2 by the second derivative test.

Slips that cost points

SlipFix
Powers of xx when the center is a≠0a \ne 0Use powers of (x−a)(x - a), and derivatives at aa.
A coefficient of f(n)(a)f^{(n)}(a)Divide by n!n!: the coefficient is f(n)(a)n!\frac{f^{(n)}(a)}{n!}.
Derivatives of e2xe^{2x} or sin⁡(3x)\sin(3x) without the chain ruleEach derivative brings out the inside factor: 2ne2x2^n e^{2x}.
Writing "+⋯+ \cdots" after the last termA polynomial ends. "+⋯+ \cdots" makes it an endless sum.
Writing f(4)(x)=f(4)(0)f^{(4)}(x) = f^{(4)}(0)Keep the function and its value at the center apart.

A Taylor polynomial gives an estimate, not an exact value. How far off it can be is the subject of the next topic.

Spot a mistake on this page?