Find the polynomial that interpolates a function given by $f(x) =
x(\ln(x)-1)$ on the points 2 and 3. Use values for f with 4 correct
decimal places (?) and give an estimation for the error of the
interpolation.
I'm not sure what "4 correct decimal places" means here, I'll assume it means simply "with 4 decimal places". Using my calc I got:
$$f(2) = -0.6137 \\
f(3) = 0.2958$$
For the interpolations, I got $0.9095x-2.4327$ for both.
I'm having trouble applying the formulas for the error.
Lagrange:
- What is $\xi (x)$?
- What is $f^{(n+1)}$?
Newton:
- What is $c$?
- What is $f^{(n+1)}$?
How do I apply these formulas in this case?
Best Answer
I agree with the calculations you did.
$c$ and $\xi(x)$ are some unknown point in the range $[x_0, x_n]$.
$f^{(n+1)}$ is the $(n+1)^{th}$ derivative of the function.
Since $n = 1$ (two points - linear interpolation), for the error, we have $f^{(2)}(x) = f''(x)$
$$E_1 = |f(x) - P_1(x) | \le \max_{[2,3]} \left|\dfrac{f''(\xi)}{2}\right|\max_{[2,3]} \left|(x-x_0)(x-x_1)\right|$$
The second derivative $f''(x) = \dfrac{1}{x}$.
The error is given by
$$E_1 \le \max_{[2,3]} \left|\dfrac{1}{2x}\right|\max_{[2,3]} \left|(x-2)(x-3)\right|$$
Finding the max over those ranges
$$E_1 \le \left(\dfrac{1}{4}\right)\left(\dfrac{1}{4}\right) = \dfrac{1}{16}$$