Divided differences

Let {xj}j=0nR be a set of distinct abscissae (also called “nodes”) and let Pn denote the real vector space of polynomials of degree at most n with real coefficients. If f is a real-valued function defined on {xj}j=0n, then there exists a polynomial pnPn that interpolates f at the abscissae in the sense that pn(xj)=f(xj) for each j: namely, pn=jf(xj)j, where j(x)=ijxxixjxi. Furthermore, it is the only such polynomial, for if qnPn also interpolates f at the same abscissae, then pnqnPn has n+1 distinct roots and must therefore be the zero polynomial.

The polynomials {j}j=0n constitute a basis of Pn known as the Lagrange basis. Other bases of Pn include the monomial basis {φj}j=0n, given by φj(x)=xj, and the Newton basis {ωj}j=0n, given by ωj(x)=i<j(xxi).

Divided differences are quantities that can be used (among other things) to compute the coefficients of pn in the Newton basis. We define the divided difference f[x0,x1,,xn] as the coefficient of φn in the monomial basis representation of pn (which for simplicity we will refer to as the “leading coefficient” of pn despite the fact that it may be zero). Below we present several properties of divided differences.

Coefficients of polynomial interpolant in Newton basis pn=jf[x0,,xj]ωj

Proof. Write pn=jcjωj. For each j, the polynomial ijciωiPj interpolates f at {x0,,xj} since ωk(xi)=0 for all ij<k. Clearly, its leading coefficient is cj, so by definition, cj=f[x0,,xj]. ∎

Notably, divided differences obey a recurrence relation that allows for their recursive computation.

Recurrence relation f[x0,,xn]=f[x1,,xn]f[x0,,xn1]xnx0 f[x0]=f(x0)

Proof. Suppose that n1. If p+Pn1 interpolates f at {x1,,xn} and pPn1 interpolates f at {x0,,xn1}, then the polynomial pPn given by p(x)=p(x)+xx0xnx0(p+p)(x) interpolates f at {x0,,xn}. For the base case, observe that the constant polynomial f(x0)P0 interpolates f at {x0}. ∎

Interestingly, we observe that p(x) is a convex combination of p(x) and p+(x) for x0xxn. The formula above also yields a recursive algorithm for evaluating p known as Neville’s algorithm. Namely, if pi,jPji interpolates f at {xi,,xj} so that p=p0,n, then pi,j(x)=(xxi)pi+1,j(x)(xxj)pi,j1(x)xjxi, where pi,i(x)=f(xi).

An explicit formula for divided differences can also be deduced by inspecting the Lagrange basis representation of pn.

f[x0,,xn]=jf(xj)ij1xjxi


Linearity

If α,βR, then (αf+βg)[x0,,xn]=α(f[x0,,xn])+β(g[x0,,xn]).

Proof. If pfPn and pgPn interpolate f and g, respectively, at {x0,,xn}, then αpf+βpgPn interpolates αf+βg at {x0,,xn}. ∎

Symmetry

If σ is a permutation of {0,,n}, then f[x0,,xn]=f[xσ(0),,xσ(n)].

Proof. In view of the definition above, this is immediate since {x0,,xn}={xσ(0),,xσ(n)}. ∎

Factor property

If g(x)=(xx0)f(x) and n1, then g[x0,x1,,xn]=f[x1,,xn].

Proof. If pfPn1 interpolates f at {x1,,xn}, then the polynomial pgPn given by pg(x)=(xx0)pf(x) interpolates g at {x0,,xn}. ∎

In fact, the recurrence relation (excluding the base case) can be derived solely from linearity, symmetry, and the factor property: (xnx0)(f[x0,,xn])=([(xx0)(xxn)]f)[x0,,xn]=f[x1,,xn]f[x0,,xn1] Thus, these three properties along with the property f[x0]=f(x0) determine the values of all divided differences.


The identity f[x0,x1]=f(x1)f(x0)x1x0 suggests a relationship between divided differences and derivatives: if, say, x0<x1, fC([x0,x1]), and f exists on (x0,x1), then the mean value theorem amounts to the assertion that f[x0,x1]=f(ξ) for some ξ(x0,x1). This generalizes readily to divided differences and derivatives of higher order.

Mean value theorem

Let a=min{xj}j=0n and b=max{xj}j=0n. If fC([a,b]) and f(n) exists on (a,b), then f[x0,,xn]=f(n)(ξ)n! for some ξ(a,b).

Proof. By symmetry, we may assume that a=x0<<xn=b. If pPn interpolates f at {x0,,xn}, then fp has n+1 distinct zeroes in [x0,xn]. By (repeated applications of) Rolle’s theorem, (fp)(n)=f(n)f[x0,,xn]n! has a zero ξ(x0,xn). ∎

Polynomial interpolation error

Let a=min{xj}j=0n and b=max{xj}j=0n. If fC([a,b]) and f(n+1) exists on (a,b), then for all x[a,b] there exists a ξ(a,b) for which f(x)pn(x)=f(n+1)(ξ)(n+1)!ωn+1(x)=f(n+1)(ξ)(n+1)!j(xxj).

Proof. If x{xj}j=0n, the conclusion is trivial; otherwise, the polynomial pn+f[x0,,xn,x]ωn+1 interpolates f at {x0,,xn,x} and the conclusion follows from the mean value theorem. ∎

In the same vein, f[x0,x0+h]=f(x0+h)f(x0)hf(x0) as h0 if f is differentiable at x0, the geometric interpretation being that the slope of the secant line through (x0,f(x0)) and (x0+h,f(x0+h)) tends to that of the tangent line through (x0,f(x0)). This observation along with the identity (fg)[x0,x1]=f[x0]g[x0,x1]+f[x0,x1]g[x1] allows us to recover the product rule for derivatives. More generally, we have the following identity for divided differences.

Product rule (fg)[x0,,xn]=jf[x0,,xj]g[xj,,xn]

Proof. If pPn interpolates f at {x0,,xn}, then (fg)[x0,,xn]=(pg)[x0,,xn] since fg agrees with pg on {x0,,xn}. By linearity and the factor property, we have (pg)[x0,,xn]=(jf[x0,,xj]ωjg)[x0,,xn]=jf[x0,,xj](ωjg)[x0,,xn]=jf[x0,,xj]g[xj,,xn]. By Taylor’s theorem, (Δhkf)(x0+jh)=f(k)(x0)hk+o(hk) if f is k times differentiable at x0, where Δh denotes the forward difference operator with step h (that is, (Δhf)(x)=f(x+h)f(x)). As a result, f[x0+jh,,x0+nh]=(Δhnjf)(x0+jh)(nj)!hnjf(nj)(x0)(nj)! and from the above we can derive the generalized product rule for derivatives, (fg)(n)=j(nj)f(j)g(nj).