= Divided difference
{title2=$f[x_0,\ldots,x_k]$}
{wiki}
For $k+1$ distinct <interpolation nodes>, the <divided difference> $f[x_0,\ldots,x_k]$ is the coefficient of $x^k$ in the <interpolation polynomial> of <polynomial degree> at most $k$ through those <interpolation nodes>. It is the <leading coefficient> when that <polynomial degree> is exactly $k$, and zero when it is smaller. Explicitly,
$$
f[x_0,\ldots,x_k]
=\sum_{j=0}^k\frac{f(x_j)}
{\prod_{i\ne j}(x_j-x_i)}.
$$
starting with $f[x_i]=f(x_i)$. The <divided differences> obey the recurrence
$$
f[x_0,\ldots,x_k]
=\frac{f[x_1,\ldots,x_k]-f[x_0,\ldots,x_{k-1}]}
{x_k-x_0}.
$$
For data $f(0)=1$, $f(1)=2$, $f(2)=5$, the first <divided differences> are $f[0,1]=(2-1)/(1-0)=1$ and $f[1,2]=(5-2)/(2-1)=3$. The second <divided difference> is $f[0,1,2]=(3-1)/(2-0)=1$, the <leading coefficient> of $x^2+1$. The first <divided difference> is the slope of a <secant line>; higher <divided differences> supply successive coefficients for the <Newton polynomial>.
Back to article page