chapter 3: interpolation and polynomial approximationchapter 3: interpolation and polynomial...

23
Chapter 3: Interpolation and Polynomial Approximation

Upload: others

Post on 05-Mar-2021

32 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

Chapter 3: Interpolation and

Polynomial Approximation

Page 2: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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.

Page 3: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

−=

−=

==

+=

Page 4: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

points.data known two thethrough

passing function One) (Degreelinear unique theis

)( ,)( 1100

P

yxPyxP ==Q

Page 5: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

For case with n+1 known data points,

4444444 34444444 21pointsdata 1

1100 ))(,()),...,(,()),(,((

+n

nn xfxxfxxfx

Page 6: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

)).......()((

)......)((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

Page 7: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

Page 8: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

Page 9: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

[ ] well.)( esapproximat )( , withinfound isIt

).(for )(

construct to1

)( of pts 3 uses (example) case thefact, In

20 xfxPxx

xfxP

xxf =

=1/x

Page 10: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

Theorem 3.3 (Error of interpolation using Lagrange polynomial )

[ ] [ ][ ] [ ]

withexists

,in )(number a , each for :THEN

, and ,,......, If 1

10

baxbax

baCfbaxxx n

n

ζ

+∈∈

))....()(()!1(

)()()(or

))....()(()!1(

))(()()(

10

)1(

10

1

n

n

n

n

xxxxxxn

fxPxf

xxxxxxn

xfxPxf

−−−+

=−

−−−+

+=

+

+

ζ

ζ

Page 11: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

−Π==≠=

=

Page 12: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

•Recursively Lagrange Polynomial

k

k

mmm

mmm

xxxxf

xP

......, pointsat )( with

agrees valueits that defined is )(

:Define

21

21 ...,

Page 13: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

++

++−−−−

−−−−=

+++

+=−

−Π=≠=

Page 14: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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,

Page 15: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

THEN:

)(

)()()()(

..1,1,....1,0..1,1,....1,0

ji

kiiikjjj

xx

PxxxPxxxP

−−−= +−+−

Page 16: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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 +−+−

Page 17: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

Page 18: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

Page 19: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

jiQ ,∴degree of polynomial j+1 data points

last data point used (note i=0,1,2,<n)

(Qi,j denote the interpolating polynomial of degree j on the (j+1)

numbers)

iijijiji

ji

PQ

Q

,1,...1,,

,

where

notation new Introduce

−+−−=

2,3,3,2,1

2,2,

2,1,0

2,3 in

2,2 in exampleFor

QQjiP

QQ

jiP

ji

ji

=∴==

=∴

==

Page 20: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

.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

Page 21: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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

Page 22: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

)(

)()( ,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.

Page 23: Chapter 3: Interpolation and Polynomial ApproximationChapter 3: Interpolation and Polynomial Approximation x y Known data Unknown Can we get unknown data from those known? How? Yes!

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)