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

 Write a computer program to calculate the Lagrange interpolation polynomial P_n

Write a computer program to calculate the Lagrange interpolation polynomial P_n (x) to f(x) such that: P_n (X_j) = f(X_j) j = 0, 1, 2......., n a) Apply it to some elementary functions or a discrete data set. b) Apply it to function f(x) = 1/1 + 25x^2 in the interval [-1, 1] with equally spaced interpolation points and n = 8, 16, 32. Plot Pn(x) and f(x) in [-1, 1] interval to see the interpolation error. c) Do the same as in b, but use the roots of the Chebychev polynomial T_n + 1(x) as interpolation points. Compare results with those obtained in (b)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!