Chapter 3
Interpolation
Interpolation is the process of deﬁning a function that takes on speciﬁed values at
speciﬁed points. This chapter concentrates on two closely related interpolants: the
piecewise cubic spline and the shapepreserving piecewise cubic named “pchip.”
3.1
The Interpolating Polynomial
We all know that two points determine a straight line. More precisely, any two
points in the plane, (
x
1
,y
1
) and (
x
2
,y
2
), with
x
1
6
=
x
2
, determine a unique ﬁrst
degree polynomial in
x
whose graph passes through the two points. There are
many diﬀerent formulas for the polynomial, but they all lead to the same straight
line graph.
This generalizes to more than two points.
Given
n
points in the plane,
(
x
k
,y
k
)
,k
= 1
,...,n
, with distinct
x
k
’s, there is a unique polynomial in
x
of degree
less than
n
whose graph passes through the points. It is easiest to remember that
n
,
the number of data points, is also the number of coeﬃcients, although some of the
leading coeﬃcients might be zero, so the degree might actually be less than
n

1.
Again, there are many diﬀerent formulas for the polynomial, but they all deﬁne the
same function.
This polynomial is called the
interpolating
polynomial because it exactly re
produces the given data:
P
(
x
k
) =
y
k
, k
= 1
,...,n.
Later, we examine other polynomials, of lower degree, that only approximate the
data. They are
not
interpolating polynomials.
The most compact representation of the interpolating polynomial is the
La
grange
form
P
(
x
) =
X
k
Y
j
6
=
k
x

x
j
x
k

x
j
y
k
.
February 15, 2008
1