Spline Interpolation - Algorithm To Find The Interpolating Cubic Spline

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

\frac {k_{i-1}}{x_i-x_{i-1}} + \left(\frac {1}{x_i-x_{i-1}}+ \frac {1}{{x_{i+1}-x_i}}\right)\ 2k_i+
\frac {k_{i+1}}{{x_{i+1}-x_i}} = 3\ \left(\frac {y_i - y_{i-1}}{{(x_i-x_{i-1})}^2}+\frac {y_{i+1} - y_i}{{(x_{i+1}-x_i)}^2}\right)

(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:

    Truly speaking, it is not instruction, but provocation, that I can receive from another soul. What he announces, I must find true in me, or reject; and on his word, or as his second, be he who he may, I can accept nothing.
    Ralph Waldo Emerson (1803–1882)

    Mining today is an affair of mathematics, of finance, of the latest in engineering skill. Cautious men behind polished desks in San Francisco figure out in advance the amount of metal to a cubic yard, the number of yards washed a day, the cost of each operation. They have no need of grubstakes.
    Merle Colby, U.S. public relief program (1935-1943)