Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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