SE 301 Numerical Methods Topic 6 Numerical Differentiation

  • Slides: 22
Download presentation
SE 301: Numerical Methods Topic 6 Numerical Differentiation Lecture 23 KFUPM Read Chapter 23,

SE 301: Numerical Methods Topic 6 Numerical Differentiation Lecture 23 KFUPM Read Chapter 23, Sections 1 -2 CISE 301_Topic 6 KFUPM 1

Lecture 23 Numerical Differentiation p p CISE 301_Topic 6 First order derivatives High order

Lecture 23 Numerical Differentiation p p CISE 301_Topic 6 First order derivatives High order derivatives Richardson Extrapolation Examples KFUPM 2

Motivation How do you evaluate the derivative of a tabulated function. p How do

Motivation How do you evaluate the derivative of a tabulated function. p How do we determine the velocity and acceleration from tabulated measurements. p CISE 301_Topic 6 KFUPM Time (second) Displacement (meters) 0 30. 1 5 48. 2 10 50. 0 15 40. 2 3

Recall CISE 301_Topic 6 KFUPM 4

Recall CISE 301_Topic 6 KFUPM 4

Three Formula CISE 301_Topic 6 KFUPM 5

Three Formula CISE 301_Topic 6 KFUPM 5

The Three Formulas CISE 301_Topic 6 KFUPM 6

The Three Formulas CISE 301_Topic 6 KFUPM 6

Forward/Backward Difference Formula CISE 301_Topic 6 KFUPM 7

Forward/Backward Difference Formula CISE 301_Topic 6 KFUPM 7

Central Difference Formula CISE 301_Topic 6 KFUPM 8

Central Difference Formula CISE 301_Topic 6 KFUPM 8

The Three Formula (Revisited) CISE 301_Topic 6 KFUPM 9

The Three Formula (Revisited) CISE 301_Topic 6 KFUPM 9

Higher Order Formulas CISE 301_Topic 6 KFUPM 10

Higher Order Formulas CISE 301_Topic 6 KFUPM 10

Other Higher Order Formulas CISE 301_Topic 6 KFUPM 11

Other Higher Order Formulas CISE 301_Topic 6 KFUPM 11

Richardson Extrapolation CISE 301_Topic 6 KFUPM 12

Richardson Extrapolation CISE 301_Topic 6 KFUPM 12

Richardson Extrapolation CISE 301_Topic 6 KFUPM 13

Richardson Extrapolation CISE 301_Topic 6 KFUPM 13

Richardson Extrapolation Table D(0, 0)=Φ(h) D(1, 0)=Φ(h/2) D(1, 1) D(2, 0)=Φ(h/4) D(2, 1) D(2,

Richardson Extrapolation Table D(0, 0)=Φ(h) D(1, 0)=Φ(h/2) D(1, 1) D(2, 0)=Φ(h/4) D(2, 1) D(2, 2) D(3, 0)=Φ(h/8) D(3, 1) D(3, 2) CISE 301_Topic 6 KFUPM D(3, 3) 14

Richardson Extrapolation Table CISE 301_Topic 6 KFUPM 15

Richardson Extrapolation Table CISE 301_Topic 6 KFUPM 15

Example 1 CISE 301_Topic 6 KFUPM 16

Example 1 CISE 301_Topic 6 KFUPM 16

Example First Column CISE 301_Topic 6 KFUPM 17

Example First Column CISE 301_Topic 6 KFUPM 17

Example Richardson Table CISE 301_Topic 6 KFUPM 18

Example Richardson Table CISE 301_Topic 6 KFUPM 18

Example Richardson Table 1. 08483 1. 08988 1. 09156 1. 09115 1. 09157 This

Example Richardson Table 1. 08483 1. 08988 1. 09156 1. 09115 1. 09157 This is the best estimate of the derivative of the function. All entries of the Richardson table are estimates of the derivative of the function. The first column are estimates using the central difference formula with different h. CISE 301_Topic 6 KFUPM 19

Example 2 The measured speed 'V m/sec. ' of a car against time 'T,

Example 2 The measured speed 'V m/sec. ' of a car against time 'T, sec. ' is as shown in the table below: T(s) 2 3 3. 5 4 4. 5 5 6 7 8 V(m/s) 12 10 12 13. 2 14 15 17 16 12 a) Compute the car's acceleration at T=4 sec using the Richardson extrapolation with the best accuracy. b) What is the order of the error of the obtained result in part (a)? CISE 301_Topic 6 KFUPM 20

Solution a) To find the acceleration, we have to differentiate V(4) From the table

Solution a) To find the acceleration, we have to differentiate V(4) From the table the max accuracy we can get is D(2, 2) and h=2. First Column D(0, 0) = [f(6)-f(2)]/2(2) = [17 -12]/4 = 1. 25 D(1, 0) = [f(5)-f(3)]/2(1) = [15 -10]/2 = 2. 5 D(2, 0) = [f(4. 5)-f(3. 5)]2/(0. 5) = [14 -12]/1 = 2 Second Column D(1, 1) = (4/3)D(1, 0)-(1/3)D(0, 0) = (4/3)2. 5 – (1/3)1. 25 = 2. 9167 D(2, 1) = (4/3)D(2, 0)-(1/3)D(1, 0) = (4/3)2 – (1/3)2. 5 = 1. 8333 Third Column D(2, 2) = (16/15)D(2, 1)-(1/15)D(1, 1) = (16/15)1. 8333 – (1/15)2. 9167 = 1. 7611 CISE 301_Topic 6 KFUPM 21

Example Richardson Table 1. 25 2. 9167 2 1. 8333 1. 7611 This is

Example Richardson Table 1. 25 2. 9167 2 1. 8333 1. 7611 This is the best estimate of the derivative of the function. O(h 2) O(h 4) O(h 6) b) The order is O(h 6). CISE 301_Topic 6 KFUPM 22