Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1
Numerical Differentiation Finite Difference Methods Forward Backward Centered Error Magnitude O(h) for forward and backward O(h 2 ) for centered Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 2
Forward First Derivative Consider a function f(x) which can be expanded in a Taylor series in the neighborhood of a point x Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 3
Forward First Derivative Numerical Method Lecture 14 Prof. Jinbo Bi CSE, UConn 4
Backward First Derivative Consider a function f(x) which can be expanded in a Taylor series in the neighborhood of a point x Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 5
Backward First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 6
Central First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 7
Central First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 8
Numerical Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 9
2nd-order Forward Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 10
High-Accuracy Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 11
Forward Finite-Divided Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 12
Backward Difference Scheme Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 13 +
Backward Finite-Divided Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 14
Centered Difference Scheme Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 15
Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 16 Centered Divided Difference
Example: Find derivative at x=0.5, h=0.25 True Forward Basic Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 17
Example: Backward Centered Basic Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 18
Forward Backward Centered High-Accuracy Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 19
Forward Divided Difference method uses the value of points in front of or at the point where the derivative is calculated. Backward Divided Difference method uses the value of points behind of or at the point where the derivative is calculated. Summary Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 20
Centered Divided Difference uses the value of points both in front and behind of the point where the derivative is calculated. Centered method is usually more accurate than forward & backward methods Accurate formulas use more points in the calculations. Summary Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 21
As with integration, use two approximations to arrive at a better approximation D is the true value but unknown and D(h 1 ) is an approximation based on the step size h 1. Reducing the step size to half, h 2 =h 1 /2, we obtained another approximation D(h 2 ). By properly combining the two approximations, D(h 1 ) & D(h 2 ), the error is reduced to O(h 4 ). Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 22
Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 23
Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 24
Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 25
Example: h=0.5 h=0.25 Extrapolate Richardson’s Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 26
Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 27
Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 28
Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 29
Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 30
Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 31
Next class Ordinary Differential Equations Read Chapter PT7, 25 Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 32