Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(a) Implement the Barycentric Formula for evaluating the interpolating polynomial for arbitrarily distributed nodes x0,...,xn; you need to write a python function or script that
(a) Implement the Barycentric Formula for evaluating the interpolating polynomial for arbitrarily distributed nodes x0,...,xn; you need to write a python function or script that computes the barycentric weights (n) = 1/ (xj xk ) first and another code to j k=j use these values in the Barycentric Formula. Make sure to test your implementation. (b) Consider the following table of data xj f(xj) 0.00 0.0000 0.25 0.7071 0.50 1.0000 0.75 0.7071 1.25 -0.7071 1.50 -1.0000 Use your code in (a) to find P5(2) as an approximation of f(2).
We proved in class that where Pn is the interpolating polynomial of f at the nodes xo, , xn, P* is the best approximation of f, in the maximum (infinity) norm, by a polynomial of degree at most n, and An is the Lebesgue constant, i.e. An- |L"|0, where (a) Write a computer code to evaluate the Lebesgue function (2) associated to a given set of pairwise distinct nodes zo, .. . , Tn. (b) Consider the equidistributed points x,-1+j(2) for j - 0,... ,n. Write a com puter code that uses (a) to evaluate and plot Ln(x) (evaluate Ln(x) at a large number of points-k to have a good plotting resolution, c.g. xk =-1+ k(2e), k = 0, . . . , neStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started