Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A. Computing Assignment - Polynomial interpolation and node distributionn Requir

ID: 3142802 • Letter: A

Question

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/n), 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

Explanation / Answer

Description:

From considering the Chebyshev Nodes ,Bary Weights functions,BaryInterpolation Functions, the foolowing code can be written

CODE:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote