Math 342 - Week 7 Notes

Mon, Feb 28

Today we started talking about polynomial interpolation (see Section 3.1 from the book). We introduced Vandermonde matrices and used them to find the interpolating polynomials for these two examples:

  1. Find a 3rd degree polynomial that passes through (-1,-4), (0,3), (1,0), and (5,8).

  2. Find a 4th degree polynomial that passes through (0,1), (1,5), (2, 31), (3, 121), (4, 341).

Using Python and Numpy, you can enter a Vandermonde matrix using a list comprehension inside another list comprehension. For example, the Vandermonde matrix for the first example would be:

import numpy as np
V = np.array([[x**k for k in range(4)] for x in [-1,0,1,5]])

Wed, Mar 2

Today we introduced the Lagrange basis polynomials and the Newton basis polynomials. These are different bases for the vector space of all polynomials of degree up to \(n-1\). We did the following examples.

  1. We found the Lagrange basis polynomials for the points (-1,-4), (0,3), (1,0), and (5,8). Here is a graph of these four polynomials in Desmos.

  2. Explain why the sum of all the Lagrange basis polynomials for a set of \(n\) data points is always 1.

  3. Find the 2nd degree interpolating polynomial passing through (-1,-6), (1,0), (2,6) using Lagrange basis polynomials, then compare with the solution using Vandermonde matrices.

  4. We found the Newton polynomials for the points (-1,-4), (0,3), (1,0), and (5,8). Then we wrote a matrix equation to find the linear combination that interpolates those four points.

  5. Find the interpolating polynomial for (-1,-6), (1,0), (2,6) using Newton polynomials.


Fri, Mar 4

Today we looked at how to use the method of divided differences to find the coefficients on the Newton basis polynomials to find an interpolating polynomial. The book has a good detailed explanation of the process.

We made divided differences tables and found the Newton interpolating polynomials for these three examples:

  1. (-1,-4), (0,3), (1,0), and (5,8).

  2. (-1,-6), (1,0), (2,6)

  3. (1,2), (2,3), (4,5), (5,9)