Algorithm To Find The Interpolating Cubic Spline
A third order polynomial for which
can be written in the symmetrical form
|
(1) |
where
|
(2) |
and
|
(3) |
|
(4) |
As one gets that
|
(5) |
|
(6) |
Setting and in (5) and (6) one gets from (2) that indeed, and that
|
(7) |
|
(8) |
If now
are n+1 points and
|
(9) |
where
are n third degree polynomials interpolating in the interval, for such that
for
then the n polynomials together define a differentiable function in the interval and
|
(10) |
|
(11) |
for where
|
(12) |
|
(13) |
|
(14) |
If the sequence is such that in addition
for
the resulting function will even have a continuous second derivative.
From (7), (8), (10) and (11) follows that this is the case if and only if
|
(15) |
for
The relations (15) are n-1 linear equations for the n+1 values .
For the elastic rulers being the model for the spline interpolation one has that to the left of the left-most "knot" and to the right of the right-most "knot" the ruler can move freely and will therefore take the form of a straight line with . As should be a continuous function of one gets that for "Natural Splines" one in addition to the n-1 linear equations (15) should have that
i.e. that
|
(16) |
|
(17) |
(15) together with (16) and (17) constitute n+1 linear equations that uniquely define the n+1 parameters .
Read more about this topic: Spline Interpolation
Famous quotes containing the words find and/or cubic:
“I now know all the people worth knowing in America, and I find no intellect comparable to my own.”
—Margaret Fuller (18101850)
“One of the great natural phenomena is the way in which a tube of toothpaste suddenly empties itself when it hears that you are planning a trip, so that when you come to pack it is just a twisted shell of its former self, with not even a cubic millimeter left to be squeezed out.”
—Robert Benchley (18891945)