cot4501fa10_midterm_solutions

# cot4501fa10_midterm_solutions - COT4501 Fall2010 Midterm...

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

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.

Unformatted text preview: COT4501 Fall2010 Midterm Solutions I: [25 points] Truncation Error and Rounding Error (a) (10 points) In the finite difference approximation of the first derivative f ′ ( x ) ≈ f ( x + h ) − f ( x ) h , why do the truncation error and rounding error go to zero and infinity respectively as h → ? The truncation error for the finite difference approximation of the first derivative is bounded by Mh 2 since we have via the Taylor series approximation that f ′ ( x ) = f ( x + h ) − f ( x ) h − h 2 f ′′ ( θ ) with θ ∈ [ x,x + h ] . When M is defined as M = sup θ ∈ [ x,x + h ] | f ′′ ( θ ) | we see that the truncation error defined as | f ′ ( x ) − f ( x + h ) − f ( x ) h | ≤ Mh 2 which goes to zero as h → . The rounding error for the the finite difference approximation of the first derivative is bounded by 2 ϵ h where each function call is assumed to have a maximum rounding error of ϵ . Since the bound can be reached when the function call rounding errors are exactly ϵ and when the errors conspire to add up, the rounding error can go to infinity as h → . (b) (15 points) Derive the value of h at which the total error (truncation + rounding error) for the following approximation to the second derivative of the function f ( x ) is minimized: f ′′ ( x ) ≈ f ( x + h ) − 2 f ( x ) + f ( x − h ) h 2 . (1) You may assume a maximum absolute error of ϵ for each function call [ f ( x ) , f ( x + h ) and f ( x − h ) in (1) above]. Explain the significance of your result. From the Taylor series approximations, we have f ( x + h ) = f ( x ) + hf ′ ( x ) + h 2 2 f ′′ ( x ) + h 3 6 f ′′′ ( x ) + h 4 24 f (4) ( θ 1 ) , θ 1 ∈ [ x,x + h ] (2) and f ( x − h ) = f ( x ) − hf ′ ( x ) + h 2 2 f ′′ ( x ) − h 3 6 f ′′′ ( x ) + h 4 24 f (4) ( θ 2 ) , θ 2 ∈ [ x − h,x ] . (3) From (2) and (3), we get f ( x + h ) + f ( x − h ) − 2 f ( x ) = h 2 f ′′ ( x ) + h 4 24 f (4) ( θ 1 ) + h 4 24 f (4) ( θ 2 ) which can be further simplified as f ′′ ( x ) = f ( x + h ) − 2 f ( x ) + f ( x − h ) h 2 − h 2 24 f (4) ( θ 1 ) + h 2 24 f (4) ( θ 2 ) ....
View Full Document

### Page1 / 4

cot4501fa10_midterm_solutions - COT4501 Fall2010 Midterm...

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

View Full Document
Ask a homework question - tutors are online