Question: I need help with matlab homework 1 Numerical Differentiation The second and fourth order central difference formulas approximating f(x0) are given by (D02f)(x0;h)=h2f(x0+h)2f(x0)+f(x0h) and (D04f)(x0;h)=12h2f(x0+2h)+16f(x0+h)30f(x0)+16f(x0h)f(x02h),

I need help with matlab homework I need help with matlab homework 1 Numerical Differentiation The second and

1 Numerical Differentiation The second and fourth order central difference formulas approximating f(x0) are given by (D02f)(x0;h)=h2f(x0+h)2f(x0)+f(x0h) and (D04f)(x0;h)=12h2f(x0+2h)+16f(x0+h)30f(x0)+16f(x0h)f(x02h), respectively. (a) Show that the truncation errors in the approximations (1) and (2) are O(h2) and O(h4), respectively. (b) Consider the function f(x)=xx. Approximate f(2) by using the central difference formulas (1) and (2) with h=hk=2k,k=1,2,,16. Calculate the absolute errors in these two approximations for each stepsize hk=2k,k=1,2,,16 and then plot in one frame the errors against the stepsizes {hk}k=116 in log-log scale. What do you observe from the plots? Does this confirm the theory for order of convergence? If not, then explain why

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!