Polynomial Interpolation - PowerPoint PPT Presentation

About This Presentation
Title:

Polynomial Interpolation

Description:

By Adam Mallen What is it? How is it different from regression? When would you use it? What can go wrong? How do we find the interpolating polynomial? – PowerPoint PPT presentation

Number of Views:155
Avg rating:3.0/5.0
Slides: 22
Provided by: MSCS3
Learn more at: http://www.mscs.mu.edu
Category:

less

Transcript and Presenter's Notes

Title: Polynomial Interpolation


1
Polynomial Interpolation
  • By Adam Mallen

2
Outline Polynomial Interpolation
  • What is it?
  • How is it different from regression?
  • When would you use it?
  • What can go wrong?
  • How do we find the interpolating polynomial?
  • Can you do this in Matlab?
  • What else?

3
What is it?
  • The interpolating polynomial is the polynomial of
    least degree which passes through all the data
    points
  • Formally
  • A unique solution to this problem is guaranteed

4
Example
X Y
0 -10
10 3
20 -30
30 6
40 10
50 -2
60 15
5
Example
X Y
0 -10
10 3
20 -30
30 6
40 10
50 -2
60 15
6
Is it different from regression?
  • Interpolation models must take on the exact
    values of the known data points
  • Regression models minimize the residuals
  • Given n1 data points
  • The best fit polynomials of degree lt n
  • form regression models.
  • The best fit polynomial of degree n
  • is the interpolating polynomial because the sum
    of the residuals is exactly zero.

7
Interpolation vs. Regression
8
Interpolation vs. Regression
9
Interpolation vs. Regression
10
When would you use it?
  • Regression models assume that measurements have
    noise.
  • Regression models estimate f(x) and may be used
    for forecasting future and past values.
  • Interpolation models may be suitable when
    measurements are believed to be exact.
  • Interpolation models estimate values between
    known data points.
  • NOT for forecasting

11
Interpolation, not Forecasting
12
What can go wrong?
  • Runge Phenomenon
  • Divergence for some selection of nodes
  • Splines can help solve these problems
  • However,
  • Splines may only be differentiable a certain
    number of times at the data points.
  • Polynomials are infinitely differentiable
  • Splines can be more complicated to compute and
    store.

13
Runge Phenomenon 5 nodes
14
Runge Phenomenon 9 nodes
15
Runge Phenomenon 17 nodes
16
Runge Phenomenon 21 nodes
17
How do you solve for it?
18
A Solution Method
  • We can represent this system of equations as

19
Matlab Solution
  • function result poly_interp(x, y)
  • x and y are column vectors with the x and y
    values of the data points
  • there are n1 data points
  • n length(x) - 1
  • construct the Vandermonde matrix
  • V zeros(n1,n1)
  • for i1n1
  • for j1n1
  • V(i,j) x(i).(j-1)
  • end for
  • end for
  • solve the system of equations
  • alpha V\y
  • result fliplr(alpha')
  • end

20
What else?
  • Lagrange form of the interpolating Polynomial
  • Newton form of the interpolating Polynomial
  • Chebyshev nodes
  • Hermite interpolation problem
  • Harmonic function interpolation
  • Lebesgue constants

21
Questions?
Write a Comment
User Comments (0)
About PowerShow.com