Consider the following data: x sin x d dx sin x = cos x 0.30 0.29552 0.95534 0.32 0.31457 0.94924 0.35 0.34290 0.93937 0.50 0.47943 0.87758
(1.1) Construct a Lagrange interpolating polynomial that interpolates the function at all the points. Use the Lagrange polynomial to approximate sin 0.33.
(1.2) Use all the points to construct a Newton’s divided difference interpolating polynomial and use it to approximate sin 0.33.
(1.3) Use the first three data points and five-decimal digit arithmetic with rounding to construct a cubic spline S with boundary conditions S 0 (x0) = f 0 (x0) and S 0 (xn) = f 0 (xn) which forces the slopes of the spline to assume certain values at the two boundaries. Use the spline to approximate sin 0.33.
Comments
Leave a comment