= Polynomial interpolation error
{title2=$f(x)-p_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}\prod_{j=0}^n(x-x_j)$}
{wiki}
Let $p_n$ be the <interpolation polynomial> through $f$ at distinct <interpolation nodes> $x_0,\ldots,x_n$. If $f$ has $n+1$ continuous <derivatives> on an interval containing the nodes and a point $x$, then
$$
f(x)-p_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}\prod_{j=0}^n(x-x_j)
$$
for some $\xi$ in that interval. At a node the error is zero. Away from the nodes, subtract a suitable multiple of the product so the resulting <function> vanishes at the nodes and at $x$; repeated <Rolle's theorem> gives the formula.<Fundamentals of Numerical Computation by Tobin A. Driscoll and others>[§9.1, polynomial interpolation error]{ref}
For linear interpolation, this yields $|f(x)-p_1(x)|\le M|(x-x_0)(x-x_1)|/2$ if $|f''|\le M$. The product explains why the placement of <interpolation nodes> matters. The intermediate point $\xi$ depends on $x$ and must not be treated as a constant when differentiating an error formula.
Back to article page