Question: (a) For a smooth function f, derive a second order accurate formula for ap- proximating f () using f(x Fih), i = 1, 2, and

(a) For a smooth function f, derive a second order accurate formula for ap- proximating f" () using f(x Fih), i = 1, 2, and h > 0. Find the form (not only its order) of the truncation error of the formula. (b) Consider f(x) = e*, and write a MATLAB program to approximate f"(0) by the formula you obtain using h = 10-), j = 1, ...,8. Write down (use 'format shortE') the relative errors for every h. Discuss and explain the results in terms of convergence with respect to h in the light of the truncation error and other sources of errors. (a) For a smooth function f, derive a second order accurate formula for ap- proximating f" () using f(x Fih), i = 1, 2, and h > 0. Find the form (not only its order) of the truncation error of the formula. (b) Consider f(x) = e*, and write a MATLAB program to approximate f"(0) by the formula you obtain using h = 10-), j = 1, ...,8. Write down (use 'format shortE') the relative errors for every h. Discuss and explain the results in terms of convergence with respect to h in the light of the truncation error and other sources of errors
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
