05.06.1
Chapter 05.05
Spline Method of Interpolation
After reading this chapter, you should be able to:
1.
interpolate data using spline interpolation, and
2.
understand why spline interpolation is important.
What is interpolation?
Many times, data is given only at discrete points such as
,
,
0
0
y
x
1
1
,
y
x
, .
.....
,
1
1
,
n
n
y
x
,
n
n
y
x
,
.
So, how then does one find the value of
y
at any other value of
x
?
Well, a
continuous function
x
f
may be used to represent the
1
n
data values with
x
f
passing
through the
1
n
points (Figure 1).
Then one can find the value of
y
at any other value of
x
.
This is called
interpolation
.
Of course, if
x
falls outside the range of
x
for which the data is given, it is no longer
interpolation but instead is called
extrapolation
.
So what kind of function
x
f
should one choose?
A polynomial is a common
choice for an interpolating function because polynomials are easy to
(A)
evaluate,
(B)
differentiate, and
(C)
integrate
relative to other choices such as a trigonometric and exponential series.
Polynomial interpolation involves finding a polynomial of order
n
that passes
through the
1
n
points.
Several methods to obtain such a polynomial include the direct
method, Newton’s divided difference polynomial method and the Lagrangian interpolation
method.
So is the spline method yet another method of obtaining this
th
n
order polynomial.
…… NO!
Actually, when
n
becomes large, in many cases, one may get oscillatory behavior
in the resulting polynomial.
This was shown by Runge when he interpolated data based on a
simple function of
2
25
1
1
x
y
on an interval of [–1, 1].
For example, take six equidistantly spaced points in [–1, 1] and find
y
at these points as given in Table 1.