- 1)
- (6 pts) For this problem, you will compare 2 methods for
approximating the derivative of a function. Using the code in the notes
as a guide, generate a table of values of
*f*(*x*) for In addition, at each*x*-coordinate, generate approximations for*f*'(*x*) using the formulas:

and

Compute the relative errors in your approximations Note that you will have a relative error for each point in the table and some of the relative errors will need special attention.Test your program using on the interval Use

*n*= 10 and Which derivative approximation is more accurate? If you try to print out*x*,*f*(*x*), both approximations for*f*'(*x*) and their relative errors on one line, your output will wrap at the screen boundary so you may need to experiment with your data output. - 2)
- What happens to your errors in Problem 1 if you try and use
Note that
10
^{-11}= 1.0*d*-11 Why does this happen?

2017-10-27