Description
To get a better interpolation for f(x), we can add a curvature to the function with an nth degree polynomial when we have n+1 points:
fn(x)=b0+b1(x−x0)+⋯+bn(x−x0)(x−x1)⋯(x−xn−1) To get the coefficients b0, b1, …, bn:
b0=b1=b2=⋮bn=f(x0)f[x1,x0]f[x2,x1,x0]f[xn,xn−1,⋯,x1,x0] The functions with brackets are finite divided differences where:
f[xi,xj]=f[xi,xj,xr]=⋮f[xn,xn−1,⋯,x1,x0]=xi−xjf(xi)−f(xj)xi−xrf[xi,xj]−f[xj,xr]xn−x0f[xn,xn−1,⋯,x1]−f[xn−1,xn−2,⋯,x1] If we have an additional value f(xn+1), we can evaluate the error with the following equation:
Rn=f[xn+1,xn,xn−1,⋯,x0](x−x0)(x−x1)⋯(x−xn)