Upload
others
View
15
Download
0
Embed Size (px)
Citation preview
Chapter 3: Interpolation and
Polynomial Approximation
x
y Known data
Unknown
Can we get unknown data from those known? How?
Yes!
By interpolation: find a polynomial that gives function y(x)
which fits all known data and is relatively accurate in the
whole data domain, so that unknown y(x) can be found.
3.1:Interpolation and the Lagrange
Polynomial
• The polynomial that passes two known data
points (x0,y0) and (x1,y1) can be expressed as
01
0)(1
and
10
1)(0
;1
)1
(,0
)0
(
where
),()()()()( 1100
xx
xxxL
xx
xxxL
yxfyxf
xfxLxfxLxP
−
−=
−
−=
==
+=
points.data known two thethrough
passing function One) (Degreelinear unique theis
)( ,)( 1100
P
yxPyxP ==Q
For case with n+1 known data points,
4444444 34444444 21pointsdata 1
1100 ))(,()),...,(,()),(,((
+n
nn xfxxfxxfx
)).......()((
)......)((numerator where
,...2,1,0,)(
11
10
,
nkk
k
kkn
xxxxxx
xxxx
nkxxnumerator
numeratorLL
−−−
−−=
==
==
+−
10
1 case points for two :example For .except all contain i.e
0 xx
xxLkxxixx −
−=−−
∑=
=++=n
k
knkknnn xLxfLxfxLxfxP0
,,0,0 )()()()()()( L
Theorem 3.2
)()(
)()( where
)()()(
,....1,0),()( whichin
exists )( uniqueTHEN
........,at given are )( of values
and numbers,distinct 1 are ......., If
0,
0
k
10
10
xLxx
xxxL
xLxfxP
nKxPxf
xP
xxxxf
nxxx
k
ik
in
kii
kn
n
k
k
kK
n
n
=−
−Π=
=
==
+
≠=
=
∑
P(x) Satisfies given data
Example 1
Three points data:
,25.0)(,4.0)( ,5)(
4 ,5.2 ,2
210
210
===
===
xfxfxf
xxx
15.1)425.005.0()()()(
3
5)5.4(
))((
))(()(
3
32)244(
))((
))(()(
10)5.6())((
))(()(
0
1202
102
2101
201
2010
210
+−==
+−=
−−
−−=
−+−=
−−
−−=
+−=−−
−−=
∑=
xxxLxfxP
xx
xxxx
xxxxxL
xx
xxxx
xxxxxL
xxxxxx
xxxxxL
n
k
kk
Degree two polynomial
[ ] well.)( esapproximat )( , withinfound isIt ).(for )(
construct to1
)( of pts 3 uses (example) case thefact, In
20 xfxPxx
xfxP
xxf =
=1/x
Theorem 3.3 (Error of interpolation using Lagrange polynomial )
[ ] [ ][ ] [ ]
withexists
,in )(number a , each for :THEN
, and ,,......, If 110
baxbax
baCfbaxxx nn
ζ
+∈∈
))....()(()!1(
)()()(or
))....()(()!1(
))(()()(
10
)1(
10
1
n
n
n
n
xxxxxxn
fxPxf
xxxxxxn
xfxPxf
−−−+
=−
−−−+
+=
+
+
ζ
ζ
available. be should
bonds its and ion,interpolat theof
error theestimate to3.3 Theorem use To
)1( +nf
)(
)()(),()()(
where
00 ik
in
Kii
kk
n
K
kxx
xxxLxLxfxP
−
−Π==≠=
=
∑
•Recursively Lagrange Polynomial
k
k
mmm
mmm
xxxxf
xP
......, pointsat )( with
agrees valueits that defined is )(
:Define
21
21 ...,
xe
xxxxx
for
.6 ,4 ,3 ,2 ,1 have weif e.g. 43210 =====
43
210
43
21
40302010
4321
443322
1100
4
0
))()()((
))()()((
)()()(
)()()()(
)()(
xx
xxx
ik
i
kii
eLeL
eLeLexxxxxxxx
xxxxxxxx
xfLxfLxfL
xfLxfLxfxx
xxxP
++
++−−−−
−−−−=
+++
+=−
−Π=≠=
421 ..........))((
))(()(
4121
424,2,1
xxxeee
xxxx
xxxxxP ++
−−
−−=
421 ,, points 3 useonly i.e. xxx
Theorem 3.5
).....,( of numbersdistinct two
be and (2) ;.....,at defined be (1) If
10
10
k
jik
xxx
xxxxxf
But,
THEN:
)(
)()()()(
..1,1,....1,0..1,1,....1,0
ji
kiiikjjj
xx
PxxxPxxxP
−
−−−= +−+−
Theorem 3.5 Says,
We can construct a higher-degree (including
more given-data points.) polynomials [P(x)
with all data points including points. i, j ] from a
lower-degree Polynomials without including
points i,j.
], pointsdata includet don'
,,....1,1,......1,0 and ,....1,1,......1,0 e.g.[
ji
kiiPkjjP +−+−
Example (recursively generating Polynomial)
Neville’s method
1,0
01
0110
10
1
43210
)0,1 i.e.( )()(
used, are and if 3.5, Theorem From
polynomial degree-first The
)2.2( ),9.1( ),6.1( ),3.1()( ),0.1(
2291613101
pointsdata givenFour
P
jixx
PxxPxxP
xx
ffffxff
,., x., x., x., x.x
=
==−
−−−=
=
=====
(2 pts, minimum required)
)( 1xf )( 0xf
02
1,022,10
2,1,0
210
4,33,22,1
433221
)()(
, , , say, (3pts), twodegreefor 3.5, Theorem
using degree,-higher toproceed , , , have we
used, are pairs ),,( and ),( ),,( if Similarly,
xx
PxxPxxP
xxx
PPP
xxxxxx
−
−−−=
lower degree
higher degree
jiQ ,∴degree of polynomial j+1 data points
last data point used (note i=0,1,2,
.polynomial degree having andpoint
data 1 using is, that iteration, final theis AND
)()(
,.....2,1For
,.....2,1For
ioninterpolat iterated sNeville' so,
)0(
,
1,11,
,
n
nQP
xx
QxxQxxQ
ij
ni
ij
nn
jii
jiijiji
ji
+=
−
−−−=
=
=
≤≤
−
−−−−
Iteration
procedure
is shown
in the next
pages
03
2,232,30
33
13
1,231,31
32
23
0,230,32
31
02
1,121,20
22
12
0,120,21
21
11
)()(,3
)()(,2
)()(,13
)()(,2
)()(,12
11
xx
QxxQxxQj
xx
QxxQxxQj
xx
QxxQxxQji
xx
QxxQxxQj
xx
QxxQxxQji
Qji
−
−−−==→
−
−−−==→
−
−−−==→=
−
−−−==→
−
−−−==→=
→=→= )( 22 xfP = )( 1xf
)(
)()( ,4
)(
)()( ,3
)(
)()( ,2
)(
)()( ,14
04
3,343,40
4,4
14
2,342,41
3,4
24
1,341,42
2,4
34
0,340,43
1,4
xx
QxxQxxQj
xx
QxxQxxQj
xx
QxxQxxQj
xx
QxxQxxQji
−
−−−==→
−
−−−==→
−
−−−==→
−
−−−==→=
P.degreelow previous from
obtained are circle red with,* jiQ4,4)( QxP =
We get P(x) by using the previous
lower-degree P.
Each row is completed before the succeeding rows
are begun.
Data point
Example: Schematic Explanation of Neville’s Iteration
interpolation using five data points (degree four)