Compute the first four polynomial interpolations (linear, quadratic, etc.) for the function f (x) = 1

Question:

Compute the first four polynomial interpolations (linear, quadratic, etc.) for the function f (x) = 1 − exp(−x) with evenly spaced data on the interval x ∈ [0, 3]. Make a plot of the interpolants and the function itself using MATLAB. Also make a plot of the difference between the function and the interpolant. You can either work it out by hand or by writing a program. If you work it out by hand, include the values of all the coefficients for each interpolation formula.

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: