x sin x d_ sin x = cos x
dx
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.
(1.4) Determine and compare the errors in the approximation in (1.1)-(1.3)
(1.5) Use the spline constructed in (1.3) to approximate cos 0.34
Comments
Leave a comment