Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lagrange’s Interpolation Formula-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

This course contains solution of non linear equations and linear system of equations, approximation of eigen values, interpolation and polynomial approximation, numerical differentiation, integration, numerical solution of ordinary differential equations. This lecture includes: Lagrange, Interpolation, Formula, Independent, Variable, Equidistant, Interval, Degree, Function, Polynomial

Typology: Lecture notes

2011/2012

Uploaded on 08/05/2012

saruy
saruy 🇮🇳

4.5

(114)

132 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical Analysis –MTH603 VU
© Copyright Virtual University of Pakistan 1
L
LA
AG
GR
RA
AN
NG
GE
E
S
S
I
IN
NT
TE
ER
RP
PO
OL
LA
AT
TI
IO
ON
N
F
FO
OR
RM
MU
UL
LA
A
N
Ne
ew
wt
to
on
n
s
s
i
in
nt
te
er
rp
po
ol
la
at
ti
io
on
n
f
fo
or
rm
mu
ul
la
ae
e
d
de
ev
ve
el
lo
op
pe
ed
d
e
ea
ar
rl
li
ie
er
r
c
ca
an
n
b
be
e
u
us
se
ed
d
o
on
nl
ly
y
w
wh
he
en
n
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
a
ar
re
e
e
eq
qu
ua
al
ll
ly
y
s
sp
pa
ac
ce
ed
d.
.
A
Al
ls
so
o
t
th
he
e
d
di
if
ff
fe
er
re
en
nc
ce
es
s
o
of
f
y
y
m
mu
us
st
t
u
ul
lt
ti
im
ma
at
te
el
ly
y
b
be
ec
co
om
me
e
s
sm
ma
al
ll
l.
.
I
If
f
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
a
ar
re
e
n
no
ot
t
g
gi
iv
ve
en
n
a
at
t
e
eq
qu
ui
id
di
is
st
ta
an
nt
t
i
in
nt
te
er
rv
va
al
ls
s,
,
t
th
he
en
n
w
we
e
h
ha
av
ve
e
t
th
he
e
b
ba
as
si
ic
c
f
fo
or
rm
mu
ul
la
a
a
as
ss
so
oc
ci
ia
at
te
ed
d
w
wi
it
th
h
t
th
he
e
n
na
am
me
e
o
of
f
L
La
ag
gr
ra
an
ng
ge
e
w
wh
hi
ic
ch
h
w
wi
il
ll
l
b
be
e
d
de
er
ri
iv
ve
ed
d
n
no
ow
w.
.
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
t
th
he
e
v
va
al
lu
ue
es
s,
,
y
y0
0
,
,
y
y1
1
,
,
y
yn
n
c
co
or
rr
re
es
sp
po
on
nd
di
in
ng
g
t
to
o
x
x0
0
,
,
x
x1
1,
,
x
xn
n
.
.
S
Si
in
nc
ce
e
t
th
he
er
re
e
a
ar
re
e
(
(n
n
+
+
1
1)
)
v
va
al
lu
ue
es
s
o
of
f
y
y
c
co
or
rr
re
es
sp
po
on
nd
di
in
ng
g
t
to
o
(
(n
n
+
+
1
1)
)
v
va
al
lu
ue
es
s
o
of
f
x
x,
,
w
we
e
c
ca
an
n
r
re
ep
pr
re
es
se
en
nt
t
t
th
he
e
f
fu
un
nc
ct
ti
io
on
n
f
f
(
(x
x)
)
b
by
y
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.
.
S
Su
up
pp
po
os
se
e
w
we
e
w
wr
ri
it
te
e
t
th
hi
is
s
p
po
ol
ly
yn
no
om
mi
ia
al
l
i
in
n
t
th
he
e
f
fo
or
rm
m
.
.
1
01
() nn
n
f
xAxAx A
=+ ++"
or in the form,
01 2
10 2
20 1
01 1
() ( )( ) ( )
()()()
()()()
()()( )
n
n
n
nn
y fx axxxx xx
ax x x x x x
ax x x x x x
ax x x x xx
==−−
+−
+− +
+−
"
"
""
"
H
He
er
re
e,
,
t
th
he
e
c
co
oe
ef
ff
fi
ic
ci
ie
en
nt
ts
s
a
ak
k
a
ar
re
e
s
so
o
c
ch
ho
os
se
en
n
a
as
s
t
to
o
s
sa
at
ti
is
sf
fy
y
t
th
hi
is
s
e
eq
qu
ua
at
ti
io
on
n
b
by
y
t
th
he
e
(
(n
n
+
+
1
1)
)
p
pa
ai
ir
rs
s
(
(x
xi
i,
,
y
yi
i)
).
.
T
Th
hu
us
s
w
we
e
g
ge
et
t
0000101020
()()()( )( )
n
y fx axxxxxx xx==−−− "
Therefore,
0
0
010 2 0
()( )( )
n
y
a
x
xx x x x
=−− "
Similarily,we obtain
1
1
1012 1
()()()
n
y
a
x
xxx xx
=−− "
and
01 1 1
()()( )( )()
i
i
i i ii ii in
y
a
x
xxx xx x x x x
−+
=−− ""
01 1
()()( )
n
n
nn nn
y
a
x
xx x x x
=−− "
S
Su
ub
bs
st
ti
it
tu
ut
ti
in
ng
g
t
th
he
e
v
va
al
lu
ue
es
s
o
of
f
a
a0
0,
,
a
a1
1,
,
,
,
a
an
n
w
we
e
g
ge
et
t
12 02
01
010 2 0 1012 1
()()() ()()()
() ()( )()()()( )
nn
nn
xxxx xx xx xx xx
yfx y y
xxxx xx xxxx xx
−−
== + +
−− −−
""
""
01 1 1
01 1 1
()()( )( )()
()()( )( )()
ii n
i
i i ii ii in
xx xx xx xx xx y
xxxx xx xx xx
−+
−+
−−
++
−−
""
"
""
T
Th
he
e
L
La
ag
gr
ra
an
ng
ge
e
s
s
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
docsity.com
pf3
pf4

Partial preview of the text

Download Lagrange’s Interpolation Formula-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

LLAAGGRRAANNGGEE’’SS IINNTTEERRPPOOLLAATTIIOONN FFOORRMMUULLAA

NNeewwttoonn’’ss iinntteerrppoollaattiioonn ffoorrmmuullaaee ddeevveellooppeedd eeaarrlliieerr ccaann bbee uusseedd oonnllyy wwhheenn tthhee vvaalluueess ooff

tthhee iinnddeeppeennddeenntt vvaarriiaabbllee^ xx^ araree eeqquuaallllyy ssppaacceedd.. AAllssoo tthhee ddiiffffeerreenncceess ooff^ yy^ mmuusstt uullttiimmaatteellyy

bbeeccoommee ssmmaallll..

IIff tthhee vvaalluueess ooff tthhee iinnddeeppeennddeenntt vvaarriiaabbllee aarree nnoott ggiivveenn aatt eeqquuiiddiissttaanntt iinntteerrvvaallss,, tthheenn wwee

hhaavvee tthhee bbaassiicc ffoorrmmuullaa aassssoocciiaatteedd wwiitthh tthhee nnaammee ooff LLaaggrraannggee wwhhiicchh wwiillll bbee ddeerriivveedd nnooww..

LLeett^ yy^ ==^ ff^ (( xx )) bbee aa ffuunnccttiioonn wwhhiicchh ttaakkeess tthhee vvaalluueess,,^ yy 0 0

, y,y 1 1

,…,…yy nn

cocorrrreessppoonnddiinngg ttoo xx 00

,, xx (^11)

, …,…xx nn

. S.Siinnccee tthheerree aarree (( nn ++ 11)) vvaalluueess ooff yy cocorrrreessppoonnddiinngg ttoo (( nn + 1+1)) vvaalluueess ooff xx ,, wwee

ccaann rreepprreesseenntt tthhee ffuunnccttiioonn ff (( xx )) bbyy aa ppoollyynnoommiiaall ooff ddeeggrreeee nn ..

SSuuppppoossee wwee wwrriittee tthhiiss ppoollyynnoommiiaall iinn tthhee ffoorrmm ..

1 0 1

n n n f x A x A x A

− = + + "+

or in the form,

0 1 2

1 0 2

2 0 1

0 1 1

n

n

n

n n

y f x a x x x x x x

a x x x x x x

a x x x x x x

a x x x x x x (^) −

HHeerree,, tthhee ccooeeffffiicciieennttss^ aa k k

aarree ssoo cchhoosseenn aass ttoo ssaattiissffyy tthhiiss eeqquuaattiioonn bbyy tthhee (( nn^ ++ 11)) ppaaiirrss

(( xx ii

,, yy ii

).). TThhuuss wwee ggeett

y 0 (^) = f ( x 0 (^) ) = a 0 (^) ( x 0 (^) − x 1 (^) )( x 0 (^) − x 1 (^) )( x 0 (^) − x 2 (^) ) "( x 0 − xn )

Therefore,

0 0 ( 0 1 )( 0 2 ) ( (^0) n )

y a x x x x x x

Similarily,we obtain

1 1 ( 1 0 )( 1 2 ) ( (^1) n )

y a x x x x x x

and

i i i i i i i i i n

y a x x x x x x (^) − x x (^) + x x

n n n n n n

y a x x x x x x (^) −

SSuubbssttiittuuttiinngg tthhee vvaalluueess ooff^ aa 00

,, aa 11

, …,…,, aa n n

wewe ggeett

1 2 0 2 0 1 0 1 0 2 0 1 0 1 2 1

n n

n n

x x x x x x x x x x x x y f x y y x x x x x x x x x x x x

0 1 1 1

0 1 1 1

i i n i i i i i i i i n

x x x x x x x x x x y x x x x x x x x x x

− +

− +

TThhee LLaaggrraannggee’’ss ffoorrmmuullaa ffoorr iinntteerrppoollaattiioonn docsity.com

TThhiiss ffoorrmmuullaa ccaann bbee uusseedd wwhheetthheerr tthhee vvaalluueess^ xx 00

,,^ xx 22

,, ……,,^ xx n n

araree eeqquuaallllyy ssppaacceedd oorr nnoott..

AAlltteerrnnaattiivveellyy,, tthhiiss ccaann aallssoo bbee wwrriitttteenn iinn ccoommppaacctt ffoorrmm aass

y = f ( ) x = L 0 (^) ( ) x y 0 (^) + L 1 (^) ( x 1 (^) ) y 1 + Li ( xi ) yi + "+ Ln ( xn ) yn

0

n

k k k

L x y

= (^) ∑ 0

n

k k k

L x f x

= (^) ∑

Where

0 1 1 1

0 1 1 1

i i n i i i i i i i i n

x x x x x x x x x x L x x x x x x x x x x x

− +

− +

WWee ccaann eeaassiillyy oobbsseerrvvee tthhaatt,,

( ) 1 i i L x = and (^) ( ) 0,. Li x (^) j = ij

TThhuuss iinnttrroodduucciinngg KrKroonneecckkeerr dedellttaa nnoottaattiioonn

1, if ( ) 0, if

i j ij

i j L x i j

FFuurrtthheerr,, iiff wwee iinnttrroodduuccee tthhee nnoottaattiioonn

0 1 0

n

i n i

x x x x x x x x x

TThhaatt iiss ∏( ) x iiss aa pprroodduucctt ooff (( nn ++ 11)) ffaaccttoorrss.. CClleeaarrllyy,, iittss ddeerriivvaattiivvee

∏′ ( ) x coconnttaaiinnss aa ssuumm ooff (( nn + 1+1)) tteerrmmss iinn eeaacchh ooff wwhhiicchh oonnee ooff tthhee

ffaaccttoorrss ooff wwiillll^ ∏( )^ x bebe aabbsseenntt..

WWee aallssoo ddeeffiinnee,,

k^ ( )^ (^ i ) i k

P x x x

WWhhiicchh iiss ssaammee aass ∏ ( ) x eexxcceepptt tthhaatt tthhee ffaaccttoorr (( xx – – xx kk

)) iiss aabbsseenntt.. TThheenn

∏′ ( ) x = P 0 (^) ( ) x + P x 1 ( ) + "+ Pn ( ) x

BBuutt,, wwhheenn^ xx^ ==^ xx kk

,, aallll tteerrmmss iinn tthhee aabboovvee ssuumm vvaanniisshheess eexxcceepptt^ PP kk

(x(x kk

HHeennccee

( xk ) Pk ( xk ) ( xk x 0 (^) ) ( xk xk (^) − 1 )( (^) xk xk (^) + 1 ) ( xk xn ) ∏′ = = − " − − " −

k k k k k k

k k

P x P x L x P x x

x

x x x

FFiinnaallllyy,, tthhee LLaaggrraannggee’’ss iinntteerrppoollaattiioonn ppoollyynnoommiiaall ooff ddeeggrreeee nn ccaann bbee

wwrriitttteenn aass

0

0 0

n

k k (^) k k

n n

k k k k k k

x y x f x f x x x x

L x f x L x y

=

= =

∑ ∑

Ex Exaammppllee docsity.com

Solution :

As Lagrange’s formula for interpolating polynomial is given by,

1 2 0 2 0 1 0 1 2 0 1 0 2 1 0 1 2 2 0 2 1

2 2 2

2 2 2

x x x x x x x x x x x x y x f x f x f x f x x x x x x x x x x x x x

x x x x x x

x x x x x x

x x x x x x

2

2

x x

x x

Which is the required polynomial

x 1 2 -

F(x) 3 -5 -

docsity.com