0% found this document useful (0 votes)
14 views12 pages

Taylor Series Revisited: Major: All Engineering Majors Authors

Uploaded by

Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views12 pages

Taylor Series Revisited: Major: All Engineering Majors Authors

Uploaded by

Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Taylor Series Revisited

Major: All Engineering Majors

Authors: Bayable Teshome

28/09/2022 1
What is a Taylor series?
Some examples of Taylor series which you must have
seen
x2 x4 x6
cos( x) = 1 − + − +
2! 4! 6!

x3 x5 x7
sin( x) = x − + − + 
3! 5! 7!
x2 x3
e = 1+ x +
x
+ +
2! 3!

3
General Taylor Series
The general form of the Taylor series is given by
f ′′( x ) 2 f ′′′( x ) 3
f (x + h ) = f (x ) + f ′(x )h + h + h +
2! 3!
provided that all derivatives of f(x) are continuous and
exist in the interval [x,x+h]

What does this mean in plain English?


As Archimedes would have said, “Give me the value of the function
at a single point, and the value of all (first, second, and so on) its
derivatives at that single point, and I can give you the value of the
function at any other point” (fine print excluded)

4
Example—Taylor Series
Find the value of f (6) given that f (4) = 125, f ′(4) = 74,
f ′′(4 ) = 30, f ′′′(4 ) = 6 and all other higher order derivatives
of f (x ) at x = 4 are zero.

Solution:
h2 h3
f (x + h ) = f (x ) + f ′(x )h + f ′′(x ) + f ′′′(x ) + 
2! 3!
x=4
h = 6−4 = 2

5
Example (cont.)
Solution: (cont.)
Since the higher order derivatives are zero,
22 23
f (4 + 2 ) = f (4 ) + f ′(4 )2 + f ′′(4 ) + f ′′′(4 )
2! 3!
 2 2   23 
f (6 ) = 125 + 74(2 ) + 30  + 6 
 2!   3! 
= 125 + 148 + 60 + 8
= 341
Note that to find f (6) exactly, we only need the value
of the function and all its derivatives at some other
point, in this case x = 4

6
Derivation for Maclaurin Series for ex
Derive the Maclaurin series
x2 x3
e = 1+ x +
x
+ +
2! 3!
The Maclaurin series is simply the Taylor series about
the point x=0
h2 h3 h4 h5
f (x + h ) = f (x ) + f ′(x )h + f ′′(x ) + f ′′′(x ) + f ′′′′(x ) + f ′′′′′(x ) + 
2! 3! 4 5
h2 h3 h4 h5
f (0 + h ) = f (0 ) + f ′(0 )h + f ′′(0) + f ′′′(0 ) + f ′′′′(0 ) + f ′′′′′(0 ) + 
2! 3! 4 5

7
Derivation (cont.)
Since f ( x) = e x , f ′( x) = e x , f ′′( x) = e x , ... , f n ( x) = e x and
f n (0) = e 0 = 1

the Maclaurin series is then


(e 0 ) 2 (e 0 ) 3
f ( h ) = (e ) + (e ) h +
0 0
h + h ...
2! 3!
1 1
= 1 + h + h 2 + h 3 ...
2! 3!
So,
x 2 x3
f ( x) = 1 + x + + + ...
2! 3!

8
Error in Taylor Series
The Taylor polynomial of order n of a function f(x)
with (n+1) continuous derivatives in the domain
[x,x+h] is given by
h2 hn
f ( x + h ) = f ( x ) + f ′( x )h + f ' ' ( x ) +  + f ( x ) + Rn ( x )
(n )
2! n!
where the remainder is given by
( )
Rn x =
( x − h)
n +1
( n +1)
f () c
(n + 1)!
where
x < c < x+h
that is, c is some point in the domain [x,x+h]

9
Example—error in Taylor series
The Taylor series for e at point x = 0 is given by
x

x 2 x3 x 4 x5
e =1+ x +
x
+ + + +
2! 3! 4! 5!
It can be seen that as the number of terms used
increases, the error bound decreases and hence a
better estimate of the function can be found.

How many terms would it require to get an


approximation of e1 within a magnitude of
true error of less than 10-6.

10
Example—(cont.)
Solution:
Using (n + 1) terms of Taylor series gives error bound of
Rn ( x ) =
( x − h)
n +1
f (n +1) (c ) x = 0, h = 1, f ( x) = e x
(n + 1)!

Rn (0 ) =
(0 − 1)
n +1
f (n +1) (c )
(n + 1)!
=
(− 1)
n +1
ec
(n + 1)!
Since
x < c < x+h
0 < c < 0 +1 1
< Rn (0 ) <
e
0 < c <1 (n + 1)! (n + 1)!

11
Example—(cont.)
Solution: (cont.)
So if we want to find out how many terms it would
require to get an approximation of e within a
1

magnitude of true error of less than 10 −6 ,


e
< 10 −6
(n + 1)!

(n + 1)!> 10 6 e
(n + 1)!> 10 6 × 3
n≥9
So 9 terms or more are needed to get a true error
less than 10 −6
12
THE END

You might also like