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 120<br />

Exercise 3.3-1: The follow<strong>in</strong>g table gives the values of y = f(x) and y ′ = f ′ (x) where<br />

f(x) =e x +s<strong>in</strong>10x. Compute the Hermite <strong>in</strong>terpolat<strong>in</strong>g polynomial and the polynomial<br />

<strong>in</strong>terpolant for the data <strong>in</strong> the table. Plot the two <strong>in</strong>terpolat<strong>in</strong>g polynomials together <strong>with</strong><br />

f(x) =e x +s<strong>in</strong>10x on (0, 3).<br />

x 0 0.4 1 2 2.6 3<br />

y 1 0.735 2.17 8.30 14.2 19.1<br />

y ′ 11 -5.04 -5.67 11.5 19.9 21.6<br />

3.4 Piecewise polynomials: spl<strong>in</strong>e <strong>in</strong>terpolation<br />

As we observed <strong>in</strong> Section 3.2, a polynomial <strong>in</strong>terpolant of high degree can have large oscillations,<br />

and thus provide an overall poor approximation to the underly<strong>in</strong>g function. Recall<br />

that the degree of the <strong>in</strong>terpolat<strong>in</strong>g polynomial is directly l<strong>in</strong>ked to the number of data<br />

po<strong>in</strong>ts: we do not have the freedom to choose the degree of the polynomial.<br />

In spl<strong>in</strong>e <strong>in</strong>terpolation, we take a very different approach: <strong>in</strong>stead of f<strong>in</strong>d<strong>in</strong>g a s<strong>in</strong>gle<br />

polynomial that fits the given data, we f<strong>in</strong>d one low-degree polynomial that fits every pair<br />

of data. This results <strong>in</strong> several polynomial pieces jo<strong>in</strong>ed together, and we typically impose<br />

some smoothness conditions on different pieces. The term spl<strong>in</strong>e function means a function<br />

that consists of polynomial pieces jo<strong>in</strong>ed together <strong>with</strong> some smoothness conditions.

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

Saved successfully!

Ooh no, something went wrong!