Theory
The Taylor series of a function f about x=a is
n=0∑∞n!f(n)(a)(x−a)n=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+⋯
The n-th Taylor polynomial Pn(x) is the partial sum of the first
n+1 terms of the Taylor series and is used to approximate f(x) near x=a.
If a=0, the Taylor series is called a Maclaurin series.
Because Taylor polynomials are finite truncations of an infinite series,
approximations involve a truncation error, which decreases as n
increases.
Exercises
Exercise 1
Question
Find the Maclaurin polynomial for f(x)=ex.
Show solution ↓Hide solution ↑
Solution
For f(x)=ex,
f(n)(x)=ex⇒f(n)(0)=1 for all n.Thus, the Maclaurin polynomial is
Pn(x)=1+x+2!x2+3!x3+⋯+n!xn.
Exercise 2
Question
Find the 3rd Taylor polynomial of f(x)=sinx about x=3π.
Show solution ↓Hide solution ↑
Solution
Compute derivatives:
f(x)=sinx,f′(x)=cosx,f′′(x)=−sinx,f′′′(x)=−cosx.Evaluate at x=3π:
sin3π=23,cos3π=21.The 3rd Taylor polynomial is
P3(x)==f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+3!f′′′(a)(x−a)323+21(x−3π)−43(x−3π)2−121(x−3π)3.