Taylor Series and Numerical Methods
Taylor Series and Numerical Methods
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates
1/11/2010
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu
x3 x5 x7
sin( x) = x + +
3! 5! 7!
x2 x3
e = 1+ x +
+
+
2! 3!
x
http://numericalmethods.eng.usf.edu
3!
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)
http://numericalmethods.eng.usf.edu
ExampleTaylor 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 = 64 = 2
http://numericalmethods.eng.usf.edu
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
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu
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
So,
x 2 x3
f ( x) = 1 + x + + + ...
2! 3!
http://numericalmethods.eng.usf.edu
(n + 1)!
where
x < c < x+h
http://numericalmethods.eng.usf.edu
x 2 x3 x 4 x5
+ +
+ +
e =1+ x +
2! 3! 4! 5!
x
10
http://numericalmethods.eng.usf.edu
Example(cont.)
Solution:
Using (n + 1) terms of Taylor series gives error bound of
n +1
(
x h)
x = 0, h = 1, f ( x) = e x
Rn ( x ) =
f (n +1) (c )
(n + 1)!
n +1
(
0 1)
Rn (0 ) =
f (n +1) (c )
(n + 1)!
n +1
(
1)
=
ec
(n + 1)!
Since
11
1
e
< Rn (0 ) <
(n + 1)!
(n + 1)!
http://numericalmethods.eng.usf.edu
Example(cont.)
Solution: (cont.)
So if we want to find out how many terms it would
1
require to get an approximation of e within a
magnitude of true error of less than 10 6 ,
e
< 10 6
(n + 1)!
(n + 1)!> 10 6 e
(n + 1)!> 10 6 3
n9
http://numericalmethods.eng.usf.edu
Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice
tests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, please
visit
http://numericalmethods.eng.usf.edu/topics/taylor_seri
es.html
THE END
http://numericalmethods.eng.usf.edu