03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

5.1. POLYNOMIAL INTERPOLATION 65<br />

Supposing for an instant that the constants c k were known, this provides a better way of<br />

calculating p n (t) at arbitrary t. By “better” we mean requiring few multiplications and additions.<br />

This nested calculation is performed iteratively:<br />

v 0 = c n<br />

v 1 = c n−1 + (t − x n−1 )v 0<br />

v 2 = c n−2 + (t − x n−2 )v 1<br />

.<br />

v n = c 0 + (t − x 0 )v n−1<br />

This requires only n multiplications and 2n additions. Compare this with the number required<br />

for using the Lagrange form: at least n 2 additions and multiplications.<br />

5.1.4 Divided Differences<br />

It turns out that the coefficients c k for Newton’s nested form can be calculated relatively easily by<br />

using divided differences. We assume, for the remainder of this section, that we are considering<br />

interpolating a function, that is, we have values of f(x i ) at the nodes x i .<br />

Definition 5.5 (Divided Differences). For a given collection of nodes {x i } n i=0<br />

and values<br />

{f(x i )} n x=0 , a kth order divided difference is a function of k + 1 (not necessarily distinct) nodes,<br />

written as<br />

f [x i0 , x i1 , . . . , x ik ]<br />

The divided differences are defined recursively as follows:<br />

• The 0 th order divided differences are simply defined:<br />

f [x i ] = f(x i ).<br />

• Higher order divided differences are the ratio of differences:<br />

f [x i0 , x i1 , . . . , x ik ] = f [x i 1<br />

, x i2 , . . . , x ik ] − f [ x i0 , x i1 , . . . , x ik−1<br />

]<br />

x ik − x i0<br />

We care about divided differences because coefficients for the Newton nested form are divided<br />

differences:<br />

c k = f [x 0 , x 1 , . . . , x k ] . (5.3)<br />

Because we are only interested in the Newton method coefficients, we will only consider divided<br />

differences with successive nodes, i.e., those of the form f [x j , x j+1 , . . . , x j+k ]. In this case the<br />

higher order differences can more simply be written as<br />

f [x j , x j+1 , . . . , x j+k ] = f [x j+1, x j+2 , . . . , x j+k ] − f [x j , x j+1 , . . . , x j+k−1 ]<br />

x j+k − x j

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

Saved successfully!

Ooh no, something went wrong!