Find the polynomial p of degree10 that interpolates x on 1 1

Find the polynomial p of degree?10 that interpolates |x| on [-1, 1] at 11 equally spaced points. Print the difference |x| - p(x) at 41 equally spaced points. Then do the same with Chebyshev nodes. Compare.

Solution

This is just a simple linear regression problem. You can either manually solve the problem by creating a 11x11 matrix, or you can just use polyfit.

i.e.

We will get the same coefficient vector C. Our desired polynomial is like this

 Find the polynomial p of degree?10 that interpolates |x| on [-1, 1] at 11 equally spaced points. Print the difference |x| - p(x) at 41 equally spaced points. T

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site