Numerical Methods207810 marksLagrange interpolation formula and algorithm
Write an algorithm and program to compute the interpolation using Lagrange Interpolation.
Write an algorithm and program to compute the interpolation using Lagrange Interpolation.[10]
Lagrange Interpolation is a method to find a polynomial that passes through a given set of data points. Given n+1 data points $(x0, y0), (x1, y1), \ldots, (xn, yn)$, the interpolating polynomial is: $$P(x) = \sum{i=0}^{n} yi \cdot Li(x)$$ where $Li(x)$ is the Lagrange Basis Polynomial: $$Li(x) = ...