lecture 8

lecture 8 - Fig PT6.10 Chapter 23 Numerical Differentiation...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Fig PT6.10
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapter 23 Numerical Differentiation
Background image of page 2
Numerical Differentiation Estimate the derivatives (slope, curvature, etc.) of a function by using the function values at only a set of discrete points Ordinary differential equation (ODE) Partial differential equation (PDE) Represent the function by Taylor polynomials or Lagrange interpolation Evaluate the derivatives of the interpolation polynomial at selected nodal points
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Forward difference Backward difference Centered difference Numerical Differentiation
Background image of page 4
Forward difference x i 1 x i x i+1 x h
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Backward difference x i 1 x i x i+1 x h
Background image of page 6
Centered difference x i 1 x i x i+1 x 2h
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
First Derivatives Forward difference Backward difference Central difference ) x ( f i-2 i-1 i i+1 i+2 1 i 1 i 1 i 1 i 1 i 1 i 1 i 1 i 1 i i 1 i i 1 i i 1 i i i 1 i i 1 i i 1 i i 1 i x x y y x x ) x ( f ) x ( f ) x ( f x x y y x x ) x ( f ) x ( f ) x ( f x x y y x x ) x ( f ) x ( f ) x ( f x y
Background image of page 8
Truncation Errors Uniform grid spacing ) x ( f ! 3 h ) x ( f ! 2 h ) x ( f h ) x ( f ) h x ( f ) x ( f ) x ( f ! 3 h ) x ( f ! 2 h ) x ( f h ) x ( f ) h x ( f ) x ( f i 3 i 2 i i i 1 i i 3 i 2 i i i 1 i ) ) ( ) ( ) ( ) ( : ) ( ) ( ) ( ) ( : ) ( ) ( ) ( ) ( : 2 3 2 1 i 1 i i 2 1 i i i 1 i 1 i i O(h f 6 h h 2 x f x f x f central O(h) f 2 h h x f x f x f backward O(h) f 2 h h x f x f x f forward
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Error Propagation x x f x f x x x f x f x f x f x x ~ ) ( ) ( ) ~ ( ) ( ) ( ) ~ ( ) ( ~ Error in x leads to error in f(x)
Background image of page 10
Example: First Derivatives Use forward and backward difference approximations to estimate the first derivative of at x = 0.5 with h = 0.5 and 0.25 (exact sol. = -0.9125) Forward Difference Backward Difference 2 . 1 x 25 . 0 x 5 . 0 x 15 . 0 x 1 . 0 ) x ( f 2 3 4 % . , . . . . . . ) . ( ) . ( ) . ( , . % . , . . . . . ) . ( ) ( ) . ( , . 5 26 155 1 25 0 925 0 63632813 0 5 0 75 0 5 0 f 75 0 f 5 0 f 25 0 h 9 58 45 1 5 0 925 0 2 0 5 0 1 5 0 f 1 f 5 0 f 5 0 h t t % . , . . . . . . ) . ( ) . ( ) . ( , . % . , . . . . . ) ( ) . ( ) . ( , . 7 21 714 0 25 0 10351563 1 925 0 25 0 5 0 25 0 f 5 0 f 5 0 f 25 0 h 7 39 55 0 5 0 2 1 925 0 0 5 0 0 f 5 0 f 5 0 f 5 0 h t t
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: First Derivative Use central difference approximation to estimate the first derivative of at x = 0.5 with h = 0.5 and 0.25 (exact sol. = -0.9125) Central Difference 2 . 1 x 25 . 0 x 5 . 0 x 15 . 0 x 1 . 0 ) x ( f 2 3 4 % 4 . 2 , 934 . 0 5 . 0 10351563 . 1 63632813 . 0 25 . 0 75 . 0 ) 25 . 0 ( f ) 75 . 0 ( f ) 5 . 0 ( f , 25 . 0 h % 6 . 9 , 0 . 1 1 2 . 1 2 . 0 0 1 ) 0 ( f ) 1 ( f ) 5 . 0 ( f , 5 . 0 h t t
Background image of page 12
Second-Derivatives Taylor-series expansion Uniform grid spacing Second-order accurate O(h 2 )
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 82

lecture 8 - Fig PT6.10 Chapter 23 Numerical Differentiation...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online