Docsity

Interpolation 7-Numerical Analysis-Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Interpolation 7-Numerical Analysis-Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Chapter 5Chapter 5InterpolationInterpolation

Newton’sNewton’sForwardForwardDifferenceDifferenceInterpolationInterpolationFormulaFormula

0

0

0 2

3

0

0 0

(^
)^ (^
)^
(^ )
(^ 1)^
(^ 1)(
(^ )^
(^ )
2!^
(^ 1)^
(^
1)^

(^ )^ Error !

n

f^ x^

ph^ f

x^

p^ f^ x

p p^

p p^

p f^ x^

f^ x

p p^

p^ n^

f^ x n ^ 

^ 
^
^ 
^
^
^
^
^ 
^ ^
^

 The Newton’s forward differenceformula for interpolation, whichgives the value of

f^ ( x^0

+^ ph

) in

terms of

f^ ( x^0

) and its leading

differences.

NEWTON’SBACKWARDDIFFERENCE INTERPOLATION

FORMULA

The formula is,

2

3

(^

)^ (

)^

(^ )

(^ 1)

3! ( 1)(^

2)^ (

1)^

(^ )^

Error

n^

n^

n n

n

n n

f^ x^

ph^

f^ x^

p^ f^ x

p p^

f^ x

p p^

p^

f^ x

p p^

p^

p^ n^

f^ x

n

^

^

^ 

^

^

^

^

^

^ 

^

^

LAGRANGE’SINTERPOLATIONFORMULA

Newton’s interpolationformulae can be used onlywhen the values of theindependent variable

x^ are

equally spaced. Also thedifferences of

y^ must

ultimately become small.

Here the polynomial is of theform

( )^

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^ 

^

^

^

^

^

^

^

^

^

^

^ 

^

^

^

     

Here, the coefficients

a arek^

so chosen as to satisfy thisequation by the (

n^ + 1) pairs

( x ,^ y i^

). Thus we geti (^) 0 0 0

0 1

0 2

0

(^ )^

(^

)(^

)^ (^

)n

y^ f x^

a^ x^

x^ x^

x^

x^ x

^

^

^

^

  0

0

0

1 0

2

0

(^

)(^

)^ (

)n

y

a^

x^

x^ x

x

x^

x

^

^

^

 

Therefore,

docsity.com

Substituting the values of a ,^ a^0

, …, 1

a n^

we get 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 ^

 ^

^ 

^

^

^

^

^

^

^

^

^

^

0

1

2

1

0

1

2

1

(^
)(^
)(^
)^ (^
(^
)(^
)(^
)^ (^

n n )

n^

n^

n^

n^ n

x^ x^

x^ x^

x^ x^

x^ x^

y

x^ x^

x^ x^

x^ x^

 x x

^
^
^
^ 
^
^

The Lagrange’s formula forinterpolation

This formula can be usedwhether the values

x ,^0

x , …,^2

x n

are equally spaced or not.Alternatively, this can also bewritten in compact form as

0 0

1 1 ( )^

( )^

( )^

( )^

( ) i^ i^

n^ n

y^ f^ x

L^ x y

L^ x y

L^ x y

L^ x y

^

^

^

^

^ 

n ( )k^0

k L^ k x y ^ ^ 

( ) 0 (^ ) n k^

k L^ k x f^ x ^ ^ 

Further, if we introduce thenotation

0

1

0 ( )^

(^

)^ (^

)(^

)^ (^

)

n

i^

n

x^ x^ i

x^

x^ x^

x^ x^

x^ x

 ^  

^

^ ^

^



That is

is a product of

( n^ + 1) factors. Clearly, itsderivative

contains a sum

of ( n

+ 1) terms in each of which one of the factors ofwill^

( )x ^ ( )x ( )x be absent.

We also define,^ ( )

(^

)

k^

i i^ k P^ x

x^

x  ^ 

which is same as

except

that

the

factor

( x

- x )k^

is

absent. Then

( )x

0

1

( )^

( )^

( )^

( )n

x^

P^ x^

P x^

P^ x

 

^

^ 

But, when

x^ =

x , all terms in thek

above sum vanishes except

P^ (xk )k docsity.com