Question: 2. (4 points) In class, we learned that the interporr, we have the he interpolating polynomial may not approx- imate the function accurately in some

 2. (4 points) In class, we learned that the interporr, we

2. (4 points) In class, we learned that the interporr, we have the he interpolating polynomial may not approx- imate the function accurately in some cases counterexample. Consider x E I-5,5] p(x) we use equally spaced sampling points, then the interpolating polynomial will not approximate f(x) near the boundary. For example, in Matlab, we x = linspace(-5,516); If . We shall and use the data points x, y to construct the interpolating polynomial p(x) observe big difference between f(x) and p(x) near the boundary One possible remedy is to use Gauss-Lobatto interpolation points instead of equall spaced points. In Matlab, we can do the following to generate n+1 Gauss-Lobatto points. i=0:n; x =-5"cos(+pi); % 5 is the half length of the domain; And use x as the sampling points and construct the interpolating polynomial. (a) In Matlab, use n+1-16 equally spaced points as well as Gauss-Lobatto points (n-15) to construct the polynomials for the Runge's function, respectively. Then you plot the polynomials along with the function f (x). What do you observe? You can use any form of interpolating polynomial. (b) If you plot the Gauss-Lobatto points, what do you observe? rin

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!