interp

# interp - Polynomial Interpolation Givenf0 f1 fN find a...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Polynomial Interpolation Givenf0 , f1 , . . . , fN , find a polynomial P (x) of degree N so that P (xi ) = fi . This problem has a unique solution and f (N +1) () x f (x) - P (x) = (x - x0 )(x - x1 ) (x - xN ) (N + 1)! for some x0 x xN . To show the polynomial is unique, write P (x) = c0 +c1 (x-x0 )+c2 (x-x0 )(x-x1 )+ +cN (x-x0 )(x-x1 ) (x-xN ) Then f0 = P (x0 ) = c0 determines c0 , f1 = P (x1 ) = c0 +c1 (x1 -x0 ) determines c1 , etc. Lagrangian Interpolation N = 3 example: P (x) = (x - x0 )(x - x2 )(x - x3 ) (x - x1 )(x - x2 )(x - x3 ) f0 + f1 + (x0 - x1 )(x0 - x2 )(x0 - x3 ) (x1 - x0 )(x1 - x2 )(x1 - x3 ) (x - x0 )(x - x1 )(x - x3 ) (x - x0 )(x - x1 )(x - x2 ) f2 + f3 (x2 - x0 )(x2 - x1 )(x2 - x3 ) (x3 - x0 )(x3 - x1 )(x3 - x2 ) General formula: N P (x) = k=0 (x - xj ) fk j=k (xk - xj ) ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online