Theorem
Suppose x0,x1,…,xn are distinct numbers in the interval [a,b] and f∈Cn+1[a,b]. Then, for each x in [a,b], a number ξ(x) (generally unknown) between x0,x1,…,xn, and hence in (a,b), exists with:
f(x)=Pn(x)+(n+1)!f(n+1)(ξ(x))(x−x0)(x−x1)⋯(x−xn)=Pn(x)+Rn(x)
where Pn(x) is the interpolating polynomial. Rn(x) is the error term. The above equation can only be used for known and differentiable functions, which is usually not the case.
An alternative formula to find error is by applying a finite divided difference to approximate the (n+1)th derivative. Thus, we have:
Rn=f[x,xn,xn−1,…,x0](x−x0)(x−x1)⋯(x−xn)
Since this contains the unknown f(x), it cannot be solved for the error. However, using an additional data point f(xn+1), the error can be estimated as follows.
Rn≈f[xn+1,xn,xn−1,…,x0](x−x0)(x−x1)⋯(x−xn)