Professional Documents
Culture Documents
4-Lagrange Interpolation Part1
4-Lagrange Interpolation Part1
Interpolation
Lecture 6
Interpolation
• Definition: Given a set of (x,y) data points,
Interpolation is the process of finding a function
(usually a polynomial) that passes through these data
points.
Polynomial Interpolation
• Definition: In polynomial interpolation, we find a
polynomial (or set of polynomials) that passes
through each data point.
• Simplest case: Linear Interpolation: Given two
(different) data points (x0, y0) and (x1, y1) there is a
unique line through these points.
Lagrange’s Formula
• For (n) data points
Lagrange Interpolating polynomial pn-1(x) is defined
n
by:
pn 1 ( x) yi li ( x)
i 1
where
x x1 x x2 x xi 1 x xi 1 x xn
li ( x) . ....... . .....
xi x1 xi x2 xi x i1 xi x i1 xi xn
n xx
j
j 1, xi x j
j i
Lagrange’s Method
• Example: If n = 2, the interpolant is the straight line
(x x 2 )
l1(x)
(x1 x 2 )
(x x1 )
l2(x)
(x2 x1 )
Lagrange’s Method
• Example: If n = 3, the interpolant is parabolic:
(x x2 )(x x3 )
l1(x)
(x1 x2 )(x1 x3 )
( x x1 )( x x3 )
l2 ( x )
( x2 x1 )( x2 x3 )
(x x1 )(x x2 )
l3(x)
(x3 x1 )(x3 x2 )
Lagrange’s Method – Example 1
• Example: Given the data points
n n x xj
pn 1 ( x) yi li ( x) li ( x)
i 1 j 1, xi x j
j i