SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Taylor Series Revisited 
Major: All Engineering Majors 
Authors: Autar Kaw, Luke Snyder 
http://numericalmethods.eng.usf.edu 
Transforming Numerical Methods Education for STEM 
Undergraduates 
12/06/14 http://numericalmethods.eng.usf.edu 1
Taylor Series Revisited 
http://numericalmethods.eng.usf.edu
What is a Taylor series? 
Some examples of Taylor series which you must have 
seen 
x2 x4 x6 x 
= - + - + 
2! 4! 6! 
cos( ) 1 
x3 x5 x7 x x 
= - + - + 
3! 5! 7! 
sin( ) 
x2 x3 ex x 
= + + + + 
2! 3! 
1 
http://3 numericalmethods.eng.usf.edu
General Taylor Series 
The general form of the Taylor series is given by 
( ) ( ) ( ) ( ) ¢¢¢ 
( ) + 
f x h f x f x h f x h f x h 
+ = + ¢ + 2 + 
3 
¢ 
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 
EAsn Agrlicshhim?edes 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) 
http://4 numericalmethods.eng.usf.edu
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: 
2 h3 f x h f x f x h f x h f x 
( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + 
2! 3! 
x = 4 
h = 6 - 4 = 2 
http://5 numericalmethods.eng.usf.edu
Example (cont.) 
Solution: (cont.) 
Since the higher order derivatives are zero, 
2 3 
4 2 
4 2 4 4 2 4 2 
( ) ( ) ( ) ( ) ( ) 
3! 
f + = f + f ¢ + f ¢¢ + f ¢¢¢ 
2! 
ö 
÷ø 
ö 
æ 
÷ + æ 
2 3 
6 2 
6 125 74 2 30 2 
( ) ( ) ÷ ÷ø 
ç çè 
ç çè 
= + + 
3! 
2! 
f 
= 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 
http://6 numericalmethods.eng.usf.edu
Derivation for Maclaurin Series for ex 
Derive the Maclaurin series 
x2 x3 ex x 
= + + + + 
2! 3! 
1 
The Maclaurin series is simply the Taylor series about 
the point x=0 
( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + ¢¢¢¢( ) + ¢¢¢¢¢( ) + 
2 3 4 f x h f x f x h f x h f x h f x h f x 
h5 2! 3! 4 5 
( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + ¢¢¢¢( ) + ¢¢¢¢¢( ) + 
2 3 4 h5 f h f f h f h f h f h f 
5 
0 
4 
0 
3! 
0 
2! 
0 0 0 0 
http://7 numericalmethods.eng.usf.edu
Derivation (cont.) 
Since f (x) = ex , f ¢(x) = ex , f ¢¢(x) = ex , ... , f n (x) = ex and 
f n (0) = e0 =1 
the Maclaurin series is then 
... 
0 
0 
f h = e0 + e0 h + e h + e h 
( ) ( ) ( ) ( ) ( ) 
3 
3! 
2! 
2 
... 
=1+ h + 1 h2 + 1 
h3 
3! 
2! 
So, 
... 
2 3 
f x = + x + x + x + 
2! 3! 
( ) 1 
http://8 numericalmethods.eng.usf.edu
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 
n 
2 
f x h f x f x h f x h f x h n 
( + ) = ( ) + ¢ ( ) + ( ) + + ( n ) ( ) + 
R ( x) 
n 
 
2! ! 
'' 
where the remainder is given by 
n 
+ 
1 
( ) ( ) f ( ) (c) 
R x = x - 
h n 
n 
n 
+ 
1 
+ 
( 1)! 
where 
x < c < x + h 
that is, c is some point in the domain [x,x+h] 
http://9 numericalmethods.eng.usf.edu
Example—error in Taylor series 
The Taylor series for ex at point x = 0 is given by 
x2 x3 x4 x5 ex x 
= + + + + + + 
2! 3! 4! 5! 
1 
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. 
http://10 numericalmethods.eng.usf.edu
Example—(cont.) 
Solution: 
Using (n +1) terms of Taylor series gives error bound of 
( ) ( ) 
n 
+ 
1 
1 ! 
R x x h n 
= - f ( ) ( (c) 
x = 0,h = 1, f (x) = ex 
n 
) 
( ) ( ) 
n 
+ 
1 
+ 
n 
+ 
+ 
1 
1 ! 
= - 
( ) 
( ) 
0 0 1 + 
R n 
( ) 
f ( ) (c) 
n 
n 
1 
c 
1 n 
+ 
1 
e 
n + 
1 ! 
= - 
Since 
x < c < x + h 
0 < c < 0 +1 
0 < c < 1 
R e 
( ) 
+ 
n n 
+ n 
( 1)! 
< < 
0 
1 
( 1)! 
http://11 numericalmethods.eng.usf.edu
Example—(cont.) 
Solution: (cont.) 
So if we want to find out how many terms it would 
require to get an approximation of e1 within a 
magnitude of true error of less than 10-6 , 
< - 
10 6 
e 
n + 
( 1)! 
(n +1)!>106 e 
(n +1)!>106 ´3 
n ³ 9 
So 9 terms or more are needed to get a true error 
less than 10-6 
http://12 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_serie 
s.html
THE END 
http://numericalmethods.eng.usf.edu

Weitere ähnliche Inhalte

Was ist angesagt?

mathematical induction
mathematical inductionmathematical induction
mathematical induction
ankush_kumar
 
Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)
Osama Zahid
 

Was ist angesagt? (20)

Complex analysis
Complex analysisComplex analysis
Complex analysis
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONS
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
mathematical induction
mathematical inductionmathematical induction
mathematical induction
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applications
 
3.2.interpolation lagrange
3.2.interpolation lagrange3.2.interpolation lagrange
3.2.interpolation lagrange
 
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equations
 
Representation of complex number
Representation of complex numberRepresentation of complex number
Representation of complex number
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Complex number
Complex numberComplex number
Complex number
 
Taylor series in 1 and 2 variable
Taylor series in 1 and 2 variableTaylor series in 1 and 2 variable
Taylor series in 1 and 2 variable
 
Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)
 
Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)Lesson 19: The Mean Value Theorem (slides)
Lesson 19: The Mean Value Theorem (slides)
 
Core 3 Simpsons Rule
Core 3 Simpsons RuleCore 3 Simpsons Rule
Core 3 Simpsons Rule
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward difference
 
Digital Signal Processing-Digital Filters
Digital Signal Processing-Digital FiltersDigital Signal Processing-Digital Filters
Digital Signal Processing-Digital Filters
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
 
Interpolation
InterpolationInterpolation
Interpolation
 
Convolution linear and circular using z transform day 5
Convolution   linear and circular using z transform day 5Convolution   linear and circular using z transform day 5
Convolution linear and circular using z transform day 5
 

Andere mochten auch (10)

Taylor series and maclaurin with exercices
Taylor series and maclaurin with exercicesTaylor series and maclaurin with exercices
Taylor series and maclaurin with exercices
 
Taylor and Maclaurin Series
Taylor and Maclaurin SeriesTaylor and Maclaurin Series
Taylor and Maclaurin Series
 
Electrical wiring system - and estimation
Electrical wiring system -  and estimation Electrical wiring system -  and estimation
Electrical wiring system - and estimation
 
Electrical wiring BY Jemish
Electrical wiring BY JemishElectrical wiring BY Jemish
Electrical wiring BY Jemish
 
Electrical wiring system
Electrical wiring systemElectrical wiring system
Electrical wiring system
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
Partial differentiation B tech
Partial differentiation B techPartial differentiation B tech
Partial differentiation B tech
 
B tech ee ii_ eee_ u-4_ transformer & electrical wiring_dipen patel
B tech ee  ii_ eee_ u-4_ transformer & electrical wiring_dipen patelB tech ee  ii_ eee_ u-4_ transformer & electrical wiring_dipen patel
B tech ee ii_ eee_ u-4_ transformer & electrical wiring_dipen patel
 
Electrical wiring
Electrical wiringElectrical wiring
Electrical wiring
 
Electrical Wiring Practices and Diagrams
Electrical Wiring Practices and DiagramsElectrical Wiring Practices and Diagrams
Electrical Wiring Practices and Diagrams
 

Ähnlich wie Taylor and maclaurian series

Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
polanesgumiran
 
Bca3010 computer oreineted numerical methods
Bca3010   computer oreineted numerical methodsBca3010   computer oreineted numerical methods
Bca3010 computer oreineted numerical methods
smumbahelp
 
100derivadasresueltasyosoytuprofe
100derivadasresueltasyosoytuprofe100derivadasresueltasyosoytuprofe
100derivadasresueltasyosoytuprofe
Javier Rangel
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
maheej
 

Ähnlich wie Taylor and maclaurian series (20)

Chapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesChapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin series
 
Taylor slides
Taylor slidesTaylor slides
Taylor slides
 
251exn
251exn251exn
251exn
 
5.5 Zeros of Polynomial Functions
5.5 Zeros of Polynomial Functions5.5 Zeros of Polynomial Functions
5.5 Zeros of Polynomial Functions
 
Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
Delos-Santos-Analyn-M.-_Repoter-No.-1-Multiplication-and-Division-of-Polynomi...
 
Bca3010 computer oreineted numerical methods
Bca3010   computer oreineted numerical methodsBca3010   computer oreineted numerical methods
Bca3010 computer oreineted numerical methods
 
Sbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSbma 4603 numerical methods Assignment
Sbma 4603 numerical methods Assignment
 
Crib Sheet AP Calculus AB and BC exams
Crib Sheet AP Calculus AB and BC examsCrib Sheet AP Calculus AB and BC exams
Crib Sheet AP Calculus AB and BC exams
 
S1 3 derivadas_resueltas
S1 3 derivadas_resueltasS1 3 derivadas_resueltas
S1 3 derivadas_resueltas
 
100derivadasresueltasyosoytuprofe
100derivadasresueltasyosoytuprofe100derivadasresueltasyosoytuprofe
100derivadasresueltasyosoytuprofe
 
5.1 Quadratic Functions
5.1 Quadratic Functions5.1 Quadratic Functions
5.1 Quadratic Functions
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx
 
Numerical differentiation integration
Numerical differentiation integrationNumerical differentiation integration
Numerical differentiation integration
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
 
Top School in india
Top School in indiaTop School in india
Top School in india
 
Chapter 04 answers
Chapter 04 answersChapter 04 answers
Chapter 04 answers
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
1531 fourier series- integrals and trans
1531 fourier series- integrals and trans1531 fourier series- integrals and trans
1531 fourier series- integrals and trans
 
AppsDiff3c.pdf
AppsDiff3c.pdfAppsDiff3c.pdf
AppsDiff3c.pdf
 

Kürzlich hochgeladen

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Kürzlich hochgeladen (20)

A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 

Taylor and maclaurian series

  • 1. Taylor Series Revisited Major: All Engineering Majors Authors: Autar Kaw, Luke Snyder http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates 12/06/14 http://numericalmethods.eng.usf.edu 1
  • 2. Taylor Series Revisited http://numericalmethods.eng.usf.edu
  • 3. What is a Taylor series? Some examples of Taylor series which you must have seen x2 x4 x6 x = - + - + 2! 4! 6! cos( ) 1 x3 x5 x7 x x = - + - + 3! 5! 7! sin( ) x2 x3 ex x = + + + + 2! 3! 1 http://3 numericalmethods.eng.usf.edu
  • 4. General Taylor Series The general form of the Taylor series is given by ( ) ( ) ( ) ( ) ¢¢¢ ( ) + f x h f x f x h f x h f x h + = + ¢ + 2 + 3 ¢ 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 EAsn Agrlicshhim?edes 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) http://4 numericalmethods.eng.usf.edu
  • 5. 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: 2 h3 f x h f x f x h f x h f x ( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + 2! 3! x = 4 h = 6 - 4 = 2 http://5 numericalmethods.eng.usf.edu
  • 6. Example (cont.) Solution: (cont.) Since the higher order derivatives are zero, 2 3 4 2 4 2 4 4 2 4 2 ( ) ( ) ( ) ( ) ( ) 3! f + = f + f ¢ + f ¢¢ + f ¢¢¢ 2! ö ÷ø ö æ ÷ + æ 2 3 6 2 6 125 74 2 30 2 ( ) ( ) ÷ ÷ø ç çè ç çè = + + 3! 2! f = 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 http://6 numericalmethods.eng.usf.edu
  • 7. Derivation for Maclaurin Series for ex Derive the Maclaurin series x2 x3 ex x = + + + + 2! 3! 1 The Maclaurin series is simply the Taylor series about the point x=0 ( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + ¢¢¢¢( ) + ¢¢¢¢¢( ) + 2 3 4 f x h f x f x h f x h f x h f x h f x h5 2! 3! 4 5 ( + ) = ( ) + ¢( ) + ¢¢( ) + ¢¢¢( ) + ¢¢¢¢( ) + ¢¢¢¢¢( ) + 2 3 4 h5 f h f f h f h f h f h f 5 0 4 0 3! 0 2! 0 0 0 0 http://7 numericalmethods.eng.usf.edu
  • 8. Derivation (cont.) Since f (x) = ex , f ¢(x) = ex , f ¢¢(x) = ex , ... , f n (x) = ex and f n (0) = e0 =1 the Maclaurin series is then ... 0 0 f h = e0 + e0 h + e h + e h ( ) ( ) ( ) ( ) ( ) 3 3! 2! 2 ... =1+ h + 1 h2 + 1 h3 3! 2! So, ... 2 3 f x = + x + x + x + 2! 3! ( ) 1 http://8 numericalmethods.eng.usf.edu
  • 9. 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 n 2 f x h f x f x h f x h f x h n ( + ) = ( ) + ¢ ( ) + ( ) + + ( n ) ( ) + R ( x) n  2! ! '' where the remainder is given by n + 1 ( ) ( ) f ( ) (c) R x = x - h n n n + 1 + ( 1)! where x < c < x + h that is, c is some point in the domain [x,x+h] http://9 numericalmethods.eng.usf.edu
  • 10. Example—error in Taylor series The Taylor series for ex at point x = 0 is given by x2 x3 x4 x5 ex x = + + + + + + 2! 3! 4! 5! 1 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. http://10 numericalmethods.eng.usf.edu
  • 11. Example—(cont.) Solution: Using (n +1) terms of Taylor series gives error bound of ( ) ( ) n + 1 1 ! R x x h n = - f ( ) ( (c) x = 0,h = 1, f (x) = ex n ) ( ) ( ) n + 1 + n + + 1 1 ! = - ( ) ( ) 0 0 1 + R n ( ) f ( ) (c) n n 1 c 1 n + 1 e n + 1 ! = - Since x < c < x + h 0 < c < 0 +1 0 < c < 1 R e ( ) + n n + n ( 1)! < < 0 1 ( 1)! http://11 numericalmethods.eng.usf.edu
  • 12. Example—(cont.) Solution: (cont.) So if we want to find out how many terms it would require to get an approximation of e1 within a magnitude of true error of less than 10-6 , < - 10 6 e n + ( 1)! (n +1)!>106 e (n +1)!>106 ´3 n ³ 9 So 9 terms or more are needed to get a true error less than 10-6 http://12 numericalmethods.eng.usf.edu
  • 13. 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_serie s.html