# Matlab ICE

Recall that we can approximate the derivative of a function f at a point x using the formula
f'(x) ~ Fh = (f(x+h)-f(x-h)) / (2h).

For this exercise, you must write a function deriv_test that takes three arguments: the function f, the point where the derivative is to be approximated x, and the correct value of the derivative. Thus, the function will be called as deriv_test(f,x,correct). The function will compute the above approximation to the derivative for values of h going down in powers of ten, with exponent p, from 10-1 to 10-16. It will plot the absolute error |f'(x)-Fh|
for each of those values of p = -1, -2, ..., -16. In other words, the power p of 10 is on the horizontal axis, and the error is on the vertical axis. The function must return the vector of approximations to the derivative.

The "final exam" for this course will take place at 8:00 AM on Tuesday, 12 December. This will be an ordinary 50 minute test. It will be comprehensive, but weighted toward the latter half of the semester. As always, paper notes will be permitted, but no electronic devices will be allowed.

A Solution example is available for the quiz.

Assignment A is posted.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us