Write programs for constructing Lagrange and Newton's divided difference interpolating polynomials for approximating a function at a given set of data points. Use them to find f(0.2) from the following table:
x | 0.0 | 0.1 | 0.3 | 0.6 | 1.0
f(x) | -6.00000 | -5.89483 | -5.65014 | -5.17788 | -4.28172
Are you getting the same result from both the polynomials? If so, why? Add f(1.1) = -3.99583 and see how it affects your solution.