Lecture No. 10
Lecture No. 10
Let us assume that the function is known for several values of , for
. The divided differences of orders are now defined recursively as:
y[ x0 ] y ( x0 ) y0
is the zero-th order divided difference
The first order divided difference is defined as
y y0
y[ x0 , x1 ] 1
x1 x0
Similarly, the higher order divided differences are defined in terms of lower order divided
differences by the relations of the form
y[ x1 , x2 ] y[ x0 , x1 ]
y[ x0 , x1 , x2 ]
x2 x0
Generally,
1
y[ x0 , x1 ,K , xn ] y[ x1 , x2 ,K , xn ] y[ x0 , x1,K , xn1 ]
xn x 0
Standard format of the Divided Differences
We can easily verify that the divided difference is a symmetric function of its arguments.
That is,
y0 y1
y[ x1 , x0 ] y[ x0 , x1 ]
x0 x1 x1 x0
y[ x1 , x2 ] y[ x0 , x1 ]
y[ x0 , x1 , x2 ]
Now x2 x0
1 y2 y1 y1 y0
x2 x0 x2 x1 x1 x0
Therefore
y0 y1 y2
y[ x0 , x1 , x2 ]
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x1 )
This is symmetric form, hence suggests the general result as
y0 y1 yk
y[ x0 ,K , xk ] L
( x0 x1 ) L ( x0 xk ) ( x1 x0 ) L ( x1 xk ) ( xk x0 ) L ( xk xk 1 )
OR
k
yi
y[ x0 ,..., xk ] k
i 0 ( xi x j )
i 0
i j
Example:
Construct the Newton’s divided difference table for values of and
Solution:
=9
3 15 15-0=15 57-33/5-3 12-9/5-
2=1
=12
4 48 48-15=33 87-57/6-4 15-12/6-3
=15 =1
5 105 105-48=57
6 192 192-105=87 NEWTON’S
DIVIDED
DIFFERENCE INTERPOLATION FORMULA
Let be a function which takes values corresponding to
We choose an interpolating polynomial, interpolating at
in the following form
y f ( x) a0 a1 ( x x0 ) a2 ( x x0 )( x x1 )
L an ( x x0 )( x x1 )L ( x xn 1 )
Here, the coefficients are so chosen as to satisfy above equation by the pairs
Thus, we have
y ( x0 ) f ( x0 ) y0 a0
y ( x1 ) f ( x1 ) y1 a0 a1 ( x1 x0 )
y ( x2 ) f ( x2 ) y2 a0 a1 ( x2 x0 ) a2 ( x2 x0 )( x2 x1 )
L
yn a0 a1 ( xn x0 ) a2 ( xn x0 )( xn x1 ) L an ( xn x0 ) L ( xn xn 1 )
The coefficients can be easily obtained from the above system of equations, as they
form a lower triangular matrix.
The first equation gives
a0 y ( x0 ) y0
The second equation gives
y1 y0
a1 y[ x0 , x1 ]
x1 x0
Third equation yields
y2 y0 ( x2 x0 ) y[ x0 , x1 ]
a2
( x2 x0 )( x2 x1 )
Which can be rewritten as
y1 y0
y2 y1 ( x1 x0 ) ( x2 x0 ) y[ x0 , x1 ]
x1 x0
a2
( x2 x0 )( x2 x1 )
That is
y2 y1 y[ x0 , x1 ]( x1 x2 ) y[ x1 , x2 ] y[ x0 , x1 ]
a2
( x2 x0 )( x2 x1 ) x2 x0
Thus, in terms of second order divided differences, we have
a2 y[ x0 , x1 , x2 ]
Similarly, we can show that
Newton’s divided difference interpolation formula can be written as
y f ( x) y0 ( x x0 ) y[ x0 , x1 ] ( x x0 )( x x1 ) y[ x0 , x1 , x2 ]
L ( x x0 )( x x1 )K ( x xn 1 ) y[ x0 , x1 ,..., xn ]
Newton’s divided differences can also be expressed in terms of forward, backward and central
differences. They can be easily derived.
Assuming equi-spaced values of abscissa, we have
y1 y0 y0
y[ x0 , x1 ]
x1 x0 h
y1 y0
y[ x1 , x2 ] y[ x0 , x1 ] h y0
2
y[ x0 , x1 , x2 ] h
x2 x0 2h 2!h 2
By induction, we can in general arrive at the result
n y0
y[ x0 , x1 ,K , xn ]
n !h n
Similarly,
y y0 y1
y[ x0 , x1 ] 1
x1 x0 h
y2 y1
y[ x1 , x2 ] y[ x0 , x1 ] h h 2 y2
y[ x0 , x1 , x2 ]
x2 x0 2h 2!h 2
In General,we have
n yn
y[ x0 , x1 ,..., xn ]
n !h n
Also, in terms of central differences, we have
X 0 1 4
y1 y0 y1/ 2
y[ x0 , x1 ]
x1 x0 h
y3/ 2 y1/ 2
y[ x1 , x2 ] y[ x0 , x1 ] h h 2 y1
y[ x0 , x1 , x2 ]
x2 x0 2h 2!h 2
2 m ym
y[ x0 , x1 ,..., x2 m ] 2m
(2m)! h
2 m 1
ym (1/ 2)
y[ x0 , x1 ,..., x2 m 1 ]
(2m 1)!h 2 m 1
Divided Differences
1 1
y f ( x ) 1 ( x 0)(0) ( x 0)( x 1) ( x 0)( x 1)( x 2)
2 12
3 2
x 3x 2
x 1
12 4 3
We observe that the interpolating polynomial by both Lagrange’s and Newton’s divided
difference formulae is one and the same.
Note!
Newton’s formula involves less number of arithmetic operations than that of Lagrange’s.
Example
Using Newton’s divided difference formula, find the quadratic equation for the following data.
Hence find y (2).
Solution:
The divided difference table for the given data is constructed as:
X Y 1st D.D 2nd D.D
0 2
1 1 -1 1/2
4 4 1
Let I denotes the closed interval spanned by the values x0 ,..., xn , x . Then F (x) vanishes (n + 2)
times in the interval I.
By Rolle’s theorem F ( x ) vanishes at least (n + 1) times in the interval I, F ( x) at least n
times, and so on.
Eventually, we can show that F ( n 1) ( x) vanishes at least once in the interval I, say at x
Thus, we obtain
0 y( n1) ( ) Pn( n1) ( ) K ( n1) ( )
Since Pn(x) is a polynomial of degree n, its (n + 1)th derivative is zero. Also, from the definition
of ( x)
( n1) ( x) (n 1)!.
Therefore we get
y ( n 1) ( )
K
(n 1)!
Hence
y ( n 1) ( )
( x) y ( x) Pn ( x) ( x )
(n 1)!
X ………. Y …………
0 1 2 3 4
0 0 0 2 6 12
1 1 1 3 7 13
2 4 4 6 10 16
3 9 9 11 15 21
4 16 16 18 22 28
X …….. Y ……..
0 1 2 3 4
0 0 0 2 6 12
1 1 1 3 7 13
2 4 4 6 10 16
3 9 9 11 15 21
4 16 16 18 22 28
Y f
Cont! Using quadratic interpolation in both x and y directions we need to consider three points in
x and y directions. To start with we have to treat one variable as constant, say x. Keeping x = 2.5,
y = 3.5 as near the center of the set, we choose the table of values corresponding to x = 1,2, 3 and
y = 2, 3, 4.
Cont! The region of fit for the construction of our interpolation polynomial is shown in different
color in the table
Cont ! Thus using Newton’s forward difference formula, we have
At x=1
Y f f 2 f
2 3
3 7 4 2
4 13 6
Cont ! Similarly
At x=2
Y f f 2 f
2 6
3 10 4 2
4 16 6
Cont !
Similarly
At x=3
Y f f 2 f
2 11
3 15 4 2
4 21 6
y y0 3.5 2
with p 1.5
h 1
Cont !
y y0 3.5 2
with p 1.5
h 1
p ( p 1) 2
f (1,3.5) f 0 pf 0 f0
2!
(1.5)(0.5)
3 (1.5)(4) (2) 9.75
2
Cont !
(1.5)(0.5)
f (2,3.5) 6 (1.5)(4) (2) 12.75
2
(1.5)(0.5)
f (3,3.5) 11 (1.5)(4) (2) 17.75
2
Cont !
Therefore we arrive at the following result
At x=3.5
Y f f 2 f
1 9.75
2 12.75 3 2
3 17.75 5
Cont !
2.5 1
Now defining p 1.5
1
(1.5)(0.5)
f (2.5,3.5) 9.75 (1.5)(3) (2) 15
2
Cont !
E f ( x) f ( x h)
and
E 1
hD log E log(1 )
Remember the Differential operator, D is known to represents the property
d
f ( x) f ( x)
Df ( x)
dx
2
D f ( x) 2 f ( x) f ( x)
2 d "
dx
This would mean that in terms of ∆ :
1 2 3 4 5
D L
h 2 3 4 5
Therefore
1 2 f ( x0 ) 3 f ( x0 )
Df ( x0 ) f ( x0 ) f ( x0 )
h 2 3
4 f ( x0 ) 5 f ( x0 ) d
L f ( x0 )
4 5 dx
in other words
1 2 y0 3 y0 4 y0
Dy0 y0 y0 L
h 2 3 4
Case II:
Using backward difference operator , we have
hD log(1 )
On expansion, we have
1 2 3 4
D L
h 2 3 4
and
2
1 11 5
2 yn 3 yn 4 yn 5 yn L
h 12 6
2
The formulae for Dy and D y are useful to calculate the first and second derivatives at the
0 0
beginning of the table of values in terms of forward differences; while formulae for y’ and y’’
n n
2
The formulae for Dy and D y are useful to calculate the first and second derivatives at the
0 0
beginning of the table of values in terms of forward differences; while formulae for y’ and y’’
n n
Case III: Using central difference operator δ and following the definitions of differential
operator D, central difference operator δ and the shift operator E, we have
E1/ 2 E 1/ 2 ehD / 2 e hD / 2
hD
2sinh
2
Therefore, we have
hD
sinh 1
2 2
But,
1 x 3 1 3 x 5
sinh 1 x x
2 3 2 4 5
1 3 5 x 7
L
2 46 7
Using the last two equations we get
hD 3 3
5 L
2 2 6 8 40 32
That is,
1 1 3 3 5
D L
h 24 640
Therefore
d
y y Dy
dx
1 1 3 5
y 3 y y L
h 24 640
Also
1 2 1 4 3 6
D2 2
L
h 12 90
Hence
1 2 1 1
y D 2 y 2
y 4 y 6 y L
h 12 90
For calculating the second
derivative at an interior tabular
point, we use the equation
1 2 1 4 3 6
D2 2
L
h 12 90
while for computing the firstderivative at an interior tabular point, we in general use another
convenient form for D, which is derived as follows. Multiply the right hand
side of
d 1 1 3 5
y y Dy y 3 y y L
dx h 24 640
by
1 ( 2 4)
which is unity and noting the Binomial expansion
1 2
1 2 1 2
1 1
4 8
3 4 15
6 L
128 48 64
we get
1 2 3 4
D 1 L
h 8 128
1 3 3 5
L
24 640
On simplification, we obtain
1 3 4 5
D L
h 6 120
1 3 1 5
y D y y y L
h 6 30
The last two equations for y” and y’ respectively are known as Stirling’s formulae for computing
the derivatives of a tabular function. Similar formulae can be derived for computing higher order
derivatives of a tabular function.
The equation for y’ can also be
written as
12 (1) 2 (2) 2 5 (1) 2 (2) 2 (3) 2 7
y y 3 y y y L
h 3! 5! 7!
In order to illustrate the use of formulae derived so far, for computing the derivatives of a
tabulated function, we shall consider some examples in the next lecture.