Skip to article frontmatterSkip to article content

Polynomial interpolation

The United States carries out a census of its population every 10 years. Suppose we want to know the population at times in between the census years, or to estimate future populations. One technique is to find a polynomial that passes through all of the data points.[1]

As posed in Definition 2.1.1, the polynomial interpolation problem has a unique solution. Once the interpolating polynomial is found, it can be evaluated anywhere to estimate or predict values.

2.1.1Interpolation as a linear system

Given data (ti,yi)(t_i,y_i) for i=1,,ni=1,\ldots,n, we seek a polynomial

p(t)=c1+c2t+c3t2++cntn1,p(t) = c_1 + c_{2} t + c_3t^2 + \cdots + c_{n} t^{n-1},

such that yi=p(ti)y_i=p(t_i) for all ii. These conditions are used to determine the coefficients c1,cnc_1\ldots,c_n:

c1+c2t1++cn1t1n2+cnt1n1=y1,c1+c2t2++cn1t2n2+cnt2n1=y2,c1+c2t3++cn1t3n2+cnt3n1=y3,c1+c2tn++cn1tnn2+cntnn1=yn.\begin{split} c_1 + c_2 t_1 + \cdots + c_{n-1}t_1^{n-2} + c_nt_1^{n-1} &= y_1, \\ c_1 + c_2 t_2 + \cdots + c_{n-1}t_2^{n-2} + c_nt_2^{n-1} &= y_2, \\ c_1 + c_2 t_3 + \cdots + c_{n-1}t_3^{n-2} + c_nt_3^{n-1} &= y_3, \\ \vdots \qquad & \\ c_1 + c_2 t_n + \cdots + c_{n-1}t_n^{n-2} + c_nt_n^{n-1} &= y_n. \end{split}

These equations form a linear system for the coefficients cic_i:

[1t1t1n2t1n11t2t2n2t2n11t3t3n2t3n11tntnn2tnn1][c1c2c3cn]=[y1y2y3yn], \begin{bmatrix} 1 & t_1 & \cdots & t_1^{n-2} & t_1^{n-1} \\ 1 & t_2 & \cdots & t_2^{n-2} & t_2^{n-1} \\ 1 & t_3 & \cdots & t_3^{n-2} & t_3^{n-1} \\ \vdots & \vdots & & \vdots & \vdots \\ 1 & t_n & \cdots & t_n^{n-2} & t_n^{n-1} \\ \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3 \\ \vdots \\ c_n \end{bmatrix} = \begin{bmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{bmatrix},

or more simply, Vc=y\mathbf{V} \mathbf{c} = \mathbf{y}. The matrix V\mathbf{V} is of a special type.

Polynomial interpolation can therefore be posed as a linear system of equations with a Vandermonde matrix.

2.1.2Exercises

  1. Suppose you want to interpolate the points (1,0)(-1,0), (0,1)(0,1), (2,0)(2,0), (3,1)(3,1), and (4,2)(4,2) by a polynomial of as low a degree as possible.

    (a) ✍ What is the maximum necessary degree of this polynomial?

    (b) ✍ Write out a linear system of equations for the coefficients of the interpolating polynomial.

    (c) ⌨ Solve the system in (b) numerically.

  2. (a) ✍ Say you want to find a cubic polynomial pp such that p(1)=2p(-1) =-2, p(1)=1p'(-1) =1, p(1)=0p(1) = 0, and p(1)=1p'(1) =-1. (This is known as a Hermite interpolant.) Write out a linear system of equations for the coefficients of pp.

    (b) ⌨ Numerically solve the linear system in part (a) and make a plot of pp over 1x1-1 \le x \le 1.

  3. ⌨ Here are population figures (in millions) for three countries over a 30-year period (from United Nations World Population Prospects, 2019).

    1990200020102020
    United States252.120281.711309.011331.003
    India873.2781,056.5761,234.2811,380.004
    Poland37.96038.55738.33037.847

    (a) Use cubic polynomial interpolation to estimate the population of the USA in 2005.

    (b) Use cubic polynomial interpolation to estimate when the population of Poland peaked during this time period.

    (c) Use cubic polynomial interpolation to make a plot of the Indian population over this period. Your plot should be well labeled and show a smooth curve as well as the original data points.

  4. ⌨ Here are the official population figures for the state of Delaware, USA, every ten years from 1790 to 1900: 59096, 64273, 72674, 72749, 76748, 78085, 91532, 112216, 125015, 146608, 168493, 184735. For this problem, use

    t=year186010t = \frac{\text{year} - 1860}{10}

    as the independent (time) variable.

    (a) Using only the data from years 1860 to 1900, plot the interpolating polynomial over the same range of years. Add the original data points to your plot as well.

    (b) You might assume that adding more data will make the interpolation better. But this is not always the case. Use all the data above to create an interpolating polynomial of degree 11, and then plot that polynomial over the range 1860 to 1900. In what way is this fit clearly inferior to the previous one? (This phenomenon is studied in Chapter 9.)

Footnotes
  1. We’re quite certain that the U.S. Census Bureau uses more sophisticated modeling techniques than the one we present here!