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

Interpolation<br />

In this chapter, we will study the follow<strong>in</strong>g problem: given data (x i ,y i ),i=0, 1, ..., n, f<strong>in</strong>d a<br />

function f such that f(x i )=y i . This problem is called the <strong>in</strong>terpolation problem, and f is<br />

called the <strong>in</strong>terpolat<strong>in</strong>g function, or <strong>in</strong>terpolant, for the given data.<br />

Interpolation is used, for example, when we use mathematical software to plot a smooth<br />

curve through discrete data po<strong>in</strong>ts, when we want to f<strong>in</strong>d the <strong>in</strong>-between values <strong>in</strong> a table,<br />

or when we differentiate or <strong>in</strong>tegrate black-box type functions.<br />

Howdowechoosef? Or, what k<strong>in</strong>d of function do we want f to be? There are several<br />

options. Examples of functions used <strong>in</strong> <strong>in</strong>terpolation are polynomials, piecewise polynomials,<br />

rational functions, trigonometric functions, and exponential functions. As we try to f<strong>in</strong>d a<br />

good choice for f for our data, some questions to consider are whether we want f to <strong>in</strong>herit<br />

the properties of the data (for example, if the data is periodic, should we use a trigonometric<br />

function as f?), and how we want f behave between data po<strong>in</strong>ts. In general f should be<br />

easy to evaluate, and easy to <strong>in</strong>tegrate & differentiate.<br />

Here is a general framework for the <strong>in</strong>terpolation problem. We are given data, and we<br />

pick a family of functions from which the <strong>in</strong>terpolant f will be chosen:<br />

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

• Family: Polynomials, trigonometric functions, etc.<br />

Suppose the family of functions selected forms a vector space. Pick a basis for the vector<br />

space: φ 0 (x),φ 1 (x), ..., φ n (x). Then the <strong>in</strong>terpolat<strong>in</strong>g function can be written as a l<strong>in</strong>ear<br />

comb<strong>in</strong>ation of the basis vectors (functions):<br />

f(x) =<br />

n∑<br />

a k φ k (x).<br />

k=0<br />

88

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

Saved successfully!

Ooh no, something went wrong!