

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!


AMSC/CMSC 460 Dr. Wolfe ASSIGNMENT #3 Due June 26, 2009
1 + 25x^2
, − 1 ≤ x ≤ 1.
(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 = cos
(2j − 1)π 2 n + 2
, j = 1,... , n + 1.
What difference do you observe?
f (0) = 0, f ′(0) = 1, f (1) = 1. 1752 , f ′(1) = 1. 5431.
Calculate an approximation to f (0.5) using cubic Hermite interpolation. Compare the result with f (0.5) = .5211.
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.
T 0 10 20 30 P(T) .006107 .012277 .023378. T 40 50 60 70 P(T) .073774 .12338 .19924. T 80 90 100 110 P(T) .47364 .70112 1.01325 1.
Interpolate these data with the cubic spline S(x) using the MATLAB function SPLINE and plot the results. It is also known that P (5) =. 008721 , P (45) = 0.095848 and P (95) = 0.84528. How well does S(x) do at these points?