Handout 2 Maclaurin Series and Taylor Series Maclaurin Series
Handout 2 Maclaurin Series and Taylor Series Maclaurin Series
Maclaurin series
The Maclaurin series is an approximation to a function f (x) near x = 0:
X
∞
xn
F (x) = f (n) (0)
n=0
n!
where we’re using the notation f (n) (x) to mean the n-th derivative of f (x).
1 ′ 1
f (x) = f (x) = 1 term
2 terms
(1 − x) (1 − x)2 3
7 terms
8 terms
Original function
2 6
f ′′ (x) = f ′′′ (x) =
(1 − x)3 (1 − x)4 2
f (0) = 1 f ′ (0) = 1
1
f ′′ (0) = 2 f ′′′ (0) = 6
F (x) = 1 + x + x2 + x3 + · · · 0
-1
-1 -0.5 0 0.5 1
This series converges (so F (x) = f (x)) as long as −1 < x < 1. It has radius of convergence 1.
1.5
f (x) = sin x f ′ (x) = cos x
sin(x)
f (0) = 0 f ′ (0) = 1
0.5
F (x) = x − + − ···
3! 5!
-0.5
-1
-1.5
-4 -2 0 2 4
In fact, this series converges for all values of x: it has an infinite radius of convergence.
Taylor Series
This gives an approximation for f (x) near x = a:
X
∞
(x − a)n
F (x) = f (n) (a)
n=0
n!
Example: ln x near x = 2
1 2
f (x) = ln x f ′ (x) =
x
−1 2 1.5 Original function
1 term
f ′′ (x) = f ′′′ (x) = 3 2 terms
x2 x 3 terms
4 terms
1
f (2) = ln 2 f ′ (2) = 1/2
f ′′ (2) = −1/4 f ′′′ (2) = 1/4 0.5
(x − 2) (x − 2)2 (x − 2)3
F (x) = ln 2+ − + +· · · 0
2 8 24
This Taylor series has radius of conver- -0.5
Example: polynomial
Here we’ll look at the intermediate terms of the Taylor series for f (x) = x3 − 3x near x = −1, x = 0 and
x = 1.
f (x) = x3 − 3x f ′ (x) = 3x2 − 3 f ′′ (x) = 6x f ′′′ (x) = 6
Near x = −1:
f (−1) = 2 f ′ (−1) = 0 f ′′ (−1) = −6 f ′′′ (−1) = 6 F (x) = 2 − 3(x + 1)2 + (x + 1)3 .
Near x = 0:
f (0) = 0 f ′ (0) = −3 f ′′ (0) = 0 f ′′′ (0) = 6 F (x) = −3x + x3 .
Near x = 1:
f (1) = −2 f ′ (1) = 0 f ′′ (1) = 6 f ′′′ (1) = 6 F (x) = −2 + 3(x − 1)2 + (x − 1)3 .
All three versions of F (x) are the same function; but the first or first two terms of each give three
different approximations:
3
-1
-2
-3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
The straight line in the middle is −3x; the right hand curve is −2 + 3(x − 1)2 ; and the left hand curve
is 2 − 3(x + 1)2 . The thick curve is f (x) = F (x). Again, the radius of convergence here is infinite.