Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A. Computing Assignment - Polynomial interpolation and node distributionn Required submission: 1 page PDF document and scripts/codes uploaded to Canvas. The purpose of this assignment
A. Computing Assignment - Polynomial interpolation and node distributionn Required submission: 1 page PDF document and scripts/codes uploaded to Canvas. The purpose of this assignment is to examine how the locations of the nodes zo, , ,xn affect the accuracy and robustness of polynomial interpolation. To compute the interpolating polynomial, you will be using the barycentric form described in lectures. For this, you need to download the matlab functions baryweights.m and baryinterp.m from the computing assignment page in Canvas. The first computes the weights wo, wi,... , wn of the barycentric form and the second computes the interpolating polynomial. To begin, consider the equally-spaced nodes on [-1,1], given by 2i Write code to compute the error of the interpolating polynomial en maX for some suitable range of n (in practice, you should replace this maximum by the maximum on some sufficiently fine grid) and plot log1o (en) versus n for the test functions: f (z) = 5-4 1 +1 Using this, comment on the accuracy of polynomial interpolation at equally-spaced nodes Next, consider the so-called Chebyshev nodes on [-1, 1], given by cos(i), 0,..., n. Repeat the previous experiment with these nodes instead of (1) and test it on the functions above Note that in this case you should not use the function baryweights.m to find the weights, but instead use the known formula u0-7 w,-(-1.jsl, ,n-1, un = _(1)". (if you don't do this, your computation may result in under/overflow). Is polynomial interpolation at Chebyshev nodes accurate? Is it robust? Finally, use the Chebyshev nodes to approximate the function fs(z) = cos(104) Find the smallest value of n (to within 10) such that en-10-5
Step 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