Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Spline interpolation


 

In the mathematical subfield of numerical analysis spline interpolation is a special form of interpolation where the interpolant is a piecewise polynomial called spline. Spline interpolation is preferred over polynomial interpolation because the interpolation error can be made small even when using low degree polynomials for the spline. Thus spline interpolation avoids the problem of Runge's phenomenon which occurs when using high degree polynomials.

1 Definition

Given n+1 distinct knots xi such that

with n+1 knot values yi we are trying to find a spline function of degree n

with each Si(x) a polynomial of degree n.

2 Spline interpolant

Using polynomial interpolation the polynomial of degree n which interpolates the data set is uniquely defined by the data points. The spline of degree n which interpolates the same data set is not uniquely defined and we have to fill in n-1 additional degrees of freedom to construct a unique spline interpolant.

3 Linear spline interpolation

Linear spline interpolation is the most simple spline interpolation. Graphically we just connect the data points by straight lines. The spline is just a polygon.

Algebraically each Si is a linear function constructed as

The spline must be continuous at each data point that is

This is the case as we can easily see

4 Quadratic spline interpolation

The quadratic spline can be constructed as

The coefficients can be found by choosing a and then using the recurrence relation:

5 Cubic spline interpolation

To construct a unique cubic inpolating spline for the given data set we have to specify two additional degress of freedom.

The spline is called clamped cubic spline if

for given values u and v.

It is called periodic cubic spline if

And it is called natural cubic spline if

.

The natural cubic spline is approximately the same curve as created by the spline deviceA spline is a long strip of wood (lath) that is fixed in a number of points. In older days splines were often used in shipbuilding to mark the curve of the hull. The lath will then take the shape which minimizes the energy required for bending it between.

5.1 Interpolation using natural cubic spline

It can be defined as

and


.

The coefficients can be found by solving this system of equations:

6 Example

6.1 Linear spline interpolation

Consider the problem of finding a linear spline for

with the following knots

After directly applying the spline formula, we get the following spline:

The spline function (blue lines) and the function it is approximating (red dots) are graphed below:



Read more »

Non User