Problem Set 5:   Interpolation and Numerical Differentiation
```Consider the four data points:

x:  0  1  2  3

y:  9  8  5  7

They are assumed to be values of some function f(x).

1. Interpolation
a. Construct the 3rd degree interpolating polynomial P3(x) using the Lagrange basis.
b. Construct the 3rd degree interpolating polynomial P3(x) using the Newton basis.
c. Show that they produce the same polynomial.
d. Plot the data and the interpolant on the same plot.
e. Use Matlab's  pchip interpolant, evaluate it at x=1.5 and compare with P3(1.5).

2. Derivatives
Approximate f'(1)  (the first derivative of f at x=1)
a. by a forward difference.
b. by a backward difference.
c. by a centered difference.
d. which one would you "trust" most ?  why ?
e. Another approximation of f'(1) would be P'3(1)
(the derivative of the cubic interpolant you constructed above).
Find the value.

3.a. Construct the quadratic polynomial P2(x) interpolating the first 3 points.
b. P'2(1)  is yet another approximation of f'(1).
Does it agree with any of the above ?
c. Try to find the slope of the pchip interpolant at x=1.
Compare with the other approximations to f'(1).
```