Truncation Errors Truncation Errors Uniform grid spacing x f 3 h x f 2 h x f h

# Truncation errors truncation errors uniform grid

This preview shows page 7 - 11 out of 18 pages.

Truncation Errors 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 ξ ξ ξ
Error Propagation 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)
Trade-off between truncation and round-off errors Total Numerical Error Total Numerical Error
Example: First Derivatives 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 + - - - - = = - = - = - - = = = - = - = - - = = % . , .

#### You've reached the end of your free preview.

Want to read all 18 pages?

• Fall '10
• Elkamal
• Numerical Analysis, Partial differential equation, 1 L, forward difference, backward difference, 0.5 Second