You are on page 1of 25

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 1




E Er rr ro or r T Te er rm m i in n I In nt te er rp po ol la at ti io on n F Fo or rm mu ul la ae e
W We e k kn no ow w, , i if f y y ( (x x) ) i is s a ap pp pr ro ox xi im ma at te ed d b by y a a p po ol ly yn no om mi ia al l P P
n n
( (x x) ) o of f d de eg gr re ee e n n t th he en n t th he e e er rr ro or r i is s
g gi iv ve en n b by y
( ) ( ) ( ),
n
x y x P x =
Where

0 1 0
( ) ( )( ) ( ) [ , ,..., ]
n n
x x x x x x x y x x x = "
A Al lt te er rn na at ti iv ve el ly y i it t i is s a al ls so o e ex xp pr re es ss se ed d a as s

0
( ) ( ) [ , ,..., ] ( )
n
x x y x x x K x = =
N No ow w, , c co on ns si id de er r a a f fu un nc ct ti io on n F F ( (x x) ), , s su uc ch h t th ha at t
( ) ( ) ( ) ( )
n
F x y x P x K x =
D De et te er rm mi in ne e t th he e c co on ns st ta an nt t K K i in n s su uc ch h a a w wa ay y t th ha at t F F( (x x) ) v va an ni is sh he es s f fo or r x x = = x x
0 0
, , x x
1 1
, , , , x x
n n
a an nd d a al ls so o
f fo or r a an n a ar rb bi it tr ra ar ri il ly y c ch ho os se en n p po oi in nt t x , , w wh hi ic ch h i is s d di if ff fe er re en nt t f fr ro om m t th he e g gi iv ve en n ( (n n + + 1 1) ) p po oi in nt ts s. .

L Le et t I I d de en no ot te es s t th he e c cl lo os se ed d i in nt te er rv va al l s sp pa an nn ne ed d b by y t th he e v va al lu ue es s
0
,..., , .
n
x x x T Th he en n F F ( (x x) ) v va an ni is sh he es s
( (n n + + 2 2) ) t ti im me es s i in n t th he e i in nt te er rv va al l I I. .
B By y R Ro ol ll le e s s t th he eo or re em m ( ) F x
v va an ni is sh he es s a at t l le ea as st t ( (n n + + 1 1) ) t ti im me es s i in n t th he e i in nt te er rv va al l I I, , ( ) F x
a at t
l le ea as st t n n t ti im me es s, , a an nd d s so o o on n. .
E Ev ve en nt tu ua al ll ly y, , w we e c ca an n s sh ho ow w t th ha at t
( 1)
( )
n
F x
+
v va an ni is sh he es s a at t l le ea as st t o on nc ce e i in n t th he e i in nt te er rv va al l I I, , s sa ay y a at t
x = T Th hu us s, , w we e o ob bt ta ai in n

( 1) ( 1) ( 1)
0 ( ) ( ) ( )
n n n
n
y P K
+ + +
=
S Si in nc ce e P P
n n
( (x x) ) i is s a a p po ol ly yn no om mi ia al l o of f d de eg gr re ee e n n, , i it ts s ( (n n + + 1 1) )t th h d de er ri iv va at ti iv ve e i is s z ze er ro o. . A Al ls so o, , f fr ro om m t th he e
d de ef fi in ni it ti io on n o of f ( ) x

( 1)
( ) ( 1)!.
n
x n
+
= +
T Th he er re ef fo or re e w we e g ge et t

( 1)
( )
( 1)!
n
y
K
n

+
=
+

H He en nc ce e

( 1)
( )
( ) ( ) ( ) ( )
( 1)!
n
n
y
x y x P x x
n

+
= =
+


f fo or r s so om me e i in n t th he e i in nt te er rv va al l I I. .
T Th hu us s t th he e e er rr ro or r c co om mm mi it tt te ed d i in n r re ep pl la ac ci in ng g y y ( (x x) ) b by y e ei it th he er r N Ne ew wt to on n s s d di iv vi id de ed d d di if ff fe er re en nc ce e
f fo or rm mu ul la a o or r b by y a an n i id de en nt ti ic ca al l L La ag gr ra an ng ge e s s f fo or rm mu ul la a i is s

( 1)
0
( )
( ) ( ) [ , ,..., ] ( )
( 1)!
n
n
y
x x y x x x x
n

+
= =
+





Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 2


I IN NT TE ER RP PO OL LA AT TI IO ON N I IN N T TW WO O D DI IM ME EN NS SI IO ON NS S

L Le et t u u b be e a a p po ol ly yn no om mi ia al l f fu un nc ct ti io on n i in n t tw wo o v va ar ri ia ab bl le es s, , s sa ay y x x a an nd d y y, , i in n p pa ar rt ti ic cu ul la ar r q qu ua ad dr ra at ti ic c i in n x x
a an nd d c cu ub bi ic c i in n y y, , w wh hi ic ch h i in n g ge en ne er ra al l c ca an n b be e w wr ri it tt te en n a as s

2
0 1 2 3
2 3 2 2
4 5 6 7 8
3 2 2 3 2
9 10 11
( , ) u f x y a a x a y a x
a xy a y a y a y x a yx
a y x a y x a y x
= = + + +
+ + + + +
+ + +

T Th hi is s r re el la at ti io on n i in nv vo ol lv ve es s m ma an ny y t te er rm ms s. . I If f w we e h ha av ve e t to o w wr ri it te e a a r re el la at ti io on n i in nv vo ol lv vi in ng g t th hr re ee e o or r m mo or re e
v va ar ri ia ab bl le es s, , e ev ve en n l lo ow w d de eg gr re ee e p po ol ly yn no om mi ia al ls s g gi iv ve e r ri is se e t to o l lo on ng g e ex xp pr re es ss si io on ns s. . I If f n ne ec ce es ss sa ar ry y, , w we e
c ca an n c ce er rt ta ai in nl ly y w wr ri it te e, , b bu ut t s su uc ch h c co om mp pl li ic ca at ti io on ns s c ca an n b be e a av vo oi id de ed d b by y h ha an nd dl li in ng g e ea ac ch h v va ar ri ia ab bl le e
s se ep pa ar ra at te el ly y. .
I If f w we e l le et t x x, , a a c co on ns st ta an nt t, , s sa ay y x x = = c c, , t th he e e eq qu ua at ti io on n s si im mp pl li if fi ie es s t to o t th he e f fo or rm m

2 3
0 1 2 3 x c
u b b y b y b y
=
= = + + +
N No ow w w we e a ad do op pt t t th he e f fo ol ll lo ow wi in ng g p pr ro oc ce ed du ur re e t to o i in nt te er rp po ol la at te e a at t a a p po oi in nt t ( (1 1, , m m) ) i in n a a t ta ab bl le e o of f t tw wo o
v va ar ri ia ab bl le es s, , b by y t tr re ea at ti in ng g o on ne e v va ar ri ia ab bl le e a a c co on ns st ta an nt t s sa ay y x x = = x x
1 1
. . T Th he e p pr ro ob bl le em m r re ed du uc ce es s t to o t th ha at t o of f a a
s si in ng gl le e v va ar ri ia ab bl le e i in nt te er rp po ol la at ti io on n. .
A An ny y o on ne e o of f t th he e m me et th ho od ds s d di is sc cu us ss se ed d i in n p pr re ec ce ed di in ng g s se ec ct ti io on ns s c ca an n t th he en n b be e a ap pp pl li ie ed d t to o g ge et t
f f ( (x x
1 1
, , m m) ). . T Th he en n w we e r re ep pe ea at t t th hi is s p pr ro oc ce ed du ur re e f fo or r v va ar ri io ou us s v va al lu ue es s o of f x x s sa ay y x x = = x x
2 2
, , x x
3 3
, , , , x x
n n

k ke ee ep pi in ng g y y c co on ns st ta an nt t. . T Th hu us s, , w we e g ge et t a a n ne ew w t ta ab bl le e w wi it th h y y c co on ns st ta an nt t a at t t th he e v va al lu ue e y y = = m m a an nd d w wi it th h
x x v va ar ry yi in ng g. . W We e c ca an n t th he en n i in nt te er rp po ol la at te e a at t x x = = 1 1. .
E Ex xa am mp pl le e
T Ta ab bu ul la at te e t th he e v va al lu ue es s o of f t th he e f fu un nc ct ti io on n f f ( (x x) ) = = x x
2 2
+ +y y
2 2
- -y y
f fo or r x x = = 0 0, ,1 1, ,2 2, ,3 3, ,4 4 a an nd d y y = = 0 0, ,1 1, ,2 2, ,3 3, ,4 4. .
U Us si in ng g t th he e t ta ab bl le e o of f t th he e v va al lu ue es s, , c co om mp pu ut te e f f( (2 2. .5 5, , 3 3. .5 5) ) b by y n nu um me er ri ic ca al l d do ou ub bl le e i in nt te er rp po ol la at ti io on n
S So ol lu ut ti io on n
T Th he e v va al lu ue es s o of f t th he e f fu un nc ct ti io on n f fo or r t th he e g gi iv ve en n v va al lu ue es s o of f t th he e g gi iv ve en n v va al lu ue es s o of f x x a an nd d y y a ar re e g gi iv ve en n i in n
t th he e f fo ol ll lo ow wi in ng g t ta ab bl le e
X X . .. . Y Y . .. .
0 0 1 1 2 2 3 3 4 4
0 0 0 0 0 0 2 2 6 6 1 12 2
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 3





C Co on nt t! ! U Us si in ng g q qu ua ad dr ra at ti ic c i in nt te er rp po ol la at ti io on n i in n b bo ot th h x x a an nd d y y d di ir re ec ct ti io on ns s w we e n ne ee ed d t to o c co on ns si id de er r t th hr re ee e
p po oi in nt ts s i in n x x a an nd d y y d di ir re ec ct ti io on ns s. . T To o s st ta ar rt t w wi it th h w we e h ha av ve e t to o t tr re ea at t o on ne e v va ar ri ia ab bl le e a as s c co on ns st ta an nt t, , s sa ay y x x. .
K Ke ee ep pi in ng g x x = = 2 2. .5 5, , y y = = 3 3. .5 5 a as s n ne ea ar r t th he e c ce en nt te er r o of f t th he e s se et t, , w we e c ch ho oo os se e t th he e t ta ab bl le e o of f v va al lu ue es s
c co or rr re es sp po on nd di in ng g t to o x x = = 1 1, ,2 2, , 3 3 a an nd d y y = = 2 2, , 3 3, , 4 4. .
C Co on nt t! ! T Th he e r re eg gi io on n o of f f fi it t f fo or r t th he e c co on ns st tr ru uc ct ti io on n o of f o ou ur r i in nt te er rp po ol la at ti io on n p po ol ly yn no om mi ia al l i is s s sh ho ow wn n i in n
d di if ff fe er re en nt t c co ol lo or r i in n t th he e t ta ab bl le e


C Co on nt t ! !
T Th hu us s u us si in ng g N Ne ew wt to on n s s f fo or rw wa ar rd d d di if ff fe er re en nc ce e f fo or rm mu ul la a, , w we e h ha av ve e

A At t x x= =1 1
Y Y f f f
2
f
2 2 3 3
3 3 7 7 4 4 2 2
4 4 1 13 3 6 6

C Co on nt t ! !
S Si im mi il la ar rl ly y

A At t x x= =2 2
Y Y f f f
2
f
1 1 1 1 1 1 3 3 7 7 1 13 3
2 2 4 4 4 4 6 6 1 10 0 1 16 6
3 3 9 9 9 9 1 11 1 1 15 5 2 21 1
4 4 1 16 6 1 16 6 1 18 8 2 22 2 2 28 8
X X . . Y Y
0 0 1 1 2 2 3 3 4 4
0 0 0 0 0 0 2 2 6 6 1 12 2
1 1 1 1 1 1 3 3 7 7 1 13 3
2 2 4 4 4 4 6 6 1 10 0 1 16 6
3 3 9 9 9 9 1 11 1 1 15 5 2 21 1
4 4 1 16 6 1 16 6 1 18 8 2 22 2 2 28 8
Y f

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 4

2 2 6 6
3 3 1 10 0 4 4 2 2
4 4 1 16 6 6 6

C Co on nt t ! !
S Si im mi il la ar rl ly y

A At t x x= =3 3
Y Y f f f
2
f
2 2 1 11 1
3 3 1 15 5 4 4 2 2
4 4 2 21 1 6 6



0
3.5 2
1.5
1
y y
with p
h

= = =
C Co on nt t ! !

0
3.5 2
1.5
1
y y
with p
h

= = =

2
0 0 0
( 1)
(1, 3.5)
2!
(1.5)(0.5)
3 (1.5)(4) (2) 9.75
2
p p
f f p f f

= + +
= + + =

C Co on nt t ! !

(1.5)(0.5)
(2, 3.5) 6 (1.5)(4) (2) 12.75
2
(1.5)(0.5)
(3, 3.5) 11 (1.5)(4) (2) 17.75
2
f
f
= + + =
= + + =

C Co on nt t ! !
T Th he er re ef fo or re e w we e a ar rr ri iv ve e a at t t th he e f fo ol ll lo ow wi in ng g r re es su ul lt t

A At t x x= =3 3. .5 5
Y Y f f f
2
f
1 1 9 9. .7 75 5
2 2 1 12 2. .7 75 5 3 3 2 2
3 3 1 17 7. .7 75 5 5 5
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 5


C Co on nt t ! !

2.5 1
1.5
1
Now defining p

= =

(1.5)(0.5)
(2.5, 3.5) 9.75 (1.5)(3) (2) 15
2
f = + + =
C Co on nt t ! !

F Fr ro om m t th he e f fu un nc ct ti io on na al l r re el la at ti io on n, , w we e a al ls so o f fi in nd d t th ha at t

2 2
(2.5, 3.5) (2.5) (3.5) 3.5 15 f = + =
And hence no error in interpolation!!!

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 1


D DI IF FF FE ER RE EN NT TI IA AT TI IO ON N U US SI IN NG G D DI IF FF FE ER RE EN NC CE E O OP PE ER RA AT TO OR RS S
I In nt tr ro od du uc ct ti io on n
C Co on ns si id de er r a a f fu un nc ct ti io on n o of f s si in ng gl le e v va ar ri ia ab bl le e y y = = f f ( (x x) ). . I If f t th he e f fu un nc ct ti io on n i is s k kn no ow wn n a an nd d s si im mp pl le e, ,
w we e c ca an n e ea as si il ly y o ob bt ta ai in n i it ts s d de er ri iv va at ti iv ve e ( (s s) ) o or r c ca an n e ev va al lu ua at te e i it ts s d de ef fi in ni it te e i in nt te eg gr ra al l
H Ho ow we ev ve er r, , i if f w we e d do o n no ot t k kn no ow w t th he e f fu un nc ct ti io on n a as s s su uc ch h o or r t th he e f fu un nc ct ti io on n i is s c co om mp pl li ic ca at te ed d a an nd d i is s
g gi iv ve en n i in n a a t ta ab bu ul la ar r f fo or rm m a at t a a s se et t o of f p po oi in nt ts s x x
0 0
, ,x x
1 1
, , , ,x x
n n
, , w we e u us se e o on nl ly y n nu um me er ri ic ca al l m me et th ho od ds s f fo or r
d di if ff fe er re en nt ti ia at ti io on n o or r i in nt te eg gr ra at ti io on n o of f t th he e g gi iv ve en n f fu un nc ct ti io on n. .
W We e s sh ha al ll l d di is sc cu us ss s n nu um me er ri ic ca al l a ap pp pr ro ox xi im ma at ti io on n t to o d de er ri iv va at ti iv ve es s o of f f fu un nc ct ti io on ns s o of f t tw wo o o or r m mo or re e
v va ar ri ia ab bl le es s i in n t th he e l le ec ct tu ur re es s t to o f fo ol ll lo ow w w wh he en n w we e s sh ha al ll l t ta al lk k a ab bo ou ut t p pa ar rt ti ia al l d di if ff fe er re en nt ti ia al l e eq qu ua at ti io on ns s. .
I In n w wh ha at t f fo ol ll lo ow ws s, , w we e s sh ha al ll l d de er ri iv ve e a an nd d i il ll lu us st tr ra at te e v va ar ri io ou us s f fo or rm mu ul la ae e f fo or r n nu um me er ri ic ca al l
d di if ff fe er re en nt ti ia at ti io on n o of f a a f fu un nc ct ti io on n o of f a a s si in ng gl le e v va ar ri ia ab bl le e b ba as se ed d o on n f fi in ni it te e d di if ff fe er re en nc ce e o op pe er ra at to or rs s a an nd d
i in nt te er rp po ol la at ti io on n. .
S Su ub bs se eq qu ue en nt tl ly y, , w we e s sh ha al ll l d de ev ve el lo op p N Ne ew wt to on n- -C Co ot te es s f fo or rm mu ul la ae e a an nd d r re el la at te ed d t tr ra ap pe ez zo oi id da al l r ru ul le e a an nd d
S Si im mp ps so on n s s r ru ul le e f fo or r n nu um me er ri ic ca al l i in nt te eg gr ra at ti io on n o of f a a f fu un nc ct ti io on n. .
W We e a as ss su um me e t th ha at t t th he e f fu un nc ct ti io on n y y = = f f ( (x x) ) i is s g gi iv ve en n f fo or r t th he e v va al lu ue es s o of f t th he e i in nd de ep pe en nd de en nt t v va ar ri ia ab bl le e
x x = = x x
0 0
+ + p ph h, , f fo or r p p = = 0 0, , 1 1, , 2 2, , a an nd d s so o o on n. . T To o f fi in nd d t th he e d de er ri iv va at ti iv ve es s o of f s su uc ch h a a t ta ab bu ul la ar r
f fu un nc ct ti io on n, , w we e p pr ro oc ce ee ed d a as s f fo ol ll lo ow ws s
C Ca as se e I I: :
U Us si in ng g f fo or rw wa ar rd d d di if ff fe er re en nc ce e o op pe er ra at to or r a an nd d c co om mb bi in ni in ng g e eq qu ua at ti io on ns s

( ) ( ) E f x f x h = +
a an nd d
1 E =

log log(1 ) hD E = = +
Remember the Differential operator, D is known to represents the property


2
2 "
2
( ) ( ) ( )
( ) ( ) ( )
d
Df x f x f x
dx
d
D f x f x f x
dx

= =

= =

)

T Th hi is s w wo ou ul ld d m me ea an n t th ha at t i in n t te er rm ms s o of f : :


2 3 4 5
1
2 3 4 5
D
h
| |
= + +
|
\ .
"
Therefore

2 3
0 0
0 0 0
4 5
0 0
0
( ) ( ) 1
( ) ( ) ( )
2 3
( ) ( )
( )
4 5
f x f x
Df x f x f x
h
f x f x d
f x
dx

= = +

(
+ =
(

"

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 2

in other words

2 3 4
0 0 0
0 0 0
1
2 3 4
y y y
Dy y y
h
| |
= = + +
|
\ .
"

A Al ls so o, , w we e c ca an n e ea as si il ly y v ve er ri if fy y

2
2 3 4
2
2
1
2 3 4
D
h
| |
= + +
|
\ .
"

2 3 4 5
2
1 11 5
12 6 h
| |
= + +
|
\ .
"

2 3
2 0 0
2 0
0 0 2 2
4 5
0 0
1
11 5
12 6
y y
d y
D y y
dx h
y y
| |
|
= = =
|
+ +
|
\ .
"

C Ca as se e I II I: :
U Us si in ng g b ba ac ck kw wa ar rd d d di if ff fe er re en nc ce e o op pe er ra at to or r , , w we e h ha av ve e

log(1 ) hD =
O On n e ex xp pa an ns si io on n, , w we e h ha av ve e

2 3 4
1
2 3 4
D
h
| |
= + + +
|
\ .
"

w we e c ca an n a al ls so o v ve er ri if fy y t th ha at t

2
2 3 4
2
2
1
2 3 4
D
h
| |
= + + +
|
\ .
"

2 3 4 5
2
1 11 5

12 6 h
| |
= + + + +
|
\ .
"
Hence

2 3 4
1

2 3 4
n n n
n n n
n
d
y Dy y
dx
y y y
y
h
= =
| |
= + + +
|
\ .
"

and
(
2
2 3 4 5
2
1 11 5
12 6
n n
n n n n
y D y
y y y y
h
=
|
= + + + +
|
.
"

T Th he e f fo or rm mu ul la ae e f fo or r D Dy y
0 0
a an nd d D D
2 2
y y
0 0
a ar re e u us se ef fu ul l t to o c ca al lc cu ul la at te e t th he e f fi ir rs st t a an nd d s se ec co on nd d d de er ri iv va at ti iv ve es s a at t
t th he e b be eg gi in nn ni in ng g o of f t th he e t ta ab bl le e o of f v va al lu ue es s i in n t te er rm ms s o of f f fo or rw wa ar rd d d di if ff fe er re en nc ce es s; ; w wh hi il le e f fo or rm mu ul la ae e f fo or r
y y
n n
a an nd d y y
n n

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 3

T Th he e f fo or rm mu ul la ae e f fo or r D Dy y
0 0
a an nd d D D
2 2
y y
0 0
a ar re e u us se ef fu ul l t to o c ca al lc cu ul la at te e t th he e f fi ir rs st t a an nd d s se ec co on nd d d de er ri iv va at ti iv ve es s a at t
t th he e b be eg gi in nn ni in ng g o of f t th he e t ta ab bl le e o of f v va al lu ue es s i in n t te er rm ms s o of f f fo or rw wa ar rd d d di if ff fe er re en nc ce es s; ; w wh hi il le e f fo or rm mu ul la ae e f fo or r
y y
n n
a an nd d y y
n n

C Ca as se e I II II I: : U Us si in ng g c ce en nt tr ra al l d di if ff fe er re en nc ce e o op pe er ra at to or r a an nd d f fo ol ll lo ow wi in ng g t th he e d de ef fi in ni it ti io on ns s o of f
d di if ff fe er re en nt ti ia al l o op pe er ra at to or r D D, , c ce en nt tr ra al l d di if ff fe er re en nc ce e o op pe er ra at to or r a an nd d t th he e s sh hi if ft t o op pe er ra at to or r E E, , w we e h ha av ve e

1/ 2 1/ 2 / 2 / 2
2sinh
2
hD hD
E E e e
hD


= =
=

Therefore, we have

1
sinh
2 2
hD

=

But,

3 5
1
7
1 1 3
sinh
2 3 2 4 5
1 3 5

2 4 6 7
x x
x x
x


= +


+

"

U Us si in ng g t th he e l la as st t t tw wo o e eq qu ua at ti io on ns s w we e g ge et t


3
5
3
2 2 6 8 40 32
hD

| |
= +
|

\ .
"

T Th ha at t i is s, ,

3 5
1 1 3
24 640
D
h

| |
= +
|
\ .
"
Therefore


3 5
1 1 3

24 640
d
y y Dy
dx
y y y
h

= =
| |
= +
|
\ .
"

Also

2 2 4 6
2
1 1 3
12 90
D
h

| |
= +
|
\ .
"
Hence

2 2 4 6
2
1 1 1
12 90
y D y y y y
h

| |
= = +
|
\ .
"
F Fo or r c ca al lc cu ul la at ti in ng g t th he e s se ec co on nd d
d de er ri iv va at ti iv ve e a at t a an n i in nt te er ri io or r t ta ab bu ul la ar r
p po oi in nt t, , w we e u us se e t th he e e eq qu ua at ti io on n
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 4



2 2 4 6
2
1 1 3
12 90
D
h

| |
= +
|
\ .
"
w wh hi il le e f fo or r c co om mp pu ut ti in ng g t th he e f fi ir rs st td de er ri iv va at ti iv ve e a at t a an n i in nt te er ri io or r t ta ab bu ul la ar r p po oi in nt t, , w we e i in n g ge en ne er ra al l u us se e
a an no ot th he er r c co on nv ve en ni ie en nt t f fo or rm m f fo or r D D, , w wh hi ic ch h i is s d de er ri iv ve ed d a as s f fo ol ll lo ow ws s. . M Mu ul lt ti ip pl ly y t th he e r ri ig gh ht t h ha an nd d
s si id de e o of f

3 5
1 1 3
24 640
d
y y Dy y y y
dx h

| |
= = = +
|
\ .
"
by

2
1 ( 4)

+

w wh hi ic ch h i is s u un ni it ty y a an nd d n no ot ti in ng g t th he e B Bi in no om mi ia al l e ex xp pa an ns si io on n


1 2
2 2
4 6
1 1
1 1
4 8
3 15
128 48 64

| |
+ = +
|
\ .
+

"

we get

2 4
3 5
1 3
1
8 128
1 3
24 640
D
h



| |
= +
|
\ .
| |
+
|
\ .
"
"

O On n s si im mp pl li if fi ic ca at ti io on n, , w we e o ob bt ta ai in n


3 5
1 4
6 120
D
h


| |
= +
|
\ .
"

T Th he er re ef fo or re e t th he e e eq qu ua at ti io on n c ca an n a al ls so o b be e w wr ri it tt te en n i in n a an no ot th he er r u us se ef fu ul l f fo or rm m a as s


3 5
1 1
6 30
y D y y y
h


| |
= = +
|
\ .
"
T Th he e l la as st t t tw wo o e eq qu ua at ti io on ns s f fo or r y y a an nd d y y r re es sp pe ec ct ti iv ve el ly y a ar re e k kn no ow wn n a as s S St ti ir rl li in ng g s s f fo or rm mu ul la ae e f fo or r
c co om mp pu ut ti in ng g t th he e d de er ri iv va at ti iv ve es s o of f a a t ta ab bu ul la ar r f fu un nc ct ti io on n. . S Si im mi il la ar r f fo or rm mu ul la ae e c ca an n b be e d de er ri iv ve ed d f fo or r
c co om mp pu ut ti in ng g h hi ig gh he er r o or rd de er r d de er ri iv va at ti iv ve es s o of f a a t ta ab bu ul la ar r f fu un nc ct ti io on n. .
T Th he e e eq qu ua at ti io on n f fo or r y y c ca an n a al ls so o b be e
w wr ri it tt te en n a as s

2 2 2 2 2 2
3 5 7
1 (1) (2) (1) (2) (3)
3! 5! 7!
y y y y y
h


(
= + +
(

"


I In n o or rd de er r t to o i il ll lu us st tr ra at te e t th he e u us se e o of f f fo or rm mu ul la ae e d de er ri iv ve ed d s so o f fa ar r, , f fo or r c co om mp pu ut ti in ng g t th he e d de er ri iv va at ti iv ve es s o of f a a
t ta ab bu ul la at te ed d f fu un nc ct ti io on n, , w we e s sh ha al ll l c co on ns si id de er r s so om me e e ex xa am mp pl le es s i in n t th he e n ne ex xt t l le ec ct tu ur re e. .

Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 5


Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 1


D DI IF FF FE ER RE EN NT TI IA AT TI IO ON N U US SI IN NG G D DI IF FF FE ER RE EN NC CE E O OP PR RE EA AT TO OR RS S: :
A Ap pp pl li ic ca at ti io on ns s: :
R Re em me em mb be er r U Us si in ng g f fo or rw wa ar rd d d di if ff fe er re en nc ce e o op pe er ra at to or r , , t th he e s sh hi if ft t o op pe er ra at to or r, , t th he e b ba ac ck kw wa ar rd d
d di if ff fe er re en nc ce e o op pe er ra at to or r a an nd d t th he e a av ve er ra ag ge e d di if ff fe er re en nc ce e o op pe er ra at to or r, w we e o ob bt ta ai in ne ed d t th he e f fo ol ll lo ow wi in ng g
f fo or rm mu ul la ae e: :

2 3 4
0 0 0
0 0 0
1
2 3 4
y y y
Dy y y
h
| |
= = + +
|
\ .
"

2 3
2 0 0
2 0
0 0 2 2
4 5
0 0
1
11 5
12 6
y y
d y
D y y
dx h
y y
| |
|
= = =
|
+ +
|
\ .
"


2 3 4
1
2 3 4
n n n
n n n n
y y y d
y Dy y y
dx h
| |
= = = + + +
|
\ .
"

(
2 2 3 4 5
2
1 11 5
12 6
n n n n n n
y D y y y y y
h
|
= = + + + +
|
.
"

2 2 4 6
2
1 1 1
12 90
y D y y y y
h

| |
= = +
|
\ .
"

3 5
1 1 3
24 640
d
y y Dy y y y
dx h

| |
= = = +
|
\ .
"
R Re ec ca al ll l f fr ro om m w wh ha at t w we e m me en nt ti io on ne ed d i in n t th he e l la as st t l le ec ct tu ur re e t th ha at t f fo or r c ca al lc cu ul la at ti in ng g t th he e s se ec co on nd d
d de er ri iv va at ti iv ve e a at t a an n i in nt te er ri io or r t ta ab bu ul la ar r p po oi in nt t, , w we e u us se e t th he e e eq qu ua at ti io on n


2 2 4 6
2
1 1 3
12 90
D
h

| |
= +
|
\ .
"
W Wh hi il le e f fo or r c co om mp pu ut ti in ng g t th he e f fi ir rs st t d de er ri iv va at ti iv ve e a at t a an n i in nt te er ri io or r t ta ab bu ul la ar r p po oi in nt t, , w we e i in n g ge en ne er ra al l u us se e
a an no ot th he er r c co on nv ve en ni ie en nt t f fo or rm m f fo or r D D, , w wh hi ic ch h i is s d de er ri iv ve ed d a as s f fo ol ll lo ow ws s. . M Mu ul lt ti ip pl ly y t th he e r ri ig gh ht t h ha an nd d
s si id de e o of f


3 5
1 1 3
24 640
d
y y Dy y y y
dx h

| |
= = = +
|
\ .
"
By
2
1 ( 4)

+

W Wh hi ic ch h i is s u un ni it ty y a an nd d n no ot ti in ng g t th he e B Bi in no om mi ia al l e ex xp pa an ns si io on n

1 2
2 2 4 6
1 1 3 15
1 1
4 8 128 48 64

| |
+ = + +
|

\ .
"
We get

2 4 3 5
1 3 1 3
1
8 128 24 640
D
h


| || |
= + +
| |
\ .\ .
" "
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 2

S Si im mp pl li if fi ic ca at ti io on n w we e g ge et t

3 5
1 4
6 120
D
h


| |
= +
|
\ .
"
T Th he er re ef fo or re e t th he e e eq qu ua at ti io on n c ca an n a al ls so o b be e w wr ri it tt te en n i in n a an no ot th he er r u us se ef fu ul l f fo or rm m a as s


3 5
1 1
6 30
y D y y y
h


| |
= = +
|
\ .
"
T Th he e l la as st t t tw wo o e eq qu ua at ti io on ns s y y a an nd dy y r re es sp pe ec ct ti iv ve el ly y a ar re e k kn no ow wn n a as s S St ti ir rl li in ng g s s f fo or rm mu ul la ae e f fo or r
c co om mp pu ut ti in ng g t th he e d de er ri iv va at ti iv ve es s o of f a a t ta ab bu ul la ar r f fu un nc ct ti io on n. . S Si im mi il la ar r f fo or rm mu ul la ae e c ca an n b be e d de er ri iv ve ed d f fo or r
c co om mp pu ut ti in ng g h hi ig gh he er r o or rd de er r d de er ri iv va at ti iv ve es s o of f a a t ta ab bu ul la ar r f fu un nc ct ti io on n. .
T Th he e e eq qu ua at ti io on n f fo or r y y c ca an n a al ls so o b be e w wr ri it tt te en n a as s


2 2 2 2 2 2
3 5 7
1 (1) (2) (1) (2) (3)
3! 5! 7!
y y y y y
h


(
= + +
(

"
I In n o or rd de er r t to o i il ll lu us st tr ra at te e t th he e u us se e o of f f fo or rm mu ul la ae e d de er ri iv ve ed d s so o f fa ar r, , f fo or r c co om mp pu ut ti in ng g t th he e
d de er ri iv va at ti iv ve es s o of f a a t ta ab bu ul la at te ed d f fu un nc ct ti io on n, , w we e c co on ns si id de er r t th he e f fo ol ll lo ow wi in ng g e ex xa am mp pl le e : :
E Ex xa am mp pl le e: :
C Co om mp pu ut te e (0) f
a an nd d (0.2) f
f fr ro om m t th he e f fo ol ll lo ow wi in ng g t ta ab bu ul la ar r d da at ta a. .

S So ol lu ut ti io on n
S Si in nc ce e x x = = 0 0 a an nd d 0 0. .2 2 a ap pp pe ea ar r a at t a an nd d n ne ea ar r b be eg gi in nn ni in ng g o of f t th he e t ta ab bl le e, , i it t i is s a ap pp pr ro op pr ri ia at te e t to o u us se e
f fo or rm mu ul la ae e b ba as se ed d o on n f fo or rw wa ar rd d d di if ff fe er re en nc ce es s t to o f fi in nd d t th he e d de er ri iv va at ti iv ve es s. . T Th he e d di if ff fe er re en nc ce e t ta ab bl le e f fo or r t th he e
g gi iv ve en n d da at ta a i is s d de ep pi ic ct te ed d b be el lo ow w: :

x x f f( (x x) ) ( ) f x 2
( ) f x
3
( ) f x
4
( ) f x
5
( ) f x
0 0. .0 0 1 1. .0 00 0
0 0. .2 2 1 1. .1 16 6 0 0. .1 16 6
0 0. .4 4 3 3. .5 56 6 2 2. .4 40 0 2 2. .2 24 4 5 5. .7 76 6
0 0. .6 6 1 13 3. .9 96 6 1 10 0. .4 40 0 8 8. .0 00 0 9 9. .6 60 0 3 3. .8 84 4 0 0. .0 0
0 0. .8 8 4 41 1. .9 96 6 2 28 8. .0 00 0 1 17 7. .6 60 0 1 13 3. .4 44 4 3 3. .8 84 4
1 1. .0 0 1 10 01 1. .0 00 0 5 59 9. .0 04 4 3 31 1. .0 04 4


U Us si in ng g f fo or rw wa ar rd d d di if ff fe er re en nc ce e f fo or rm mu ul la a f fo or r
2
( ), D f x
i i. .e e

x x 0 0. .0 0 0 0. .2 2 0 0. .4 4 0 0. .6 6 0 0. .8 8 1 1. .0 0
F F( (x x) ) 1 1. .0 00 0 1 1. .1 16 6 3 3. .5 56 6 1 13 3. .9 96 6 4 41 1. .9 96 6 1 10 01 1. .0 00 0
( ) f x 2
( ) f x
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 3


2 3
2 4 5
2
( ) ( ) 1 11 5
( ) ( ) ( )
12 6
f x f x
D f x f x f x
h

(
= +


we obtained

2
1 11 5
(0) 2.24 5.76 (3.84) (0) 0.0
(02) 12 6
f
(
= + =
(


A Al ls so o, , u us si in ng g t th he e f fo or rm mu ul la a f fo or r ( ) Df x , , w we e h ha av ve e



2 3 4
1 ( ) ( ) ( )
( ) ( )
2 3 4
f x f x f x
Df x f x
h
(
= +
(



H He en nc ce e, ,

1 8.00 9.60 3.84
(0.2) 2.40 3.2
0.2 2 3 4
f
| |
= + =
|
\ .

E Ex xa am mp pl le e
F Fi in nd d (2.2) y
a an nd d (2.2) y
f fr ro om m t th he e t ta ab bl le e. .
x x 1 1. .4 4 1 1. .6 6 1 1. .8 8 2 2. .0 0 2 2. .2 2
Y Y( (x x) ) 4 4. .0 05 55 52 2 4 4. .9 95 53 30 0 6 6. .0 04 49 96 6 7 7. .3 38 89 91 1 9 9. .0 02 25 50 0
S So ol lu ut ti io on n: :
S Si in nc ce e x x= =2 2. .2 2 o oc cc cu ur rs s a at t t th he e e en nd d o of f t th he e t ta ab bl le e, , i it t i is s a ap pp pr ro op pr ri ia at te e t to o u us se e b ba ac ck kw wa ar rd d d di if ff fe er re en nc ce e
f fo or rm mu ul la ae e f fo or r d de er ri iv va at ti iv ve es s. . T Th he e b ba ac ck kw wa ar rd d d di if ff fe er re en nc ce e t ta ab bl le e f fo or r t th he e g gi iv ve en n d da at ta a i is s s sh ho ow wn n
b be el lo ow w: :
x x f f( (x x) ) y
2
y
3
y
4
y
1 1. .4 4 4 4. .0 05 55 52 2
1 1. .6 6 4 4. .9 95 53 30 0 0 0. .8 89 97 78 8
1 1. .8 8 6 6. .0 04 49 96 6 1 1. .0 09 96 66 6 0 0. .1 19 98 88 8 0 0. .0 04 44 41 1
2 2. .0 0 7 7. .3 38 89 91 1 1 1. .3 33 39 95 5 0 0. .2 24 42 29 9 0 0. .0 05 53 35 5 0 0. .0 00 09 94 4
2 2. .2 2 9 9. .0 02 25 50 0 1 1. .6 63 35 59 9 0 0. .2 29 96 64 4

U Us si in ng g b ba ac ck kw wa ar rd d d di if ff fe er re en nc ce e f fo or rm mu ul la ae e f fo or r ( ) y x
a an nd d ( ), y x
w we e h ha av ve e


2 3 4
1
2 3 4
n n n
n n
y y y
y y
h
| |
= + + +
|
\ .

T Th he er re ef fo or re e, ,
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 4


1 0.2964 0.0535 0.0094
(2.2) 1.6359 5(1.8043) 9.02
0.2 2 3 4
y
| |
= + + + = =
|
\ .

A Al ls so o

2 3 4
2
1 11
12
n n n n
y y y y
h
| |
= + +
|
\ .

T Th he er re ef fo or re e

(
2
1 11
(2.2) 0.2964 0.0535 (0.0094)
(0.2) 12
25(0.3585) 8.9629
y
|
= + +
|
.
= =

E Ex xa am mp pl le e
Given the table of values, estimate,
//
(1.3) y

Solution Since x = 1.3 appear at beginning of the table, it is appropriate to use formulae
based on forward differences to find the derivatives. The difference table for the given
data is depicted below:

H=0.2
Using forward difference formula for
2
( ), D f x
2 2 3 4 5
2
1 11 5
( ) ( ) ( ) ( ) ( )
12 6
D f x f x f x f x f x
h
(
= +
(


We obtain
x 1.3 1.5 1.7 1.9 2.1 2.3
y 2.9648 2.6599 2.3333 1.9922 1.6442 1.2969
x y ( ) f x
2
( ) f x
3
( ) f x
4
( ) f x
5
( ) f x
1.3 2.9648











1.5 2.6599

-0.3049
1.7 2.3333

-0.3266 -0.0217
1.9 1.9922

-0.3411 -0.0145 0.0072
2.1 1.6442

-0.348 -0.0069 0.0076 0.0004
2.3 1.2969 -0.3473 0.0007 0.0076 0 -0.0004
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 5

| |
| |
2
2
2
2
1 11 5
(1.3) -0.0217 0.0072 (0.0004) (-0.0004)
(0.2) 12 6
1
(1.3) -0.0217 0.0072 (0.9167)(0.0004) (0.8334)(-0.0004)
(0.2)
1
(1.3) -0.0217 0.0072 (0.0003667) (0.0003334)
(0.2)
1
(1.3) -0.0
(0.2)
f
f
f
f
(
= +
(

= +
= + +
= | 282] 0.7050 =



C Ca as se e I IV V: : D De er ri iv va at ti io on n o of f T Tw wo o a an nd d t th hr re ee e p po oi in nt t f fo or rm mu ul la ae e: :
R Re et ta ai in ni in ng g o on nl ly y t th he e f fi ir rs st t t te er rm m i in n e eq qu ua at ti io on n: :


2 3 4
0 0 0
0 0 0
1
2 3 4
y y y
Dy y y
h
| |
= = + +
|
\ .
"
w we e c ca an n g ge et t a an no ot th he er r u us se ef fu ul l f fo or rm m f fo or r t th he e f fi ir rs st t d de er ri iv va at ti iv ve e a as s

1
( ) ( )
i i i i i
i
y y y y x h y x
h h h
+
+
= = =
S Si im mi il la ar rl ly y, , b by y r re et ta ai in ni in ng g o on nl ly y t th he e f fi ir rs st t t te er rm m i in n E Eq qn n. .


2 3 4
1
2 3 4
n n n
n n n n
y y y d
y Dy y y
dx h
| |
= = = + + +
|
\ .
"

1
( ) ( )
i i i i i
i
y y y y x y x h
y
h h h


= = =
A Ad dd di in ng g t th he e l la as st t t tw wo o e eq qu ua at ti io on ns s, , w we e h ha av ve e


( ) ( )
2
i i
i
y x h y x h
y
h
+
=
T Th he es se e E Eq qu ua at ti io on ns s c co on ns st ti it tu ut te e t tw wo o- -p po oi in nt t f fo or rm mu ul la ae e f fo or r t th he e f fi ir rs st t d de er ri iv va at ti iv ve e. . B By y r re et ta ai in ni in ng g o on nl ly y
t th he e f fi ir rs st t t te er rm m i in n E Eq qu ua at ti io on n , ,

2 3 4
2 0 0 0
2 0
0 0 2 2
5
0
11
1
12
5
6
y y y
d y
D y y
dx h
y
| |
+
|
= = = |
|
+ +
|
\ .
"

w we e g ge et t, ,

2
2 1
2 2 2
2 ( 2 ) 2 ( ) ( )
i i i i i i i
i
y y y y y x h y x h y x
y
h h h
+ +
+ + + +
= = =
S Si im mi il la ar rl ly y w we e g ge et t

2
2 2
( ) 2 ( ) ( 2 )
i i i i
i
y y x y x h y x h
y
h h
+
= =
W Wh hi il le e r re et ta ai in ni in ng g o on nl ly y t th he e f fi ir rs st t t te er rm m i in n t th he e e ex xp pr re es ss si io on n f fo or r y y i in n t te er rm ms s o of f w we e o ob bt ta ai in n
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 6


2
(1 2) (1 2)
1 1
2 2 2
2
2
( ) 2 ( ) ( )

i i
i i i i
i
i i i
y y
y y y y
y
h h h
y x h y x y x h
h

+
+

+
= = =
+ +
=

T Th he e l la as st t t th hr re ee e e eq qu ua at ti io on ns s c co on ns st ti it tu ut te e t th hr re ee e- -p po oi in nt t f fo or rm mu ul la ae e f fo or r c co om mp pu ut ti in ng g t th he e s se ec co on nd d
d de er ri iv va at ti iv ve e. . W We e s sh ha al ll l s se ee e l la at te er r t th ha at t t th he es se e t tw wo o- - a an nd d t th hr re ee e- -p po oi in nt t f fo or rm mu ul la ae e b be ec co om me e h ha an nd dy y f fo or r
d de ev ve el lo op pi in ng g e ex xt tr ra ap po ol la at ti io on n m me et th ho od ds s t to o n nu um me er ri ic ca al l d di if ff fe er re en nt ti ia at ti io on n a an nd d i in nt te eg gr ra at ti io on n. .


Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 1

E Ex xa am mp pl le e 1 1; ;
W Wr ri it te e f fi ir rs st t d de er ri iv va at ti iv ve e o of f f f ( (x x) ) a at t x x = = 0 0. .1 1, , 0 0. .2 2, , 0 0. .3 3
w wh he er re e f f ( (x x) ) i is s g gi iv ve en n b by y

X X 0 0. .1 1 0 0. .2 2 0 0. .3 3 0 0. .4 4 0 0. .5 5 0 0. .6 6
F F( (x x) ) 0 0. .4 42 25 5 0 0. .4 47 75 5 0 0. .4 40 00 0 0 0. .4 45 52 2 0 0. .5 52 25 5 0 0. .5 57 75 5
s so ol lu ut ti io on n; ;
U Us si in ng g t th he e t tw wo o p po oi in nt t e eq qu ua at ti io on n w we e h ha av ve e


(0.2) (0.1) 0.475 0.425 0.050
(0.1) 0.5.
0.1 0.1
f f
f
h

= = = =

(0.3) (0.2) 0.400 0.475 0.075
(0.2) 0.75.
0.1 0.1
f f
f
h

= = = =

(0.4) (0.3) 0.450 0.400 0.05
(0.3) 0.5.
0.1 0.1
f f
f
h

= = = =
E Ex xa am mp pl le e 2 2: :
F Fi in nd d t th he e 2 2
n nd d
d de er ri iv va at ti iv ve e a at t 0 0. .3 3, , 0 0. .4 4, , 0 0. .5 5 f fo or r t th he e f fu un nc ct ti io on n g gi iv ve en n i in n t th he e
e ex xa am mp pl le e a ab bo ov ve e. .
S So ol lu ut ti io on n; ;

2
(0.4) 2 (0.3) (0.2) 0.125
(0.3) 12.5
0.01 0.01
f f f
f
h
+
= = =
=


2
(0.5) 2 (0.4) (0.3) 0.025
(0.4) 2.5
0.01 0.01
f f f
f
h
+
= = =
=


(0.6) 2 (0.5) (0.4) 0.075
(0.5) 7.5
0.01 0.01
f f f
f
+
= = =
D DI IF FF FE ER RE EN NT TI IA AT TI IO ON N U US SI IN NG G I IN NT TE ER RP PO OL LA AT TI IO ON N
I If f t th he e g gi iv ve en n t ta ab bu ul la ar r f fu un nc ct ti io on n y y( (x x) ) i is s r re ea as so on na ab bl ly y w we el ll l a ap pp pr ro ox xi im ma at te ed d b by y a a p po ol ly yn no om mi ia al l P P
n n
( (x x) )
o of f d de eg gr re ee e n n, , i it t i is s h ho op pe ed d t th ha at t t th he e r re es su ul lt t o of f ( )
n
P x
w wi il ll l a al ls so o s sa at ti is sf fa ac ct to or ri il ly y a ap pp pr ro ox xi im ma at te e t th he e
c co or rr re es sp po on nd di in ng g d de er ri iv va at ti iv ve e o of f y y( (x x) ). .
However, even if P
n
(x) and y(x) coincide at the tabular points, their derivatives or slopes
may substantially differ at these points as is illustrated in the Figure below:










Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 2





F Fo or r h hi ig gh he er r o or rd de er r d de er ri iv va at ti iv ve es s, , t th he e d de ev vi ia at ti io on ns s m ma ay y b be e s st ti il ll l w wo or rs st t. . H Ho ow we ev ve er r, , w we e c ca an n e es st ti im ma at te e
t th he e e er rr ro or r i in nv vo ol lv ve ed d i in n s su uc ch h a an n a ap pp pr ro ox xi im ma at ti io on n. .
F Fo or r n no on n- -e eq qu ui id di is st ta an nt t t ta ab bu ul la ar r p pa ai ir rs s ( (x x
i i
, , y y
i i
) ), , i i = = 0 0, , , , n n w we e c ca an n f fi it t t th he e d da at ta a b by y u us si in ng g e ei it th he er r
L La ag gr ra an ng ge e s s i in nt te er rp po ol la at ti in ng g p po ol ly yn no om mi ia al l o or r b by y u us si in ng g N Ne ew wt to on n s s d di iv vi id de ed d d di if ff fe er re en nc ce e
i in nt te er rp po ol la at ti in ng g p po ol ly yn no om mi ia al l. . I In n v vi ie ew w o of f e ec co on no om my y o of f c co om mp pu ut ta at ti io on n, , w we e p pr re ef fe er r t th he e u us se e o of f t th he e
l la at tt te er r p po ol ly yn no om mi ia al l. .
T Th hu us s, , r re ec ca al ll li in ng g t th he e N Ne ew wt to on n s s d di iv vi id de ed d d di if ff fe er re en nc ce e i in nt te er rp po ol la at ti in ng g p po ol ly yn no om mi ia al l f fo or r f fi it tt ti in ng g t th hi is s
d da at ta a a as s


0 0 0 1 0 1 0 1 2
1
0 1
0
( ) [ ] ( ) [ , ] ( )( ) [ , , ]
( ) [ , ,..., ]
n
n
i n
i
P x y x x x y x x x x x x y x x x
x x y x x x

=
= + +
+ +



A As ss su um mi in ng g t th ha at t P P
n n
( (x x) ) i is s a a g go oo od d a ap pp pr ro ox xi im ma at ti io on n t to o y y( (x x) ), , t th he e p po ol ly yn no om mi ia al l a ap pp pr ro ox xi im ma at ti io on n t to o
c ca an n b be e ( ) y x
o ob bt ta ai in ne ed d b by y d di if ff fe er re en nt ti ia at ti in ng g P P
n n
( (x x) ). . U Us si in ng g p pr ro od du uc ct t r ru ul le e o of f d di if ff fe er re en nt ti ia at ti io on n, ,
t th he e d de er ri iv va at ti iv ve e o of f t th he e p pr ro od du uc ct ts s i in n P P
n n
( (x x) ) c ca an n b be e s se ee en n a as s f fo ol ll lo ow ws s: :
Y Y( (x x) )
X X
i i
X X
O O
D De ev vi ia at ti io on n o of f d de er ri iv va at ti iv ve es s
P P
n n
( (x x) )
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 3



1 1
0 1
0 0
( )( ) ( )
( )
n n
n
i
i i i
x x x x x x d
x x
dx x x

= =

=





T Th hu us s, , ( ) y x
i is s a ap pp pr ro ox xi im ma at te ed d b by y ( )
n
P x
w wh hi ic ch h i is s g gi iv ve en n b by y

0 1 1 0 0 1 2
( ) [ , ] [( ) ( )] [ , , ]
n
P x y x x x x x x y x x x = + + + +

1
0 1 1
0
0 1
( )( ) ( )
[ , , , ]
n
n
i
i
n
x x x x x x
x x
y x x x
=


T Th he e e er rr ro or r e es st ti im ma at te e i in n t th hi is s a ap pp pr ro ox xi im ma at ti io on n c ca an n b be e s se ee en n f fr ro om m t th he e f fo ol ll lo ow wi in ng g. .

W We e h ha av ve e s se ee en n t th ha at t i if f y y( (x x) ) i is s a ap pp pr ro ox xi im ma at te ed d b by y P P
n n
( (x x) ), , t th he e e er rr ro or r e es st ti im ma at te e i is s s sh ho ow wn n t to o b be e

( 1)
( )
( ) ( ) ( ) ( )
( 1)!
n
n n
x
E x y x P x y
n

+

= =
+

I It ts s d de er ri iv va at ti iv ve e w wi it th h r re es sp pe ec ct t t to o x x c ca an n b be e w wr ri it tt te en n a as s


( 1) ( 1)
( ) ( )
( ) ( ) ( ) ( ) ( )
( 1)! ( 1)!
n n
n n
x x d
E x y x P x y y
n n dx

+ +

= = +
+ +

I It ts s d de er ri iv va at ti iv ve e w wi it th h r re es sp pe ec ct t t to o x x c ca an n b be e w wr ri it tt te en n a as s

( 1) ( 1)
( ) ( )
( ) ( ) ( ) ( ) ( )
( 1)! ( 1)!
n n
n n
x x d
E x y x P x y y
n n dx

+ +

= = +
+ +

S Si in nc ce e ( (x x) ) d de ep pe en nd ds s o on n x x i in n a an n u un nk kn no ow wn n w wa ay y t th he e d de er ri iv va at ti iv ve e


( 1)
( )
n
d
y
dx

+

c ca an nn no ot t b be e e ev va al lu ua at te ed d. . H Ho ow we ev ve er r, , f fo or r a an ny y o of f t th he e t ta ab bu ul la ar r p po oi in nt ts s x x = = x x
i i
, , ( (x x) ) v va an ni is sh he es s a an nd d
t th he e d di if ff fi ic cu ul lt t t te er rm m d dr ro op ps s o ou ut t. . T Th hu us s, , t th he e e er rr ro or r t te er rm m i in n t th he e l la as st t e eq qu ua at ti io on n a at t t th he e t ta ab bu ul la ar r p po oi in nt t
x x = = x x
i i
s si im mp pl li if fi ie es s t to o

( 1)
( )
( ) Error ( )
( 1)!
n
n i i
y
E x x
n

+
= =
+

f fo or r s so om me e i in n t th he e i in nt te er rv va al l I I d de ef fi in ne ed d b by y t th he e s sm ma al ll le es st t a an nd d l la ar rg ge es st t o of f x x, , x x
0 0
, , x x
1 1
, , , , x x
n n
a an nd d

0
0
1
( ) ( ) ( ) ( )
n
i i i n i j
j
j
x x x x x x x
=

= =



T Th he e e er rr ro or r i in n t th he e r r- -t th h d de er ri iv va at ti iv ve e a at t t th he e t ta ab bu ul la ar r p po oi in nt ts s c ca an n i in nd de ee ed d b be e e ex xp pr re es ss se ed d a an na al lo og go ou us sl ly y. .

T To o u un nd de er rs st ta an nd d t th hi is s m me et th ho od d b be et tt te er r, , w we e c co on ns si id de er r t th he e f fo ol ll lo ow wi in ng g e ex xa am mp pl le e. .
E Ex xa am mp pl le e
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 4

F Fi in nd d (0.25) f
a an nd d (0.22) f
f fr ro om m t th he e f fo ol ll lo ow wi in ng g d da at ta a u us si in ng g t th he e m me et th ho od d b ba as se ed d o on n d di iv vi id de ed d
d di if ff fe er re en nc ce es s: :

X X 0 0. .1 15 5 0 0. .2 21 1 0 0. .2 23 3
Y Y= =f f( (x x) ) 0 0. .1 17 76 61 1 0 0. .3 32 22 22 2 0 0. .3 36 61 17 7

X X 0 0. .2 27 7 0 0. .3 32 2 0 0. .3 35 5
Y Y= =f f( (x x) ) 0 0. .4 43 31 14 4 0 0. .5 50 05 51 1 0 0. .5 54 44 41 1
S So ol lu ut ti io on n W We e f fi ir rs st t c co on ns st tr ru uc ct t d di iv vi id de ed d d di if ff fe er re en nc ce e t ta ab bl le e f fo or r t th he e g gi iv ve en n d da at ta a a as s s sh ho ow wn n
b be el lo ow w: :
X Y 1
st
D.D 2
nd
D.D 3
rd
D.D
0.15 0.1761
0.21 0.3222 2.4350 -5.700
0.23 0.3617 1.9750 -3.8750 15.6250
0.27 0.4314 1.7425 -2.9833 8.1064
0.32 0.5051 1.4740 -2.1750 6.7358
0.35 0.5441 1.3000

U Us si in ng g d di iv vi id de ed d d di if ff fe er re en nc ce e f fo or rm mu ul la a


1
0 1 1
0
0 1
( )( ) ( )
[ , , , ]
n
n
i
i
n
x x x x x x
x x
y x x x
=


f fr ro om m a a q qu ua ad dr ra at ti ic c p po ol ly yn no om mi ia al l, , w we e h ha av ve e

3 0 1 1 0 0 1 2
( ) ( ) [ , ] {( ) ( )} [ , , ] y x P x y x x x x x x y x x x = = + +

1 2 0 2 0 1 0 1 2 3
{( )( ) ( )( ) ( )( )} [ , , , ] x x x x x x x x x x x x y x x x x + + +
T Th hu us s, , u us si in ng g f fi ir rs st t, , s se ec co on nd d a an nd d t th hi ir rd d d di if ff fe er re en nc ce es s f fr ro om m t th he e t ta ab bl le e, , t th he e a ab bo ov ve e e eq qu ua at ti io on n y yi ie el ld ds s

(0.25) 2.4350 [(0.25 0.21) (0.25 0.15)]( 5.75) y = + +

[(0.25 0.21)(0.25 0.23) (0.25 0.15)(0.25 0.23)
(0.25 0.15)(0.25 0.21)](15.625)
+ +
+

T Th he er re ef fo or re e

(0.25) 2.4350 0.805 0.10625
1.7363
f = +
=

S Si im mi il la ar rl ly y w we e c ca an n s sh ho ow w t th ha at t
(0.22) 1.9734 f =
E Ex xa am mp pl le e
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 5

The following divided difference table is for y=1/x.use it to find
/
(0.75) y from a
quadratic polynomial
Fit.
Solution:
Using divided difference formula
1
0 1 1
0
0 1
( )( ) ( )
[ , , , ]
n
n
i
i
n
x x x x x x
x x
y x x x
=


If we find the values for quadratic fit then we use the following formula,
3
0 1 1 0 0 1 2
1 2 0 2 0 1 0 1 2 3
( ) ( )
[ , ] {( ) ( )} [ , , ]
{( )( ) ( )( ) ( )( )} [ , , , ]
y x P x
y x x x x x x y x x x
x x x x x x x x x x x x y x x x x
=
= + +
+ + +

Thus, using first, second, third differences from the table, we get



( )
3
3
( ) ( ) -8.0000 {( .50) ( .25)}10.6664
{( .50)( .75) ( 0.25)( 0.75) ( 0.25)( 0.50)} -14.2219
7.5
(0.75) (0.75) -8.0000 {(0.75 .50) (0.75 .25)}10.6664
{(0.75 .50)(0.75 .75) (0.7
y x P x x x
x x x x x x
Put x
y P
= = + +
+ + +
=
= = + +
+ +
( )
( )
( )
3
3
5 0.25)(0.75 0.75) (0.75 0.25)(0.75 0.50)} -14.2219
(0.75) (0.75) -8.0000 {(0.25) (0.50)}10.6664
{(0.25)(0) (0.50)(0) (0.50)(0.25)} -14.2219
(0.75) (0.75) -8.0000 {0.75}10.6664+{0.125} -14.2219
y P
y P
+
= = + +
+ + +
= = +
3
3
(0.75) (0.75) -8.0000 7.9998 1.7777375
(0.75) (0.75) 1.7779
y P
y P
= = +
= =


x Y=1/x 1
st divided

difference
2
nd

divided

difference
3
rd

divided

difference
.25 4.0000 -8.0000
.50 2.0000 -2.6668 10.6664
.75 1.3333 -1.3332 2.6672 -14.2219
1.00 1.0000 -.8000 1.0664 -2.1344
1.25 .8000 -.5332 0.5336 -0.7104
1.50 .6667
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 6


Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 1


R RI IC CH HA AR RD DS SO ON N S S E EX XT TR RA AP PO OL LA AT TI IO ON N M ME ET TH HO OD D
To improve the accuracy of the derivative of a function, which is computed by starting
with an arbitrarily selected value of h, Richardsons extrapolation method is often
employed in practice, in the following manner:
S Su up pp po os se e w we e u us se e t tw wo o- -p po oi in nt t f fo or rm mu ul la a t to o c co om mp pu ut te e t th he e d de er ri iv va at ti iv ve e o of f a a f fu un nc ct ti io on n, , t th he en n w we e h ha av ve e

( ) ( )
( )
2
( )
T
T
y x h y x h
y x E
h
F h E
+
= +
= +

W Wh he er re e E E
T T
i is s t th he e t tr ru un nc ca at ti io on n e er rr ro or r. . U Us si in ng g T Ta ay yl lo or r s s s se er ri ie es s e ex xp pa an ns si io on n, , w we e c ca an n s se ee e t th ha at t

2 4 6
1 2 3 T
E c h c h c h = + + +
T Th he e i id de ea a o of f R Ri ic ch ha ar rd ds so on n s s e ex xt tr ra ap po ol la at ti io on n i is s t to o c co om mb bi in ne e t tw wo o c co om mp pu ut te ed d v va al lu ue es s o of f ( ) y x

u us si in ng g t th he e s sa am me e m me et th ho od d b bu ut t w wi it th h t tw wo o d di if ff fe er re en nt t s st te ep p s si iz ze es s u us su ua al ll ly y h h a an nd d h h/ /2 2 t to o y yi ie el ld d a a
h hi ig gh he er r o or rd de er r m me et th ho od d. . T Th hu us s, , w we e h ha av ve e

2 4
1 2
( ) ( ) y x F h c h c h = + + +
And

2 4
1 2
( )
2 4 16
h h h
y x F c c

= + + +



H He er re e, , c c
i i
a ar re e c co on ns st ta an nt ts s, , i in nd de ep pe en nd de en nt t o of f h h, , a an nd d F F( (h h) ) a an nd d F F( (h h/ /2 2) ) r re ep pr re es se en nt t a ap pp pr ro ox xi im ma at te e
v va al lu ue es s o of f d de er ri iv va at ti iv ve es s. . E El li im mi in na at ti in ng g c c
1 1
f fr ro om m t th he e a ab bo ov ve e p pa ai ir r o of f e eq qu ua at ti io on ns s, , w we e g ge et t

4 6
1
4 ( )
2
( ) ( )
3
h
F F h
y x d h O h




= + +
N No ow w a as ss su um mi in ng g t th ha at t

1
4 ( )
2
2 3
h
F F h
h
F





=



E Eq qu ua at ti io on n f fo or r y y ( (x x) ) a ab bo ov ve e r re ed du uc ce es s t to o

4 6
1 1
( ) ( )
2
h
y x F d h O h

= + +



T Th hu us s, , w we e h ha av ve e o ob bt ta ai in ne ed d a a f fo ou ur rt th h- -o or rd de er r a ac cc cu ur ra at te e d di if ff fe er re en nt ti ia at ti io on n f fo or rm mu ul la a b by y c co om mb bi in ni in ng g t tw wo o
r re es su ul lt ts s w wh hi ic ch h a ar re e o of f s se ec co on nd d- -o or rd de er r a ac cc cu ur ra at te e. . N No ow w, , r re ep pe ea at ti in ng g t th he e a ab bo ov ve e a ar rg gu um me en nt t, , w we e h ha av ve e

4 6
1 1
( ) ( )
2
h
y x F d h O h

= + +




4
6 1
1
( ) ( )
4 16
d h h
y x F O h

= + +



E El li im mi in na at ti in ng g d d
1 1
f fr ro om m t th he e a ab bo ov ve e p pa ai ir r o of f e eq qu ua at ti io on ns s, , w we e g ge et t a a b be et tt te er r a ap pp pr ro ox xi im ma at ti io on n a as s

6
2
( ) ( )
4
h
y x F O h

= +



Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 2

W Wh hi ic ch h i is s o of f s si ix xt th h- -o or rd de er r a ac cc cu ur ra at te e, , w wh he er re e

2
1 1 2
2 2
4
2 2
4 4 1
h h
F F
h
F




=




This extrapolation process can be repeated further until the required accuracy is achieved,
which is called an extrapolation to the limit. Therefore the equation for F
2
above can be
generalized as

1 1 1
4
2 2
,
2 4 1
1, 2, 3,
m
m m m m
m m m
h h
F F
h
F
m




=



=


W Wh he er re e F F
0 0
( (h h) ) = = F F( (h h) ). .
T To o i il ll lu us st tr ra at te e t th hi is s p pr ro oc ce ed du ur re e, , w we e c co on ns si id de er r t th he e f fo ol ll lo ow wi in ng g e ex xa am mp pl le e. .

E Ex xa am mp pl le e: : U Us si in ng g t th he e R Ri ic ch ha ar rd ds so on n s s e ex xt tr ra ap po ol la at ti io on n l li im mi it t, , f fi in nd d y y ( (0 0. .0 05 5) ) t to o t th he e f fu un nc ct ti io on n
y y = = - -1 1/ /x x, , w wi it th h h h = = 0 0. .0 01 12 28 8, , 0 0. .0 00 06 64 4, , 0 0. .0 00 03 32 2. .
S So ol lu ut ti io on n
T To o s st ta ar rt t w wi it th h, , w we e t ta ak ke e, , h h = = 0 0. .0 01 12 28 8, , t th he en n c co om mp pu ut te e F F ( (h h) ) a as s


1 1
( ) ( )
0.05 0.0128 0.05 0.0128
( )
2 2(0.0128)
y x h y x h
F h
h
+
+
+
= =

15.923566 26.88172
0.0256
428.05289
+
=
=

S Si im mi il la ar rl ly y, , F F( (h h/ /2 2) ) = = 4 40 06 6. .6 66 62 27 73 3. . T Th he er re ef fo or re e, , u us si in ng g E Eq q. . ( (7 7. .3 30 0) ), , w we e g ge et t


1
4
2 2
399.5327
2 4 1
h h
F F
h




= =




W Wh hi ic ch h i is s a ac cc cu ur ra at te e t to o O O( (h h
4 4
) ). . H Ha al lv vi in ng g t th he e s st te ep p s si iz ze e f fu ur rt th he er r, , w we e c co om mp pu ut te e

2
1 1
0.05 0.0032 0.05 0.0032
2 2(0.0032)
401.64515
h
F
+

+
=


=

And
Numerical Analysis MTH603 VU

Copyright Virtual University of Pakistan 3


2
1 2
4
2 2
2 4 1
399.97263
h h
F F
h
F




=



=

A Ag ga ai in n, , u us si in ng g E Eq q. . , , w we e o ob bt ta ai in n

2
1 1 2
2 2 2
4
2 2
2 4 1
400.00195
h h
F F
h
F




=



=

T Th he e a ab bo ov ve e c co om mp pu ut ta at ti io on n c ca an n b be e s su um mm ma ar ri iz ze ed d i in n t th he e f fo ol ll lo ow wi in ng g t ta ab bl le e: :

h h F F F F1 1 F F2 2
0 0. .0 01 12 28 8 4 42 28 8. .0 05 52 29 9
0 0. .0 00 00 06 64 4 4 40 06 6. .6 66 62 27 7 3 39 99 9. .5 53 32 27 7 4 40 00 0. .0 00 01 19 95 5
0.0032 401.6452 3 39 99 9. .9 97 72 26 6

T Th hu us s, , a af ft te er r t tw wo o s st te ep ps s, , i it t i is s f fo ou un nd d t th ha at t (0.05) 400.00915 y = w wh hi il le e t th he e e ex xa ac ct t v va al lu ue e i is s


2
0.05
1 1
(0.05) = 400
0.0025
x
y
x
=

= =

You might also like