Presentation is loading. Please wait.

Presentation is loading. Please wait.

Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.

Similar presentations


Presentation on theme: "Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1."— Presentation transcript:

1 Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1

2 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

3 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

4 Forward First Derivative Numerical Method Lecture 14 Prof. Jinbo Bi CSE, UConn 4

5 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

6 Backward First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 6

7 Central First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 7

8 Central First Derivative Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 8

9 Numerical Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 9

10 2nd-order Forward Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 10

11 High-Accuracy Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 11

12 Forward Finite-Divided Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 12

13 Backward Difference Scheme Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 13 +

14 Backward Finite-Divided Difference Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 14

15 Centered Difference Scheme Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 15

16 Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 16 Centered Divided Difference

17 Example: Find derivative at x=0.5, h=0.25 True Forward Basic Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 17

18 Example: Backward Centered Basic Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 18

19 Forward Backward Centered High-Accuracy Differentiation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 19

20 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

21 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

22 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

23 Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 23

24 Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 24

25 Richardson Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 25

26 Example: h=0.5 h=0.25 Extrapolate Richardson’s Extrapolation Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 26

27 Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 27

28 Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 28

29 Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 29

30 Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 30

31 Unevenly Spaced Data Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 31

32 Next class Ordinary Differential Equations Read Chapter PT7, 25 Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 32


Download ppt "Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1."

Similar presentations


Ads by Google