Lagrange interpolation - PowerPoint PPT Presentation

About This Presentation
Title:

Lagrange interpolation

Description:

Lagrange interpolation – PowerPoint PPT presentation

Number of Views:750
Avg rating:3.0/5.0
Slides: 20
Provided by: tonyc7
Category:

less

Transcript and Presenter's Notes

Title: Lagrange interpolation


1
Lagrange interpolation Gives the same results as
Newton, but different method
2
Formal definition for nth order interpolating
polynomial
L is defined as
3
Example interpolate exp(2) using exp(1),
exp(1.5) and exp(2.5)
4
Same as with Newton interpolation
Matlab code for it
5
How to get the coefficients of the interpolating
polynomial (not just single points)? i.e. what
are the as in
Use second order example
with data points
6
Substitute the data points into the equation
or
a Vandermonde matrix
7
  • Can solve with any matrix method
  • - but-
  • matrix is often ill-conditioned, esp. for large
    n
  • not fastest means of getting as (special
    methods for Vandermonde matrices)
  • Getting coefficients is generally not a good idea

8
Inverse interpolation Given xs, f(x)s -
interpolation lets us get new f(x) for new
x. What about new x from new f(x)?
9
A number of methods 1) Switch x and f(x) and do
new interpolation I.e. f(x)1/x
Instead of using
use
10
  • This may not be best way
  • ill conditioned problem

Another method - fit low-order polynomial to a
few points and use root finding Still beware of
ill-conditioning!
11
Example
Given f(x)1.4, what is x?
Find interpolating polynomial (quadratic)
Gauss elimination
12
After backsubstitution
Use a root finding method for f(x)1.4
13
Actually, in this case cant use quadratic formula
14
Equally spaced data There are special algorithms
for equally spaced data If
then
15
So
If
16
then
Why bother?
Useful later for numerical integration Just use
Newton or Lagrange interpolation now
17
Extrapolation
Basically dont Example
18
Use x2,4,6 and estimate f(3) by interpolatio n
and f(8) by extrapolation
Interpolating function
19
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com