2081 3

CSC212 ยท 2081 ยท 10 marks

Write an algorithm and program to implement Lagrange interpolation method.

Write an algorithm and program to implement Lagrange interpolation method.[10]

Numerical MethodChapter 2: Interpolation and RegressionLagrange's Interpolation

Lagrange interpolation is a method of constructing a polynomial that passes through a given set of data points. Given n+1 data points (xโ‚€, yโ‚€), (xโ‚, yโ‚), ..., (xโ‚™, yโ‚™), the Lagrange interpolating polynomial is: $$Pn(x) = \sum{i=0}^{n} Li(x) \cdot f(xi)$$ where the basis polynomials (Lagrange coef...