Question: 1. Write a computer program to calculate the Lagrange interpolation polynomial P (x) to f(x) such that: n P(x)=f(x) j=0,1,2,......,n a) Apply it to

1. Write a computer program to calculate the Lagrange interpolation polynomial P (x) to f(x) such that: n P(x)=f(x) j=0,1,2,......,n a) Apply it to some elementary functions or discrete data sets. b) Apply it to function f(x)=- 1 1+25x in the interval [-1,1] with equally spaced interpolation points and n=8, 16, 32. Plot P(x) and f(x) in [-1,1] interval to see the interpolation error. n+1 c) Do the same as in b, but use the roots of the Chebychev polynomial T, (x) as interpolation points. Compare results with those obtained in (b).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
