Docsity

Interpolation Newtons Forward Difference Formula-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Numerical Analysis –MTH603 VU
© Copyright Virtual University of Pakistan 1
Interpolation Newton’s Forward Difference Formula
L
Le
et
t
y
y
=
=
f
f
(
(x
x)
)
b
be
e
a
a
f
fu
un
nc
ct
ti
io
on
n
w
wh
hi
ic
ch
h
t
ta
ak
ke
es
s
v
va
al
lu
ue
es
s
f
f(
(x
x0
0)
),
,
f
f(
(x
x0
0+
+
h
h)
),
,
f
f(
(x
x0
0+
+2
2h
h)
),
,
…
…,
,
c
co
or
rr
re
es
sp
po
on
nd
di
in
ng
g
t
to
o
v
va
ar
ri
io
ou
us
s
e
eq
qu
ui
i-
-s
sp
pa
ac
ce
ed
d
v
va
al
lu
ue
es
s
o
of
f
x
x
w
wi
it
th
h
s
sp
pa
ac
ci
in
ng
g
h
h,
,
s
sa
ay
y
x
x0
0,
,
x
x0
0
+
+
h
h,
,
x
x0
0
+
+
2
2h
h,
,
…
…
.
.
S
Su
up
pp
po
os
se
e,
,
w
we
e
w
wi
is
sh
h
t
to
o
e
ev
va
al
lu
ua
at
te
e
t
th
he
e
f
fu
un
nc
ct
ti
io
on
n
f
f
(
(x
x)
)
f
fo
or
r
a
a
v
va
al
lu
ue
e
x
x0
0
+
+
p
ph
h,
,
w
wh
he
er
re
e
p
p
i
is
s
a
an
ny
y
r
re
ea
al
l
n
nu
um
mb
be
er
r,
,
t
th
he
en
n
f
fo
or
r
a
an
ny
y
r
re
ea
al
l
n
nu
um
mb
be
er
r
p
p,
,
w
we
e
h
ha
av
ve
e
t
th
he
e
o
op
pe
er
ra
at
to
or
r
E
E
s
su
uc
ch
h
t
th
ha
at
t
( ) ( ).
p
Efx fx ph=+
000
()()(1)()
pp
f
x ph Efx fx+= =+∆
23
0
(1) (1)( 2)
1()
2! 3!
pp pp p
p
fx
−−−

=+∆+ ∆+ ∆+


"
000
23
00
0
()()()
(1) (1)( 2)
() ()
2! 3!
(1)( 1) ()Error
!
n
fx ph fx pfx
pp pp p
f
xfx
pp p n fx
n
+= +∆
−−−
+∆+ ∆
−−+
++ ∆ +
"
"
T
Th
hi
is
s
i
is
s
k
kn
no
ow
wn
n
a
as
s
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
f
fo
or
r
i
in
nt
te
er
rp
po
ol
la
at
ti
io
on
n,
,
w
wh
hi
ic
ch
h
g
gi
iv
ve
es
s
t
th
he
e
v
va
al
lu
ue
e
o
of
f
f
f(
(x
x0
0
+
+
p
ph
h)
)
i
in
n
t
te
er
rm
ms
s
o
of
f
f
f(
(x
x0
0)
)
a
an
nd
d
i
it
ts
s
l
le
ea
ad
di
in
ng
g
d
di
if
ff
fe
er
re
en
nc
ce
es
s.
.
T
Th
hi
is
s
f
fo
or
rm
mu
ul
la
a
i
is
s
a
al
ls
so
o
k
kn
no
ow
wn
n
a
as
s
N
Ne
ew
wt
to
on
n-
-G
Gr
re
eg
go
or
ry
y
f
fo
or
rw
wa
ar
rd
d
d
di
if
ff
fe
er
re
en
nc
ce
e
i
in
nt
te
er
rp
po
ol
la
at
ti
io
on
n
f
fo
or
rm
mu
ul
la
a.
.
H
He
er
re
e
p
p=
=(
(x
x-
-x
x0
0)
)/
/h
h.
.
A
An
n
a
al
lt
te
er
rn
na
at
te
e
e
ex
xp
pr
re
es
ss
si
io
on
n
i
is
s
23
00 0 0
0
(1) (1)( 2)
2! 3!
(1)( 1) Error
!
x
n
pp pp p
yypy y y
pp p n y
n
−
−−
=+∆+ ∆ + ∆ +
−−+
+∆+
"
I
If
f
w
we
e
r
re
et
ta
ai
in
n
(
(r
r
+
+
1
1)
)
t
te
er
rm
ms
s,
,
w
we
e
o
ob
bt
ta
ai
in
n
a
a
p
po
ol
ly
yn
no
om
mi
ia
al
l
o
of
f
d
de
eg
gr
re
ee
e
r
r
a
ag
gr
re
ee
ei
in
ng
g
w
wi
it
th
h
y
yx
x
a
at
t
x
x0
0,
,
x
x1
1,
,
…
…,
,
x
xr
r.
.
T
Th
hi
is
s
f
fo
or
rm
mu
ul
la
a
i
is
s
m
ma
ai
in
nl
ly
y
u
us
se
ed
d
f
fo
or
r
i
in
nt
te
er
rp
po
ol
la
at
ti
in
ng
g
t
th
he
e
v
va
al
lu
ue
es
s
o
of
f
y
y
n
ne
ea
ar
r
t
th
he
e
b
be
eg
gi
in
nn
ni
in
ng
g
o
of
f
a
a
s
se
et
t
o
of
f
t
ta
ab
bu
ul
la
ar
r
v
va
al
lu
ue
es
s
a
an
nd
d
f
fo
or
r
e
ex
xt
tr
ra
ap
po
ol
la
at
ti
in
ng
g
v
va
al
lu
ue
es
s
o
of
f
y
y,
,
a
a
s
sh
ho
or
rt
t
d
di
is
st
ta
an
nc
ce
e
b
ba
ac
ck
kw
wa
ar
rd
d
f
fr
ro
om
m
y
y0
0
E
Ex
xa
am
mp
pl
le
e:
:
E
Ev
va
al
lu
ua
at
te
e
f
f
(
(1
15
5)
),
,
g
gi
iv
ve
en
n
t
th
he
e
f
fo
ol
ll
lo
ow
wi
in
ng
g
t
ta
ab
bl
le
e
o
of
f
v
va
al
lu
ue
es
s:
:
S
So
ol
lu
ut
ti
io
on
n:
:
T
Th
he
e
f
fo
or
rw
wa
ar
rd
d
d
di
if
ff
fe
er
re
en
nc
ce
es
s
a
ar
re
e
t
ta
ab
bu
ul
la
at
te
ed
d
a
as
s
docsity.com
pf3
pf4
pf5
Discount

On special offer

Partial preview of the text

Download Interpolation Newtons Forward Difference Formula-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Interpolation Newton’s Forward Difference Formula

LLeett^ yy^ ==^ ff^ (( xx )) bbee aa ffuunnccttiioonn wwhhiicchh ttaakkeess vvaalluueess^ ff (( xx 00

)),,^ ff (( xx (^00)

++ hh ),), ff (( xx 00

++2^2 hh )),, ……,, ccoorrrreessppoonnddiinngg

ttoo vvaarriioouuss eeqquuii--ssppaacceedd vvaalluueess ooff^ xx^ wwiitthh ssppaacciinngg^ hh ,, ssaayy^ xx (^00)

,, xx 00

++^ hh ,,^ xx 00

++ 2^2 hh , …,… ..

SSuuppppoossee,, wwee wwiisshh ttoo eevvaalluuaattee tthhee ffuunnccttiioonn ff (( xx )) ffoorr aa vvaalluuee xx 00

++ phph , w,whheerree pp iiss aannyy rreeaall

nnuummbbeerr,, tthheenn ffoorr aannyy rreeaall nnuummbbeerr pp , w,wee hhaavvee tthhee ooppeerraattoorr EE ssuucchh tthhaatt

p E f x = f x + ph

p p f x + ph = E f x = + ∆ f x

2 3 0

p p p p p p f x

 −^ −^ − 

0 0 0

2 3 0 0

0

( ) Error !

n

f x ph f x p f x

p p p p p f x f x

p p p n f x n

TThhiiss iiss kknnoowwnn aass NNeewwttoonn’’ss ffoorrwwaarrdd ddiiffffeerreennccee ffoorrmmuullaa ffoorr iinntteerrppoollaattiioonn,, wwhhiicchh ggiivveess tthhee

vvaalluuee ooff^ ff (( xx 00

++^ phph ) i)inn tteerrmmss ooff^ ff (( xx 00

) a)anndd iittss lleeaaddiinngg ddiiffffeerreenncceess..

TThhiiss ffoorrmmuullaa iiss aallssoo kknnoowwnn aass NNeewwttoonn--GGrreeggoorryy ffoorrwwaarrdd ddiiffffeerreennccee iinntteerrppoollaattiioonn ffoorrmmuullaa..

HHeerree pp==((xx--xx 00

)/)/hh..

AAnn aalltteerrnnaattee eexxpprreessssiioonn iiss

2 3 0 0 0 0

0

Error !

x

n

p p p p p y y p y y y

p p p n y n

IIff wwee rreettaaiinn (( rr^ ++ 11)) tteerrmmss,, wwee oobbttaaiinn aa ppoollyynnoommiiaall ooff ddeeggrreeee^ rr^ agagrreeeeiinngg wwiitthh yy xx

aatt

xx 0, 0 , xx 1 1,, ……,, xx rr..

TThhiiss ffoorrmmuullaa iiss mmaaiinnllyy uusseedd ffoorr iinntteerrppoollaattiinngg tthhee vvaalluueess ooff yy nneeaarr tthhee bbeeggiinnnniinngg ooff aa sseett ooff

ttaabbuullaarr vvaalluueess aanndd ffoorr eexxttrraappoollaattiinngg vvaalluueess ooff^ yy ,, aa sshhoorrtt ddiissttaannccee bbaacckkwwaarrdd ffrroomm yy 00

Ex Exaammppllee::

EEvvaalluuaattee ff (1( 15 5)),, ggiivveenn tthhee ffoolllloowwiinngg ttaabbllee ooff vvaalluueess::

So Solluuttiioonn::

TThhee ffoorrwwaarrdd ddiiffffeerreenncceess aarree ttaabbuullaatteedd aass

WWee hhaavvee NNeewwttoonn’’ss ffoorrwwaarrdd ddiiffffeerreennccee iinntteerrppoollaattiioonn ffoorrmmuullaa

2 3 0 0 0 0

0

Error !

x

n

p p p p p y y p y y y

p p p n y n

HHeerree wwee hhaavvee

0 0 0

2 3 4 0 0 0

x y y

y y y

LLeett^ yy 1515

bebe tthhee vvaalluuee ooff yy (^) wwhheenn (^) xx (^) == 1 15 5,, tthheenn

x x p h

15

f y

ff (1( 15 5)) == 5 56 6..8 866772 2 ccoorrrreecctt ttoo ffoouurr ddeecciimmaall ppllaacceess..

ExExaammppllee

FFiinndd NNeewwttoonn’’ss ffoorrwwaarrdd ddiiffffeerreennccee,, iinntteerrppoollaattiinngg ppoollyynnoommiiaall ffoorr tthhee ffoolllloowwiinngg ddaattaa::

SoSolluuttiioonn;;

TThhee ffoorrwwaarrdd ddiiffffeerreennccee ttaabbllee ttoo tthhee ggiivveenn ddaattaa iiss

EExxppaannddiinngg,, wwee hhaavvee^

4 3 2 ( E − 4 E + 6 E − 4 E + 1) f ( x 0 ) = 0

TThhaatt iiss,,

f ( x 4 (^) ) − 4 f ( x 3 (^) ) + 6 f ( x 2 (^) ) − 4 f ( x 1 (^) ) + f ( x 0 ) = 0

UUssiinngg tthhee vvaalluueess ggiivveenn iinn tthhee ttaabbllee,, wwee oobbttaaiinn

32 − 4 f ( x 3 ) + 6 × 7 − 4 × 5 + 2 = 0

wwhhiicchh ggiivveess^ ff^ (( xx 33

),), tthhee mmiissssiinngg vvaalluuee eeqquuaall ttoo 1 14 4..

ExExaammppllee

Consider the following table of values

x .2 .3 .4 .5.

F(x) .2304 .2788 .3222 .3617.

Find f (.36) using Newton’s Forward Difference Formula.

Solution

x y = f ( ) x ∆ y

2 ∆ y

3 ∆ y

4 ∆ y

0.2 0.2304 (^) 0.0484 -0.005 0.0011 -0.

0.3 0.2788 (^) 0.0434 -0.0039 0.

0.4 0.3222 (^) 0.0395 -0.

0.5 0.3617 (^) 0.

0.6 0.

2 3 0 0 0 0

4 0 0

x

n

p p p p p

y y p y y y

p p p p p p p p n

y y

n

Where

0 0 0

2 3 4 0 0 0

x y y

y y y

0 0.36^ 0.^

x x p h

y x

ExExaammppllee

FFiinndd aa ccuubbiicc ppoollyynnoommiiaall iinn^ xx^ wwhhiicchh ttaakkeess oonn tthhee vvaalluueess

  • -33,, 33,, 1 11 1,, 2 27 7,, 5 57 7 aanndd 1 1007 7,, wwhheenn xx == 00,, 11,, 22,, 33,, 44 aanndd 55 rreessppeeccttiivveellyy..

So Solluuttiioonn

HHeerree,, tthhee oobbsseerrvvaattiioonnss aarree ggiivveenn aatt eeqquuaall iinntteerrvvaallss ooff uunniitt wwiiddtthh..

TToo ddeetteerrmmiinnee tthhee rreeqquuiirreedd ppoollyynnoommiiaall,, wwee ffiirrsstt ccoonnssttrruucctt tthhee ddiiffffeerreennccee ttaabbllee

Di Diffffeerreennccee TTaabbllee

SSiinnccee tthhee 4^4

thth aanndd hhiigghheerr oorrddeerr ddiiffffeerreenncceess aarree zzeerroo,, tthhee rreeqquuiirreedd NNeewwttoonn’’ss iinntteerrppoollaattiioonn

ffoorrmmuullaa

2 3 0 0 0 0 0

p p p p p f x ph f x p f x f x f x

Here

0 0 2 0 3 0

x x (^) x p x h

f x

f x

f x

SSuubbssttiittuuttiinngg tthheessee vvaalluueess iinnttoo tthhee ffoorrmmuullaa,, wwee hhaavvee

( 1) ( 1)( 2) ( ) 3 6 (2) (6) 2 6

x x x x x f x x

3 2 f ( ) x = x − 2 x + 7 x −3,

TThhee rreeqquuiirreedd ccuubbiicc ppoollyynnoommiiaall..