Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
P x 3 L0 x 8 L1 x
P(x) can satisfy the above conditions if
at x = x0 = 2, L0(x) = 1 and L1(x) = 0 and
at x = x1= 5, L0(x) = 0 and L1(x) = 1
x5
L0 x
and
25
x x1
L0 x
x0 x1
x2
L1 x
52
x x0
and L1 x
x1 x0
P x 3 L0 x 8 L1 x
P x L0 x y0 L1 x y1
Lagrange Interpolating Polynomial
P x L0 x f x0 L1 x f x1
P x L0 x f x0 L1 x f x1
x5
x2
P x
3
8
25
52
5x 1
P x
3
5 4 1
P 4
6.333
3
P x L0 x y0 L1 x y1 L2 x y2
P x L0 x f x0 L1 x f x1
L2 x f x2
x x1 x x2
L0 x
x0 x1 x0 x2
At x0, L0(x) becomes 1. At all
other given data points L0(x) is 0.
x x0 x x2
L1 x
x1 x0 x1 x2
At x1, L1(x) becomes 1. At all
other given data points L1(x) is 0.
x x0 x x1
L2 x
x2 x0 x2 x1
At x2, L2(x) becomes 1. At all
other given data points L2(x) is 0.
P x L0 x y0 L1 x y1 L2 x y2
........... Ln x yn
P x L0 x f x0 L1 x f x1
L2 x f x2 ........... Ln x f xn
( x x0 )( x x1 )...( x xk 1 )( x xk 1 )...( x x n )
Lk ( x )
( xk x0 )( x k x1 )...( x k xk 1 )( xk x k 1 )...( xk x n )
( x xi )
Lk ( x )
i 0 ( x k xi )
n
i k
Numerator of
Lk x
x x0 x x1 x x2 L
x xk 1 x xk 1 L L
x xn 1 x xn
Denominator of
Lk x
xk x0 xk x1 xk x2 L
xk xk 1 xk xk 1 L L
xk xn 1 xk xn
x0 , y0 2, 0.5
x1 , y1 2.5, 0.4
x2 , y2 4, 0.25
x x1 x x2
L0 x
x0 x1 x0 x2
x 2.5 x 4
L0 x
2 2.5 2 4
x 6.5 x 10
2
x x0 x x2
L1 x
x1 x0 x1 x2
x 2 x 4
L1 x
2.5 2 2.5 4
x 6x 8
0.75
2
x x0 x x1
L2 x
x2 x0 x2 x1
x 2 x 2.5
L2 x
4 2 4 2.5
x 4.5 x 5
3
2
P x L0 x f x0 L1 x f x1
L2 x f x2
P x x 6.5 x 10 0.5
2
x 6x 8
0.4
0.75
x 4 .5 x 5
0.25
3
1
f x
x
1
f 3 0.333
3
An approximation can be obtained
from the Lagrange Interpolating
Polynomial as:
0.325
x0 , y 0
and
x1 , y1
is
P x a 0 a1 x x0
P x a 0 a1 x x0
Set x x
0
P x0 y0 a0
Set
x x1
P x1 y1 a0 a1 x1 x0
y1 y 0
a1
x1 x0
Newtons equation of a function that passes
through three points
x0 , y 0 x1 , y1
is
and
x2 , y2
P x a0 a1 x x0
a2 x x0 x x1
a 2 , set x x 2
P x2 a0 a1 x2 x0
a2 x2 x0 x2 x1
To find
y2 y1 y1 y0
x2 x1 x1 x0
a2
x2 x0
P x a0 a1 x x0
a2 x x0 x x1
a3 x x0 x x1 x x2
P x a0 a1 x x0
a2 x x0 x x1
a3 x x0 x x1 x x2
The fourth term will vanish at all three
previous points and, therefore, leaving all
three previous coefficients intact.
xi
is denoted as
f xi
f xi f xi
f xi , xi 1
f xi , xi 1
f xi 1 f xi
xi 1 xi
f xi , xi 1 , xi 2
f xi , xi 1 , xi 2
f xi 1 , xi 2 f xi , xi 1
xi 2 xi
f xi , xi 1 , xi 2 , xi 3
f xi 1 , xi 2 , xi 3 f xi , xi 1 , xi 2
xi 3 xi
a1 f x0 , x1
a 2 f x0 , x1 , x 2
a3 f x0 , x1 , x 2 , x3
a 4 f x0 , x1 , x 2 , x3 , x 4
and so on.
Example
Find Newtons interpolating polynomial to
approximate a function whose 5 data points are
given below.
f x
2.0
0.85467
2.3
0.75682
2.6
0.43126
2.9
0.22364
3.2
0.08567
i
0
xi
2.0
f xi
f xi 1 , xi f xi 2 , xi 1 , xi
f xi 3 , , xi
f xi 4 , , xi
0.85467
-0.32617
2.3
0.75682
-1.26505
-1.08520
2.6
0.43126
2.13363
0.65522
-0.69207
3
2.9
0.22364
3.2
0.08567
-0.29808
0.38695
-0.45990
-2.02642
a1 f x0 , x1 0.32617
a2 f x0 , x1 , x2 1.26505
a3 f x0 , x1 , x2 , x3 2.13363
a4 f x0 , x1 , x2 , x3 , x4 2.02642
P x a0 a1 x x0
a2 x x0 x x1
a3 x x0 x x1 x x2
a4 x x0 x x1 x x2 x x3