Interpolation Function Theorems

5

Transcript of Interpolation Function Theorems

Page 1: Interpolation Function Theorems

8/10/2019 Interpolation Function Theorems

http://slidepdf.com/reader/full/interpolation-function-theorems 1/5

L E C T U R E 1 5

I n t e r p o l a t i n g F u n c t i o n s  

I n t h e n e x t s e r i e s o f l e c t u r e s w e w i l l d i s c u s s m e t h o d s f o r n d i n g f u n c t i o n s t h a t b e s t t a g i v e n s e t o f d a t a .

W e s h a l l c a l l s u c h f u n c t i o n s i n t e r p o l a t i n g f u n c t i o n s , a n d w e s h a l l c o n s i d e r s e v e r a l d i e r e n t m e t h o d s f o r

n d i n g s u c h f u n c t i o n s . W e s h a l l b e g i n t h i s d i s c u s s i o n w i t h t h e p r o b l e m o f i n t e r p o l a t i n g d a t a b y m e a n s o f

p o l y n o m i a l f u n c t i o n s .

1 . P o l y n o m i a l I n t e r p o l a t i o n  

C o n s i d e r t h e f o l l o w i n g p r o b l e m :

P r o b l e m   1 5 . 1 G i v e n a t a b l e o f   n  + 1 d i s t i n c t d a t a p o i n t s x 

i

i

i = 0 ; : : : ; n   , n d a p o l y n o m i a l o f   P  o f 

l o w e s t d e g r e e f o r w h i c h  

P  x 

i

=  y 

i

8  i 1 5 . 1

T h a t t h i s p r o b l e m   h a s a s o l u t i o n i s f a i r l y e a s y t o s e e . F o r i f w e s e t

P  x  =  a 

n

n

+  a 

n 1

n 1

+  +  a 

1

x  +  a 

0

t h e n , s o l o n g a s t h e x 

i

a r e a l l d i s t i n c t , e q u a t i o n s 1 5 . 1 w i l l c o n s t i t u t e a s y s t e m o f n  + 1 l i n e a r l y i n d e p e n d e n t

e q u a t i o n s

0

n

n

+ x 

0

n 1

n 1

+  +  x 

0

1

+  a 

0

=  y 

0

1 5 . 2

1

n

n

+ x 

1

n 1

n 1

+  +  x 

1

1

+  a 

0

=  y 

1

n

n

n

+ x 

n

n 1

n 1

+  +  x 

n

1

+  a 

0

=  y 

n

f o r n  + 1 u n k n o w n s a 

0

; : : : ; a  

n

. T h a t t h e s e e q u a t i o n s a r e l i n e a r l y i n d e p e n d e n t m a y n o t b e i m m e d i a t e l y  

o b v i o u s ; b u t i t f o l l o w s f r o m t h e f a c t t h a t t h e m o n o m i a l s x 

i

i = 0 ; : : : ; n   a r e l i n e a r l y i n d e p e n d e n t f u n c t i o n s .

W e c a n t h u s e x p e c t a u n i q u e s o l u t i o n o f d e g r e e n 

T h e f o r m a l l i n e a r a l g e b r a i c a r g u m e n t f o r t h e e x i s t e n c e o f s o l u t i o n s i s , h o w e v e r , n o t r e a l l y t h e b e s t w a y t o  

n d i n g a s o l u t i o n . F o r , i t t a k e s o n t h e o r d e r o f n 

3

o p e r a t i o n s t o s o l v e a l i n e a r s y s t e m s u c h a s 1 5 . 1 o n a  

c o m p u t e r , i f w e h a d a m i l l i o n o r s o d a t a p o i n t s t o t , w e w o u l d n e e d t o c a r r y o u t a t l e a s t 1 0

1 8

o p e r a t i o n s

t o c a l c u l a t e a s o l u t i o n . W h i l e s u c h a c a l c u l a t i o n m i g h t a c t u a l l y b e f e a s i b l e o n m o d e r n h a r d w a r e , t h e r e a r e

m u c h b e t t e r w a y s t o p r o c e d e .

2 . T h e N e w t o n i a n F o r m o f t h e I n t e r p o l a t i o n P o l y n o m i a l

T h e f o l l o w i n g a l g o r i t h m a l l o w s o n e t o b u i l d u p a n i n t e r p o l a t i n g p o l y n o m i a l m u c h m o r e q u i c k l y . L e t

0

x  =  y 

0

1

Page 2: Interpolation Function Theorems

8/10/2019 Interpolation Function Theorems

http://slidepdf.com/reader/full/interpolation-function-theorems 2/5

2 . T H E N E W T O N I A N F O R M O F T H E I N T E R P O L A T I O N P O L Y N O M I A L 2

T h i s f u n c t i o n c l e a r l y s a t i s e s P 

0

0

=  y 

0

, b u t i t w o n ' t s a t i s f y   P 

0

i

=  y 

i

u n l e s s y 

i

=  y 

0

. T h e n e x t s t e p  

i s t o w r i t e d o w n a f u n c t i o n   P 

1

x  t h a t s a t i s e s a t l e a s t P 

1

0

=  y 

0

a n d  P 

1

1

=  y 

1

. T h i s c a n b e h a d b y  

s i m p l y a d d i n g a t e r m t o   P 

0

1

x  =  y 

0

+  c

1

x  ,  x 

0

a n d c h o o s i n g   c s o t h a t

1

1

=  y 

1

  c

1

1

,  y 

0

1

,  x 

0

N o w w e h a v e a p o l y n o m i a l f u n c t i o n t h a t a t l e a s t a g r e e s w i t h t h e d a t a a t t w o p o i n t s . T o c r e a t e a f u n c t i o n  

t h a t i s c o r r e c t f o r t h e r s t t h r e e d a t a p o i n t s w e s e t

2

x  =  P 

1

x  +  c

2

x  ,  x 

0

x  ,  x 

1

a n d c h o o s e c s o t h a t

2

=  P 

2

2

  c

2

2

,  P 

1

2

2

,  x 

0

2

,  x 

1

N o t e t h a t t h e r e a s o n w h y t h i s p r o c e d u r e w o r d s i s t h a t w e h a v e a f u n c t i o n   P 

1

x  t h a t i s a l r e a d y c o r r e c t a t

t h e r s t t w o p o i n t s a n d w e a r e a d d i n g t o i t a f u n c t i o n t h a t m a k e s n o c o n t r i b u t i o n t o t h e v a l u e s a t x 

0

a n d 

1

b u t w h i c h c a n b e a d j u s t e d t o c o r r e c t v a l u e y 

2

a t x 

2

N o w s u p p o s e w e h a v e c a r r i e d o u t t h i s p r o c e d u r e t o c o n s t r u c t a d e g r e e k  p o l y n o m i a l P 

k

x  t h a t r e p l i c a t e s

t h e r s t k  d a t a p o i n t s . T o o b t a i n a p o l y n o m i a l f u n c t i o n t h a t r e p l i c a t e s a l l t h e d a t a p o i n t s u p t o x 

k

k

w e s e t

k

x  =  P 

k 1

x  +  c

k

x  ,  x 

0

x  ,  x 

1

x  ,  x 

k 1

w h e r e c

k

i s c h o s e n s o t h a t P 

k

k

=  y 

k

  c

k

k

,  P 

k 1

k

k

,  x 

0

k

,  x 

1

k

,  x 

k 1

C l e a r l y , s o l o n g a s t h e p o i n t s x 

i

i = 0 ; : : : ; n   a r e a l l d i s t i n c t , t h e r e i s n o o b s t r u c t i o n t o t h i s p r o g r a m a n d s o  

w e ' l l b e a b l e t o c o n s t r u c t a p o l y n o m i a l P 

n

x  o f d e g r e s s m    n  t h a t i n t e r p o l a t e s t h e d a t a i t c o u l d h a p p e n  

t h a t s o m e o f t h e n u m b e r s c

i

= 0 , t h a t ' s w h y p e r h a p s t h e d e g r e e o f P 

n

x  m i g h t b e l e s s t h a n   n 

E x a m p l e   1 5 . 1 F i n d t h e N e w t o n f o r m o f t h e i n t e r p o l a t i o n p o l y n o m i a l f o r t h e f o l l o w i n g s e t o f d a t a  

0

= 0 y 

0

=  ,  1

1

= 1 y 

1

=  ,  1

2

= 2 y 

2

= 1

3

= 3 y 

3

= 1 1

S e t

0

x  =  y 

0

=  ,  1

T h e n  

c

1

1

,  P 

0

1

,  x 

0

,  1 ,  ,  1

1 ,  0

= 0

  P 

1

x  =  P 

0

x  +  c

1

x  ,  x 

0

=  ,  1 + 0 =   ,  1

c

2

2

,  P 

1

2

,  x 

1

2

,  x 

0

1 ,  ,  1

2 ,  1 2 ,  0

= 1

  P 

2

x  =  P 

1

x  +  c

2

x  ,  x 

0

x  ,  x 

1

=  ,  1 + x  ,  1 x 

c

3

3

,  P 

2

3

,  x 

2

3

,  x 

1

3

,  x 

0

1 1 ,  5

3 ,  2 3 ,  1 3 ,  0

= 1

  P 

3

x  =  P 

2

x  +  c

3

x  ,  x 

0

x  ,  x 

1

x  ,  x 

2

=  ,  1 + x  ,  1 x  + x  ,  2 x  ,  1 x 

Page 3: Interpolation Function Theorems

8/10/2019 Interpolation Function Theorems

http://slidepdf.com/reader/full/interpolation-function-theorems 3/5

Page 4: Interpolation Function Theorems

8/10/2019 Interpolation Function Theorems

http://slidepdf.com/reader/full/interpolation-function-theorems 4/5

3 . T H E L A G R A N G E F O R M O F T H E I N T E R P O L A T I O N P O L Y N O M I A L 4

c o l l e c t a l l t h e t e r m s i n t h e i n t e r p o l a t i o n p o l y n o m i a l t h a t a r e p r o p o r t i o n a l t o e a c h o f t h e y 

i

t o o b t a i n a n  

e x p r e s s i o n o f t h e f o r m  

P  x  =  y 

0

`

0

x  +  y 

1

`

1

x  +  +  y 

n

`

n

N o w t h e p o l y n o m i a l s `

i

x  d e p e n d o n l y o n t h e v a r i a b l e s d a t a p o i n t s x 

i

a n d n o t a t a l l o n t h e i r v a l u e s y 

i

T h e r e f o r e , b y l o o k i n g a t s p e c i a l s e t s o f p o t e n t i a l d a t a , w e c a n g u r e o u t w h a t t h e y m u s t b e . F o r e x a m p l e ,

s u p p o s e w e x   i a n d d e m a n d  

j

 

1 i f i =  j

0 i f i 6=  j

1 5 . 3

T h e n t h e i n t e r p o l a t i n g p o l y n o m i a l f o r t h i s s e t o f d a t a w o u l d l o o k l i k e

P  x  = 

n

j = 0

j

`

j

x  =  l

i

a n d s o w e c o u l d c o n c l u d e t h a t , s i n c e t h i s p o l y n o m i a l i n t e r p o l a t e s t h e d a t a 1 5 . 3

0 =  P  x 

j

=  `

i

j

f o r a l l i 6=  j

w h i c h t e l l s u s t h a t `

i

x  h a s n  d i s t i n c t r o o t s x 

j

i 2 f 0 1 ; : : : ; n   i 6=  j g . S i n c e t h e d e g r e e o f `

i

x  i s a t m o s t

n  , a n d b e c a u s e t h e t r i v i a l s o l u t i o n   `

i

x  i s n o t a l l o w e d o t h e r w i s e P  x 

i

6= 1 , a n d b e c a u s e t h e i n t e r p o l a t i n g  

p o l y n o m i a l m u s t b e u n i q u e w e c a n c o n c l u d e t h a t

l

i

x  = 

j 6=  i

x  ,  x 

j

i

,  x 

j

s i m p l y b e c a u s e i t h a s t h e p r o p e r t y t h a t i t i n t e r p o l a t e s t h e d a t a 1 5 . 3 .

H a v i n g i d e n t i e d t h e c a r d i n a l f u n c t i o n s `

i

x  , w e c a n n o w w r i t e

P  x  = 

n

i = 0

i

`

i

x  = 

n

i = 0

i

j 6=  i

x  ,  x 

j

i

,  x 

j

T h i s p r e s e n t a t i o n o f t h e i n t e r p o l a t i o n p o l y n o m i a l i s k n o w n a s t h e L a g r a n g e f o r m o f t h e i n t e r p o l a t i o n  

p o l y n o m i a l

E x a m p l e   1 5 . 4   F i n d t h e L a g r a n g e f o r m o f t h e i n t e r p o l a t i o n p o l y n o m i a l f o r t h e f o l l o w i n g s e t o f d a t a  

0

= 0 y 

0

=  ,  1

1

= 1 y 

1

=  ,  1

2

= 2 y 

2

= 1

3

= 3 y 

3

= 1 1

Page 5: Interpolation Function Theorems

8/10/2019 Interpolation Function Theorems

http://slidepdf.com/reader/full/interpolation-function-theorems 5/5

3 . T H E L A G R A N G E F O R M O F T H E I N T E R P O L A T I O N P O L Y N O M I A L 5

W r i t i n g d o w n t h e L a g r a n g e f o r m o f t h e i n t e r p o l a t i o n i s p r e t t y s t r a i g h t - f o r w a r d .

P  x  = 

n

i = 0

i

n

j 6=  i

x  ,  x 

j

i

,  x 

j

=  y 

0

x  ,  x 

1

x  ,  x 

2

x  ,  x 

3

0

,  x 

1

0

,  x 

2

0

,  x 

3

+  y 

1

x  ,  x 

0

x  ,  x 

2

x  ,  x 

3

1

,  x 

0

1

,  x 

2

1

,  x 

3

+  y 

2

x  ,  x 

0

x  ,  x 

1

x  ,  x 

3

2

,  x 

0

2

,  x 

1

2

,  x 

3

+  y 

3

x  ,  x 

0

x  ,  x 

1

x  ,  x 

2

3

,  x 

0

3

,  x 

1

3

,  x 

2

=  , 

x  ,  1 x  ,  2 x  ,  3

,  1 ,  2 ,  3

x  x  ,  2 x  ,  3

1 ,  1 ,  2

x  x  ,  1 x  ,  3

2 1 ,  1

+ 1 1

x  x  ,  1 x  ,  2

3 2 1

T h e n a l e x p r e s s i o n i s t h e L a g r a n g e f o r m o f t h e i n t e r p o l a t i o n p o l y n o m i a l . W h i l e t e d i o u s , i t i s

n e v e r t h e l e s s s t r a i g h t f o r w a r d t o v e r i f y t h a t

P  x  =  , 

x  ,  1 x  ,  2 x  ,  3

,  1 ,  2 ,  3

x  x  ,  2 x  ,  3

1 ,  1 ,  2

x  x  ,  1 x  ,  3

2 1 ,  1

+ 1 1

x  x  ,  1 x  ,  2

3 2 1

=  x 

3

,  2 x 

2

+  x  = 1

a n d s o w e r e c o v e r t h e s a m e i n t e r p o l a t i o n p o l y n o m i a l a s i n t h e r s t e x a m p l e .