Interpolation and splines · Definition
Newton divided differences
When building an interpolating polynomial, it helps to use a basis that lets you add nodes without redoing the whole computation. Divided differences provide exactly that structure.
Definition
Newton divided differences are recursive quotients of function values at nodes that serve as the coefficients of the interpolating polynomial in Newton form.
Let \(x_0,\dots,x_n\) be distinct nodes. The zeroth-order divided difference is \(f[x_i]=f(x_i)\), and higher orders are obtained recursively. They are symmetric in their nodes, so \(f[x_0,x_1]=f[x_1,x_0]\). Moreover, \(f[x_0,\dots,x_k]\) vanishes if the function is a polynomial of degree less than \(k\), which is useful for checking calculations.
Worked example: for \(f(x)=x^2\) with nodes \(0,1,3\), the values are \(0,1,9\). Then \(f[0,1]=1\), \(f[1,3]=4\), and \(f[0,1,3]=\frac{4-1}{3-0}=1\). With these coefficients, \(p(x)=0+1\cdot x+1\cdot x(x-1)=x^2\) reproduces the function at all three nodes.
Typical error: dividing by the difference of function values instead of the difference of nodes, or using \(x_{i+1}-x_i\) in the denominator of a higher-order difference. Another frequent mistake is forgetting the sign when the order of the nodes is reversed. It is good practice to verify that the resulting polynomial passes through all the original data.
Think about it
Why can a new node be added to the Newton polynomial without recomputing the earlier coefficients?
Because the coefficient \(f[x_0,\dots,x_k]\) depends only on the nodes up to \(x_k\); earlier terms stay unchanged and the new one is added multiplied by \((x-x_0)\cdots(x-x_{k-1})\).
Exercises 10
- What is \(f[x_0]\) if \(f(x)=x^2\) and \(x_0=3\)?
- What is \(f[x_0,x_1]\) if \(f(x)=x^2\), \(x_0=1\) and \(x_1=4\)?
- What is the order of the divided difference \(f[x_0,x_1,x_2,x_3]\)?
- If \(f[x_0,x_1]=4\), what is \(f[x_1,x_0]\)?
- If \(f(x)=5\) at every node, what is \(f[x_0,x_1]\)?
- For \(f(x)=x^2\) with nodes \(0,1,3\), what is \(f[x_0,x_1,x_2]\)?
- For \(f(x)=x^3\) with nodes \(1,2,3\), what is \(f[x_0,x_1,x_2]\)?
- With \(f(0)=1\), \(f(1)=3\) and \(f(2)=7\), what is \(p(3)\) for the Newton interpolating polynomial?
- For \(f(x)=x^3\) with nodes \(0,1,2,3\), what is \(f[x_0,x_1,x_2,x_3]\)?
- For \(f(x)=\frac{1}{x}\) with nodes \(1,2,4\), what is \(f[x_0,x_1,x_2]\)?
References
- Richard L. Burden, J. Douglas Faires, Annette M. Burden, Numerical Analysis, 10th edition, Cengage Learning, 2016.
- Lloyd N. Trefethen, David Bau III, Numerical Linear Algebra, 1st edition, SIAM, 1997.