
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

CMSC/MAPL 460 Dr. Wolfe ASSIGNMENT #3 Due March 26, 2001
1 + x^2
, − 5 ≤ x ≤ 5.
(a) For n = 5, 10 , 15, plot pn(x), the polynomial interpolating r(x) at n + 1 equally spaced points, along with the graph of r(x). Use the MATLAB functions POLY- FIT and POLYVAL. Observe what is happening to the graphs. Where is the polynomial fit getting better? Where is it getting worse? (b) Repeat part (a) but now use the interpolation points
xj = 5 cos
(2j − 1)π 2 n + 2
, j = 1,... , n + 1.
What difference do you observe?
S(x) =
28 + 25x + 9x^2 + x^3 , − 3 ≤ x ≤ − 1 , 26 + 19x + 3x^2 − x^3 , − 1 ≤ x ≤ 0 , 26 + 19x + 3x^2 − 2 x^3 , 0 ≤ x ≤ 3 , −163 + 208x − 60 x^2 + 5x^3 , 3 ≤ x ≤ 4. Show that S(x) is a natural cubic spline function with the knots {− 3 , − 1 , 0 , 3 , 4 }. (A natural cubic spline is a spline S(x) which satisfies S′′(x 1 ) = S′′(xN ) = 0) Be sure to state explicitly each of the properties of S(x) which are necessary for this to be true.