You are on page 1of 9

NUMERICAL METHODS

From University of Michigan , department of atmospheric,


oceanic and spaces sciences
SERIES(1)TAYLOR
The Taylor series provides a means to predict
a function value at one point in terms of the
function value and its derivates at another
point. In essence, the theorem states that any
smooth function can be approximated as a
polynomial. The Taylor Series Is given by:
f ' ' xi  n 
 xi 
f xi 1   f xi   f ' xi xi 1  xi   xi1  xi   ...  xi1  xi   ...
2 f n

2! n!

The Taylor series is a infinity series.


(1) Steven c. Chapra, Numerical Methods for Engineers. Fifth Edition
Chapter 4.
TAYLOR SERIES
(2)Example 1:

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:
f ' ' xi  f xi 
n 
f xi 1   f xi   f ' xi xi 1  xi   xi1  xi   ...  xi1  xi n  ...
2

2! n!
xi  4
hx x 64 2
i i 1
(2) http://numericalmethods.eng.usf.edu/topics/taylor_series.html
TAYLOR SERIES
Solution 1: (cont.)

Since the higher order derivatives are zero,


2 3
2 2
f 6  f 4  f 42  f 4  f 4
2! 3!
2  2 
2 3

f 6  125  742  30   6 


 2!   3! 
 125  148  60  8
 341
TAYLOR SERIES
(3)Example 2: Use zero-through second-order Taylor series
expansions to approximate the function

f ( x)  0.1x  0.15x  0.5x  0.25x  1.2


4 3 2

From Xi=0 with h=1.

Solution:
The Taylor series approximation with n=0 is
f ( xi 1 )  f ( xi ) f ( x )  1.2
i 1

For n=1, the first derivative must be determined and


evaluated at x=0
f ´(0)  0.4(0.0)  0.45(0.0)  1.0(0.0)  0.25  0.25
3 2

(3) Steven c. Chapra, Numerical Methods for Engineers. Fifth Edition


Chapter 4.
TAYLOR SERIES
Solution2: (cont.)
f ( x )  f ( x )  f ( x )(h)
i 1 i
'
i

f ( x )  1.2  0.25h  0.95


i 1

For n=2, the second derivative is evaluated at x=0

f ´´(0)  1.2(0.0)  0.9(0.0)  1.0  1.0


2

''

f ( x )  f ( x )  f ( x )(h) 
f ('x ) 2
i 1 i ( h)
i
i

2!
f ( x )  1.2  0.25h  0.5h  0.45
i 1
2
TAYLOR SERIES
f (x)

Zero order
f ( xi 1 )  f ( xi )
First order f ( x )  f ( x ) f ( x )(h)
i 1 i
'
i
1.0
Second order
''
f (x )
f (x )  f (x )
i 1 i
 f ( xi )(h) 
'
( h)
i 2

0.5 2!
True

0
x 0
i
x 1
i 1 x
h
The approximation of f ( x)  0.1x  0.15 x  0.5 x  0.25 x  1.2
4 3 2

At x=1 by zero-order, first-order, and second order Taylor series expansions


From Steven c. Chapra, Numerical Methods for Engineers. Fifth Edition Chapter 4.
TAYLOR SERIES
(4)The Taylor series centered at zero is called McLaurin series:

f (0)( xi 1 ) 2 f (0)( xi 1 )3 f n (0)( xi 1 ) n


f ( x)  f ( xi 1 )  f (0)  f (0)( xi 1 )    .. 
2! 3! n!

Mclaurin Series ( xi  0)
Example:
x3 x5 x7
sin( x)  x    
3! 5! 7!

(4) Steven c. Chapra, Numerical Methods for Engineers. Fifth Edition


Chapter 4.
(5)NUMERICAL DIFFERENTIATION

From the Taylor series of first-order


f ' ' xi  f n  xi 
f xi 1   f xi   f ' xi xi 1  xi   xi 1  xi   ...  xi 1  xi n  R
2

2! n!
Truncating this equation after the first derivative and rearranging
yields

f xi 1   f xi  f xi 1   f xi 


f ' xi   
xi1  xi  h

(5) Steven c. Chapra, Numerical Methods for Engineers. Fifth Edition


Chapter 4.

You might also like