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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3. INTERPOLATION 89<br />

We want f to pass through the data po<strong>in</strong>ts, that is, f(x i )=y i . Then determ<strong>in</strong>e a k so that:<br />

f(x i )=<br />

n∑<br />

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

k=0<br />

which is a system of n +1equations <strong>with</strong> n +1unknowns. Us<strong>in</strong>g matrices, the problem is<br />

to solve the matrix equation<br />

Aa = y<br />

for a, where<br />

⎡<br />

⎤ ⎡ ⎤ ⎡ ⎤<br />

φ 0 (x 0 ) ... φ n (x 0 ) a 0 y 0<br />

φ<br />

A =<br />

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

⎢<br />

⎥<br />

⎣ .<br />

⎦ ,a= a 1<br />

⎢ ⎥<br />

⎣ . ⎦ ,y = y 1<br />

⎢ ⎥<br />

⎣ . ⎦ .<br />

φ 0 (x n ) ... φ n (x n ) a n y n<br />

3.1 Polynomial <strong>in</strong>terpolation<br />

In polynomial <strong>in</strong>terpolation, we pick polynomials as the family of functions <strong>in</strong> the <strong>in</strong>terpolation<br />

problem.<br />

• Data: (x i ,y i ),i=0, 1, ..., n<br />

• Family: Polynomials<br />

The space of polynomials up to degree n is a vector space. We will consider three choices<br />

for the basis for this vector space:<br />

• Basis:<br />

– Monomial basis: φ k (x) =x k<br />

– Lagrange basis: φ k (x) = ∏ n<br />

j=0,j≠k<br />

– Newton basis: φ k (x) = ∏ k−1<br />

j=0 (x − x j)<br />

where k =0, 1, ..., n.<br />

( )<br />

x−xj<br />

x k −x j<br />

Once we decide on the basis, the <strong>in</strong>terpolat<strong>in</strong>g polynomial can be written as a l<strong>in</strong>ear comb<strong>in</strong>ation<br />

of the basis functions:<br />

n∑<br />

p n (x) = a k φ k (x)<br />

where p n (x i )=y i ,i=0, 1, ..., n.<br />

k=0

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

Saved successfully!

Ooh no, something went wrong!