MECN 3500 MECN 3500 Lecture Lecture 4 4 Numerical Methods for Engineering Numerical Methods for Engineering MECN 3500 MECN 3500 Professor: Dr. Omar E. Meza Castillo Professor: Dr. Omar E. Meza Castillo [email protected]http://www.bc.inter.edu/facultad/omeza Department of Mechanical Engineering Department of Mechanical Engineering Inter American University of Puerto Rico Inter American University of Puerto Rico Bayamon Campus Bayamon Campus
28
Embed
MECN 3500 Lecture 4 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo [email protected] .
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
MEC
N 3
500
MEC
N 3
500
LectureLecture
44Numerical Methods for EngineeringNumerical Methods for Engineering
MECN 3500 MECN 3500
Professor: Dr. Omar E. Meza CastilloProfessor: Dr. Omar E. Meza [email protected]
http://www.bc.inter.edu/facultad/omeza
Department of Mechanical EngineeringDepartment of Mechanical Engineering
Inter American University of Puerto RicoInter American University of Puerto Rico
Truncation Errors and the Truncation Errors and the Taylor SeriesTaylor Series
33
Lecture 4Lecture 4MEC
N 3
500 I
nte
r -
Bayam
on
MEC
N 3
500 I
nte
r -
Bayam
on
To understand the use of Taylor Series in To understand the use of Taylor Series in the study of numerical methods.the study of numerical methods.
44
Course ObjectivesCourse Objectives
Lecture 4Lecture 4MEC
N 3
500 I
nte
r -
Bayam
on
MEC
N 3
500 I
nte
r -
Bayam
on
Truncation Errors: Truncation Errors: use approximation in use approximation in place of an exact mathematical procedure.place of an exact mathematical procedure.
Numerical Methods express functions in an Numerical Methods express functions in an approximate fashion: approximate fashion: The Taylor Series.The Taylor Series.
What is a Taylor Series?What is a Taylor Series?Some examples of Taylor series which you Some examples of Taylor series which you must have seenmust have seen
55
IntroductionIntroduction
!6!4!2
1)cos(642 xxx
x
!7!5!3
)sin(753 xxx
xx
!3!2
132 xx
xe x
Lecture 4Lecture 4MEC
N 3
500 I
nte
r -
Bayam
on
MEC
N 3
500 I
nte
r -
Bayam
on
The general form of the Taylor series is The general form of the Taylor series is given bygiven by
provided that all derivatives of f(x) are provided that all derivatives of f(x) are continuous and exist in the interval [x,x+h] continuous and exist in the interval [x,x+h]
What does this mean in plain English?What does this mean in plain English?
66
General Taylor SeriesGeneral Taylor Series
32
!3!2h
xfh
xfhxfxfhxf
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)
Lecture 4Lecture 4MEC
N 3
500 I
nte
r -
Bayam
on
MEC
N 3
500 I
nte
r -
Bayam
on
77
Lecture 4Lecture 4MEC
N 3
500 I
nte
r -
Bayam
on
MEC
N 3
500 I
nte
r -
Bayam
on
Example: Example: Find the value of f(6) given that Find the value of f(6) given that f(4)=125, f’(4)=74, f’’(4)=30, f’’’(4)=6 and f(4)=125, f’(4)=74, f’’(4)=30, f’’’(4)=6 and all other higher order derivatives of f(x) at all other higher order derivatives of f(x) at x=4 are zero.x=4 are zero.
Example 4.1: Taylor Series Approximation Example 4.1: Taylor Series Approximation of a polynomial of a polynomial Use zero- through fourth-Use zero- through fourth-order Taylor Series approximation to order Taylor Series approximation to approximate the function:approximate the function:
From xFrom xii=0 with h=1. That is, predict the =0 with h=1. That is, predict the function’s value at xfunction’s value at xi+1i+1=1=1
Example 4.4: Example 4.4: To find the forward, backward To find the forward, backward and centered difference approximation for and centered difference approximation for f(x) at x=0.5 using step size of h=0.5, f(x) at x=0.5 using step size of h=0.5, repeat using h=0.25. The true value is -repeat using h=0.25. The true value is -0.91250.9125