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.

78 CHAPTER 6. SPLINE INTERPOLATION<br />

6<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

Figure 6.1: A linear spline. The spline is piecewise linear, and is linear between each knot.<br />

6.1.1 First Degree Spline Accuracy<br />

As with polynomial functions, splines are used to interpolate tabulated data as well as functions. In<br />

the latter case, if the spline is being used to interpolate the function f, say, then this is equivalent<br />

to interpolating the data<br />

t t 0 t 1 . . . t n<br />

y f(t 0 ) f(t 1 ) . . . f(t n )<br />

A function and its linear spline interpolant are shown in Figure 6.2. The spline interpolant in<br />

that figure is fairly close to the function over some of the interval in question, but it also deviates<br />

greatly from the function at other points of the interval. We are interested in finding bounds on<br />

the possible error between a function and its spline interpolant.<br />

To find the error bound, we will consider the error on a single interval of the partition, and use<br />

a little calculus. 1 Suppose p(t) is the linear polynomial interpolating f(t) at the endpoints of the<br />

subinterval [t i , t i+1 ], then for t ∈ [t i , t i+1 ] ,<br />

|f(t) − p(t)| ≤ max {|f(t) − f(t i )| , |f(t) − f(t i+1 )|} .<br />

That is, |f(t) − p(t)| is no larger than the “maximum variation” of f(t) on this interval.<br />

In particular, if f ′ (t) exists and is bounded by M 1 on [t i , t i+1 ], then<br />

|f(t) − p(t)| ≤ M 1<br />

2 (t i+1 − t i ) .<br />

Similarly, if f ′′ (t) exists and is bounded by M 2 on [t i , t i+1 ], then<br />

|f(t) − p(t)| ≤ M 2<br />

8 (t i+1 − t i ) 2 .<br />

Over a given partition, these become, respectively<br />

1 Although we could directly claim Theorem 5.8, it is a bit of overkill.

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

Saved successfully!

Ooh no, something went wrong!