4
$\begingroup$

Problem: Use the Lagrange interpolating polynomial of degree three or less and four digit chopping arithmetic to approximate cos(.750) using the following values. Find an error bound for the approximation. \begin{align} \cos(.6980) = 0.7661 \\ \cos(.7330) = 0.7432 \\ \cos(.7680) = 0.7193 \\ \cos(.8030) = 0.6946 \\ \end{align} The actual value of $\cos(.7500) = 0.7317$ (to four decimal places). Explain the discrepancy between the actual error and the error bound.


Solution: The approximation of $\cos(.7500)$ is $0.7313$. The actual error is $0.0004$, and an error bound is $2.7 × 10^{-8}$. The discrepancy is due to the fact that the data are given only to four decimal places.


Can anyone help me figure out the intermediary steps from the problem to solution?

1 Answers 1

0

This is what I did:

$L_0 = \dfrac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_0-x_2)(x_0-x_3)}$

$L_1 = \dfrac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)}$

$L_2 = \dfrac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)}$

$L_3 = \dfrac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)}$

Which give:

$L_0=-0.06304, L_1=0.5785, L_2=-0.06185, L_3=0.5460$

Then $P_3(x)=f(x_0)L_0+f(x_1)L_1+f(x_2)L_2+f(x_3)L_3$

Which gives $P_3(x)=0.7313$

What I'd like help with is the error terms, that confuses me still, but it's something like

$\dfrac{f^{(4)}(\epsilon)}{4!} (x-x_0)(x-x_1)(x-x_2)(x-x_3)$

What do we do with this?