Question: Need help writing Matlab code and please comment on the work so I could understand thank you Consider the function f(r) = (r2-31+2) arctan r.

Need help writing Matlab code and please comment on the work so I could understand thank you

Need help writing Matlab code and please comment on the work so

Consider the function f(r) = (r2-31+2) arctan r. Estimate the derivative of the function at the point 0 using each of the three formulas listed below for all of the following values of h: h = 10- 1, 3, 6. Make a log log plot of your error verses h (use the same plot for both methods). n (forward difference) (3 pt centered difference) (5 pt centered difference) 2h f'(o) 12h For n = 1,3,6 call FDI, FD3, FD6 the result obtain with the forward difference, CD31, CD33, CD36 the result obtain with the 3 point centered difference, and CD51, CD53, CD56 the result obtain with the 5 point centered difference. Plot your error for all three methods on the same graph. Explain your findings. Is the error decreasing with h? Why or why not? Which method has the largest error? Which method has the smallest error? Why? Write those answers in comment using

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!