Interpolation polynomial * Means finding an approximate value to a - - PowerPoint PPT Presentation

interpolation polynomial
SMART_READER_LITE
LIVE PREVIEW

Interpolation polynomial * Means finding an approximate value to a - - PowerPoint PPT Presentation

Interpolation polynomial * Means finding an approximate value to a function as a polynomial of degree n using n+1 points. Methods of solution 1- Quadratic Lagrange x x x x 1 2 0 f x y y y 0 1 2 P


slide-1
SLIDE 1
slide-2
SLIDE 2
slide-3
SLIDE 3

* Means finding an approximate value to a function as a polynomial of degree n using n+1 points.

Interpolation polynomial Methods of solution

slide-4
SLIDE 4

1- Quadratic Lagrange

 

2 1 1 2 2

P x L y L y L y   

x

x

1

x

2

x y

1

y

2

y

     

1 2 1 2

x x x x L x x x x     

     

2 1 1 1 2

x x x x L x x x x     

     

1 2 2 2 1

x x x x L x x x x     

 

f x

slide-5
SLIDE 5

Example

x

1 2 f(x) 1.2 4.5 3 3.8

* Interpolate the following data:

     

1 2 1 2

x x x x L x x x x     

     

2 3 1 2 1 3 x x     

 

2

1 5 6 2 x x   

     

2 1 1 1 2

x x x x L x x x x     

     

1 3 2 1 2 3 x x     

 

2

4 3 x x    

     

1 2 2 2 1

x x x x L x x x x     

     

1 2 3 1 3 2 x x     

 

2

1 3 2 2 x x   

 

2 1 1 2 2

P x L y L y L y   

1 2

1.2 4.5 3.8 L L L   

2

2 9.3 6.1 x x    

slide-6
SLIDE 6

Example

x

9 9.5 f(x) 2.19 2.25 11 2.39

* Given that:

     

1 2 1 2

x x x x L x x x x     

     

9.5 11 9 9.5 9 11 x x     

2

20.5 104.5 x x   

     

2 1 1 1 2

x x x x L x x x x     

     

9 11 9.5 9 9.5 11 x x     

 

2

4 20 99 3 x x    

     

1 2 2 2 1

x x x x L x x x x     

     

9 9.5 11 9 11 9.5 x x     

 

2

1 18.5 85.5 3 x x   

   

f x Ln x 

approximate . If , evaluate the error.  

2 9.2

P

slide-7
SLIDE 7

 

2 1 1 2 2

P x L y L y L y   

1 2

2.19 2.25 2.39 L L L   

2

1.58 29.11 136.2 x x   

2(9.2)

2.1192 P 

Error = Exact value - Approximate value

 

2

(9.2) 9.2 f P  

Exact value (9.2) Ln 

2.2192 

2.2192-2.1192  0.1 

slide-8
SLIDE 8

           

1 2 1 1 1

+

n n n

P x a a x x a x x x x a x x x x x x

          

x

x

1

x

2

x y

1

y

2

y

0,

a y 

1 1 1

, y y a x x    ( ) f x

2- Newton divided difference

1 n

x

 1 n

y

slide-9
SLIDE 9

Example

x

9 9.5 f(x) 2.19 2.25 11 2.39

* Given that:

   

f x Ln x 

approximate . If , evaluate the error.  

2 9.2

P

x y 9 2.19 9.5 2.25 11 2.39 First Stage

2.25 2.19 9.5 9   0.12 

Second Stage

2.39 2.25 11 9.5   0.093  0.093 0.12 11 9   0.0135  

a

1

a

2

a

slide-10
SLIDE 10

      

2 1 2 1

P x a a x x a x x x x           

2.19 0.12 9 0.0135 9 9.5 x x x      

2

0.0135 +0.36975 0.04425 x x   

2(9.2)

2.21481 P 

Error = Exact value - Approximate value

 

2

(9.2) 9.2 f P  

Exact value (9.2) Ln 

2.2192 

2.2192-2.21481  0.00439 

slide-11
SLIDE 11

Example

x

1 f(x) 1 3 2 6

* Given that: approximate .  

3 1.8

P

x y 1 1 3 2 6 4 8 First Stage

3 1 1   2 

Second Stage

6 3 2 1   3  3 2 2   1 2 

a

1

a

2

a

4 8

8 6 4 2   1  1 3 4 1   2 3  

Third Stage

2 1 3 2 4    7 24  

3

a

slide-12
SLIDE 12

          

3 1 2 1 3 1 2

+ P x a a x x a x x x x a x x x x x x         

        

1 7 1 2 1 1 2 2 24 x x x x x x          

3 2

7 1.375 0.916667 1 24 x x x     

3(1.8)

5.404 P 

slide-13
SLIDE 13