Lagrange Interpolating Polynomials: X X X X X L
Lagrange Interpolating Polynomials: X X X X X L
x x1 x x0
L0 ( x)
L1 ( x) and
x0 x1 x1 x0
Lagrange Interpolating Polynomials
The linear Lagrange Interpolating
Polynomial through (x0, y0) and (x1, y1) is
P ( x) L0 ( x) f ( x0 ) L1 ( x) f ( x1 )
x x1 x x0
P ( x) f ( x0 ) f ( x1 )
x0 x1 x1 x0
Note that
L0 ( x0 ) 1, L0 ( x1 ) 0, L1 ( x0 ) 0, L1 ( x1 ) 1
1 1
P( x) ( x 5) 4 ( x 2) 1
3 3
P( x) x 6
Lagrange Interpolating Polynomials
Example:
The graph of y = P(x) is shown in the figure
6
3
y = P(x) = - x + 6
2
0
1 2 3 4 5
Lagrange Interpolating Polynomials
If x0, x1,…xn are n+1 distinct numbers and
f is a function whose values are given at
these numbers, then a unique polynomial
P(x) of degree at most n exist with
f ( xk ) P( xk )
for k = 0,1,…n
Lk (x)
or Ln,k (x) can simply be written as
when there is no confusion as to its
degree
Lagrange Interpolating Polynomials
Example:
a.) Use the number x0 = 2, x1 = 2.75 and x2
= 4 to find the second Lagrange
Interpolating polynomial for f(x) = 1/x
b.) use this polynomial to approximate f(3)
L0 =
( x) 1/3
( x 2.75)( x 4) 2
( x 2.75)( x 4)
( 2 2.75)( 2 4) 3
( x 2)( x 4) 16
L1 ( x ) ( x 2)( x 4)
( 2.75 2)( 2.75 4) 15
( x 2)( x 2.75) 2
L2 ( x ) ( x 2)( x 2.75)
( 4 2)( 4 2.5) 5
Lagrange Interpolating Polynomials
Also, therefore,
1
f ( x0 ) f (2) 2
2 P( x) f ( xk ) Lk ( x)
1 4 k 0
f ( x1 ) f (2.75)
2.75 11 1 2 35 49
1 P( x) x x
f ( x2 ) f (4) 22 88 44
4
3. f ( x) log 10 (3x 1)
4. f ( x) e 2 x x
Data Approximation and Neville’s
Method
Neville’s method overcome the trouble of
the standard Lagrarian polynomial
technique of of determining the degree of
polynomial to use.
x1 x0
called the first divided difference between x0 and x1
The function f 2 f1
f x1 , x2 f1
[1]
x2 x1
x2 x0
xn x0
Divided Differences
Divided Differences
The interpolating polynomial is
Pn ( x) a0 ( x x0 )a1 ( x x0 )( x x1 )a2 ...
( x x0 )( x x1 )...( x xn 1) an
Divided Differences
Example,
xi fi f[xi,xi+1] f[xi,...xi+2] f[xi,...xi+3] f[xi,...xi+4]
3.2 22.0
8.4000
2.7 17.8 2.856
2.118 -0.528
1.0 14.2 2.012 0.256
6.343 0.0865
4.8 38.3 2.263
16.750
5.6 51.7
1.0 0.765197
1.3 0.6200860
1.6 0.4554022
1.9 0.2818186
2.2 0.1103623
Complete the divided difference table for the data given, and construct the
interpolating polynomial that uses all the data and interpolate x =1.5
Divided Differences
EXERCISES
2. f(8.4) if f(8.1)=16.94410, f(8.3) = 17.56492,
f(8.6) = 18.50515, f(8.7) = 18.82091