Newton
Newton
Let the (xi , f(xi)), i = 0, 1, 2, , n be given unequal spaced data. We define the Newton divided difference
interpolation formula as follows: f(x) = f(x0)+(x−x0)f[x0, x1]+(x−x0)(x−x1)f[x0, x1, x2]+ ... + (x − x0)(x −
x1)...(x − xn−1)f[x0, x1, x2, ..., xn]
X Y
x 0=3.5 y 0=2
x 1=4.5 y 1=5
x 2=5.5 y 2=6
x 3=6.5 y 3=10
x 4 =7.5 y 4 =14
Since we have 5 data points ,So we are going to have polynomial of degree4.
p4 ( x )= y 0 + ∆ y 0 ( x−x 0 ) + ∆2 y 0 ( x−x 0 ) ( x−x 1 ) + ∆3 y 0 ( x−x 0 ) ( x−x 1 ) ( x−x 2) + ∆4 y 0 ( x−x 0 ) ( x−x 1) ( x−x 2 ) ( x−x 3 )
NEWTON'S DIVIDED DIFFERENCE FORMULA
Y ∆ ∆2 ∆3 ∆4
X
3.5 2
y 1− y
∆ y0 = 0
x¿ ¿
¿3
4.5 5 2
∆ y 0 =−1
∆ y 1=1 2
∆3 y0 =
3
5.5 6 ∆ 2 y 1=1 4 −1
∆ y 0=
4
∆ y 2 =4 3 −1
∆ y 1=
3
6.5 10 ∆ 2 y 2=0
∆ y 3 =4
7.5 14
p4 ( x )= y 0 + ∆ y 0 ( x−x 0 ) + ∆2 y 0 ( x−x 0 ) ( x−x 1 ) + ∆3 y 0 ( x−x 0 ) ( x−x 1 ) ( x−x 2) + ∆4 y 0 ( x−x 0 ) ( x−x 1) ( x−x 2 ) ( x−x 3 )
2
p4 ( 3.5 ) =2+3(3.5-3.5)+(-1)(3.5-3.5)(3.5-4.5)+ (3.5-3.5)(3.5-4.5)(3.5-5.5)+
3
1
(- )(3.5-3.5)(3.5-4.5)(3.5-5.5)(3.5-6.5)
4
=2+0+0+0
=2
NEWTON'S DIVIDED DIFFERENCE FORMULA
Output :