Lecture 14 Interpolation Methods - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Lecture 14 Interpolation Methods

Description:

... function interpolation of the data and piece-wise interpolation of the data. ... on the entire set of data points. Homework. Check the Homework webpage ... – PowerPoint PPT presentation

Number of Views:371
Avg rating:3.0/5.0
Slides: 27
Provided by: San59
Category:

less

Transcript and Presenter's Notes

Title: Lecture 14 Interpolation Methods


1
Lecture 14 - Interpolation Methods
  • CVEN 302
  • June 29, 2001

2
Lectures Goals
  • Interpolation methods
  • Lagranges Interpolation
  • Newtons Interpolation
  • Hermites Interpolation
  • Rational Function Interpolation
  • Spline (Linear,Quadratic, Cubic)
  • Interpolation of 2-D data

3
Interpolation Methods
Why would we be interested in interpolation
methods?
  • Interpolation method are the basis for other
    procedures that we will deal with
  • Numerical differentiation
  • Numerical integration
  • Solution of ODE (ordinary differential equations)
    and PDE (partial differential equations)

4
Interpolation Methods
Why would we be interested in interpolation
methods?
  • These methods demonstrate some important theory
    about polynomials and the accuracy of numerical
    methods.
  • The interpolation of polynomials serve as an
    excellent introduction to some techniques for
    drawing smooth curves.

5
Interpolation Methods
Interpolation uses the data to approximate a
function, which will fit all of the data points.
All of the data is used to approximate the values
of the function inside the bounds of the data.
We will look at polynomial and rational function
interpolation of the data and piece-wise
interpolation of the data.
6
Polynomial Interpolation Methods
  • Lagrange Interpolation Polynomial - a
    straightforward, but computational awkward way to
    construct an interpolating polynomial.
  • Newton Interpolation Polynomial - there is no
    difference between the Newton and Lagrange
    results. The difference between the two is the
    approach to obtaining the coefficients.

7
Lagrange Interpolation
This method is generally the easiest to work.
The data does not have to be equally spaced and
is useful for finding the points between
quadratic and cubic methods. However, it does
not provide an accurate model for large sets of
terms.
8
Lagrange Interpolation
The function can be defined as
where,
9
Lagrange Interpolation
The function can be defined as
where, the coefficients are defined as
10
Lagrange Interpolation
The method works for quadratic and cubic
polynomials. As you add additional points in the
degree of the polynomial increases. So if you
have n points it will fit a (n-1)th degree
polynomial.
11
Example of Lagrange Interpolation
What are the coefficients of the polynomial and
what is the value of P2(2.3)?
12
Example of Lagrange Interpolation
  • The values are evaluated
  • P(x) 9.2983(x-1.7)(x-3.0)
  • - 19.4872(x-1.1)(x-3.0)
  • 8.2186(x-1.1)(x-1.7)
  • P(2.3) 9.2983(2.3-1.7)(2.3-3.0)
  • - 19.4872(2.3-1.1)(2.3-3.0)
  • 8.2186(2.3-1.1)(2.3-1.7)
  • 18.3813

13
Lagrange Interpolation Program
The Lagrange interpolation is broken up into two
programs to evaluate the new polynomial.
  • C Lagrange_coef(x,y), which evaluates the
    coefficients of the Lagrange technique
  • P(x) Lagrange_eval(t,x,c), which uses the
    coefficients and x values to evaluate the
    polynomial
  • Plottest(x,y),which will plot the Lagrange
    polynomial

14
Example of Lagrange Interpolation
What happens if we increase the number of data
points?
Coefficient for 2 is
15
Example of Lagrange Interpolation
Note that the coefficient creates a P4(x)
polynomial and comparison between the two curves.
The original value P2(x) is given. The problem
with adding additional points will create
bulges in the graph.
16
Newton Interpolation
The Newton interpolation uses a divided
difference method. The technique allows one to
add additional points easily.
17
Newton Interpolation
For given set of data points (x1,y1), (x2,y2),
(x3,y3)
18
Newton Interpolation
The function can be defined as
19
Newton Interpolation
The method works for quadratic and cubic
polynomials. As you add additional points in the
degree of the polynomial increases. So if you
have n points it will fit a (n-1)th degree
polynomial. The method is setup to show the a
pattern for combining a table computation and
provide additional points.
20
Example of Newton Interpolation
What are the coefficients of the polynomial and
what is the value of P2(2.3)?
The true function of the points is f(x) 2x
21
Example of Newton Interpolation
22
Example of Newton Interpolation
The coefficients are the top row of the chart
23
Example of Newton Interpolation
  • The values are evaluated
  • P(x) 1 (x-0)
  • 0.5(x-0)(x-1)
  • 0.1667(x-0)(x-1)(x-2)
  • 0.04167(x)(x-1)(x-2)(x-3)
  • P(2.3) 1 (2.3)
  • 0.5(2.3)(1.3)
  • 0.1667(2.3)(1.3)(0.3)
  • 0.04167(2.3)(1.3)(0.3)(-0.7)
  • 4.9183 (4.9246)

24
Newton Interpolation Program
The Newton interpolation is broken up into two
programs to evaluate the new polynomial.
  • C Newton_coef(x,y), which evaluates the
    coefficients of the Newton technique
  • P(x) Newton_eval(t,x,c), which uses the
    coefficients and x values to evaluate the
    polynomial
  • Plottest_new(x,y),which will plot the Newton
    polynomial

25
Summary
  • The Lagrange and Newton Interpolation are
    basically the same methods, but use different
    coefficients. The polynomials depend on the
    entire set of data points.

26
Homework
  • Check the Homework webpage
Write a Comment
User Comments (0)
About PowerShow.com