{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 13

# Lecture 13 - Example First Derivatives f x = 0.1 x 4 0.15 x...

This preview shows pages 1–4. Sign up to view the full content.

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. = f = -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 ε ε

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

View Full Document
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. = f = -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 ε ε
Second-Derivatives Taylor-series expansion Uniform grid spacing Second-order accurate O(h 2 ) + + + = + + + - + - = + + + + + = - + - + ) x ( f ! 4 h ) x ( f ! 2 h ) x ( f 2 ) x ( f ) x ( f ) x ( f ! 4 h ) x ( f ! 3 h ) x ( f ! 2 h ) x ( f h ) x ( f ) x ( f ) x ( f ! 4 h ) x ( f ! 3 h ) x ( f ! 2 h ) x ( f h ) x ( f ) x ( f i 4 i 2 i 1 i

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 19

Lecture 13 - Example First Derivatives f x = 0.1 x 4 0.15 x...

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

View Full Document
Ask a homework question - tutors are online