{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Handout23 - coefficients a a 1 a 2 of the interpolating...

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

1 COMPUTER SCIENCE 349A Handout Number 23 Section 18.3 The coefficients of the interpolating polynomial can be determined by solving a system of linear equations. Given a function ) ( x f and distinct points n x x x , , , 1 0 K , let P ( x ) be the unique polynomial of degree n for which n i x f x P i i = 0 , ) ( ) ( . Example . Consider the case n = 2 . Let P ( x ) = a 0 + a 1 x + a 2 x 2 . Then ) ( ) ( i i x f x P = for i = 0, 1, 2 implies that ) ( ) ( ) ( 2 2 2 2 2 1 0 1 2 1 2 1 1 0 0 2 0 2 0 1 0 x f x a x a a x f x a x a a x f x a x a a = + + = + + = + + or in matrix/vector notation, = ) ( ) ( ) ( 1 1 1 2 1 0 2 1 0 2 2 2 2 1 1 2 0 0 x f x f x f a a a x x x x x x . This is a system of 3 linear equations in the 3 unknowns 2 1 0 a a a . For example, if x x f sin ) ( = and x 0 = 0.2 , x 1 = 0.5, x 2 = 1 (in radians), then the
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: coefficients a , a 1 , a 2 of the interpolating polynomial are determined by solving the following linear system: ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ 8415 . 4794 . 1987 . 1 1 1 25 . 5 . 1 04 . 2 . 1 2 1 a a a Relative to other methods, the disadvantages of this approach are (i) such linear systems may be ill-conditioned and (ii) it's difficult and expensive to change the degree of the interpolating polynomial....
View Full Document

{[ snackBarMessage ]}