06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3. INTERPOLATION 90<br />

Here is an important question. How do we know that p n , a polynomial of degree at most<br />

n pass<strong>in</strong>g through the data po<strong>in</strong>ts, actually exists? Or, equivalently, how do we know the<br />

system of equations p n (x i )=y i ,i=0, 1, ..., n, has a solution?<br />

The answer is given by the follow<strong>in</strong>g theorem, which we will prove later <strong>in</strong> this section.<br />

Theorem 47. If po<strong>in</strong>ts x 0 ,x 1 , ..., x n are dist<strong>in</strong>ct, then for real values y 0 ,y 1 , ..., y n , there is a<br />

unique polynomial p n of degree at most n such that p n (x i )=y i ,i=0, 1, ..., n.<br />

We mentioned three families of basis functions for polynomials. The choice of a family<br />

of basis functions affects:<br />

• The accuracy of the numerical methods to solve the system of l<strong>in</strong>ear equations Aa = y.<br />

• The ease at which the result<strong>in</strong>g polynomial can be evaluated, differentiated, <strong>in</strong>tegrated,<br />

etc.<br />

Monomial form of polynomial <strong>in</strong>terpolation<br />

Given data (x i ,y i ),i =0, 1, ..., n, we know from the previous theorem that there exists a<br />

polynomial p n (x) of degree at most n, that passes through the data po<strong>in</strong>ts. To represent<br />

p n (x), we will use the monomial basis functions, 1,x,x 2 , ..., x n , or written more succ<strong>in</strong>ctly,<br />

φ k (x) =x k ,k =0, 1, ..., n.<br />

The <strong>in</strong>terpolat<strong>in</strong>g polynomial p n (x) can be written as a l<strong>in</strong>ear comb<strong>in</strong>ation of these basis<br />

functions as<br />

p n (x) =a 0 + a 1 x + a 2 x 2 + ... + a n x n .<br />

We will determ<strong>in</strong>e a i us<strong>in</strong>g the fact that p n is an <strong>in</strong>terpolant for the data:<br />

p n (x i )=a 0 + a 1 x i + a 2 x 2 i + ... + a n x n i<br />

= y i<br />

for i =0, 1, ..., n. Or, <strong>in</strong> matrix form, we want to solve<br />

⎡<br />

⎤ ⎡ ⎤ ⎡ ⎤<br />

1 x 0 x 2 0 ... x n 0 a 0 y 0<br />

1 x 1 x 2 1 x n 1<br />

a 1<br />

y ⎢<br />

⎥ ⎢ ⎥ =<br />

1<br />

⎢ ⎥<br />

⎣.<br />

⎦ ⎣ . ⎦ ⎣ . ⎦<br />

1 x n x 2 n x n n a n y n<br />

} {{ } } {{ } } {{ }<br />

A<br />

a y

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!