An interpolating polynomial matches the data at the nodes. How far is it from the function in between? The answer looks just like the Taylor remainder, with one important new piece, and it uses the polynomial from Newton's Divided Differences or any other form, since they are all the same polynomial.
Key idea
Why it works
Two factors control the error. The derivative factor depends on $f$; you cannot change it. The node product $\omega(x)$ depends only on where the nodes are: it is small among the nodes and grows quickly outside them, and for equally spaced nodes it is much larger near the ends of the interval than in the middle.
Worked example: An exact error
- Here $f'''(x) = 6$ is constant, so the formula is exact: $f(x) - p(x) = \frac{6}{3!}x(x - 1)(x - 2) = x(x - 1)(x - 2)$.
- At $x = 3$: $3 \cdot 2 \cdot 1 = 6$, so $p(3) = 27 - 6 = 21$.
- Check: $p(x) = 3x^{2} - 2x$ fits $(0, 0), (1, 1), (2, 8)$, and $p(3) = 21$.
Answer: $6$, and $p(3) = 21$
Worked example: A bound
- Every derivative of $\sin$ is at most 1 in size, so $|f'''(\xi)| \le 1$.
- $|\omega(0.25)| = |0.25| \cdot |{-0.25}| \cdot |{-0.75}| = 0.046875$.
- Bound: $\frac{1}{3!}(0.046875) = 0.0078125$. The actual error is about $0.0070$, close to the bound.
Answer: at most $0.0078$
Worked example: Linear interpolation in a table
- Between neighbors $x_0$ and $x_1 = x_0 + h$, $|\omega(x)| = |(x - x_0)(x - x_1)|$ is largest at the midpoint, where it is $\frac{h^{2}}{4}$.
- With $|f''| \le e$: error $\le \frac{e}{2} \cdot \frac{h^{2}}{4} = \frac{eh^{2}}{8}$.
- $\frac{eh^{2}}{8} \le 10^{-6}$ gives $h \le \sqrt{8 \times 10^{-6}/e} \approx 0.0017$.
Answer: $h \lesssim 0.0017$
Common mistake