Consider the following approximation:

f′(x) ≈ Af(x − 2h) + B f(x − h) + C f(x) + D f(x + h) + E f(x + 2h).

1) Determine the values of the constants A, B, C, D, and E so that the approximation
is as accurate as possible. What is the order of the error? Please note this is (at least somewhat) a “pencil and paper” exercise.

2) Suppose your answer to part 1) above was that the order of the error was
O(hp). Recall that in class we generated Matlab pictures showing a line of slope
p (approximately) when we plotted log h on the horizontal axis and log error on the vertical axis. Produce such a picture for this approximation and compute the slope.