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

for [a 0 , ..., a n ] T where [·] T stands for the transpose of the vector. The coefficient matrix A is<br />

known as the van der Monde matrix. This is usually an ill-conditioned matrix, which means<br />

solv<strong>in</strong>g the system of equations could result <strong>in</strong> large error <strong>in</strong> the coefficients a i . An <strong>in</strong>tuitive<br />

way to understand the ill-condition<strong>in</strong>g is to plot several basis monomials, and note how less<br />

dist<strong>in</strong>guishable they are as the degree <strong>in</strong>creases, mak<strong>in</strong>g the columns of the matrix nearly<br />

l<strong>in</strong>early dependent.<br />

Figure 3.1: Monomial basis functions<br />

Solv<strong>in</strong>g the matrix equation Aa = b could also be expensive. Us<strong>in</strong>g Gaussian elim<strong>in</strong>ation<br />

to solve the matrix equation for a general matrix A requires O(n 3 ) operations. This means<br />

the number of operations grows like Cn 3 , where C is a positive constant. 1 However, there<br />

are some advantages to the monomial form: evaluat<strong>in</strong>g the polynomial is very efficient us<strong>in</strong>g<br />

Horner’s method, which is the nested form discussed <strong>in</strong> Exercises 1.3-4, 1.3-5 of Chapter 1,<br />

requir<strong>in</strong>g O(n) operations. Differentiation and <strong>in</strong>tegration are also relatively efficient.<br />

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

The ill-condition<strong>in</strong>g of the van der Monde matrix, as well as the high complexity of solv<strong>in</strong>g<br />

the result<strong>in</strong>g matrix equation <strong>in</strong> the monomial form of polynomial <strong>in</strong>terpolation, motivate us<br />

to explore other basis functions for polynomials. As before, we start <strong>with</strong> data (x i ,y i ),i =<br />

0, 1, ..., n, and call our <strong>in</strong>terpolat<strong>in</strong>g polynomial of degree at most n, p n (x). The Lagrange<br />

1 The formal def<strong>in</strong>ition of the big O notation is as follows: We write f(n) =O(g(n)) as n →∞if and<br />

only if there exists a positive constant M and a positive <strong>in</strong>teger n ∗ such that |f(n)| ≤Mg(n) for all n ≥ n ∗ .

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

Saved successfully!

Ooh no, something went wrong!