You are working with the text-only light edition of "H.Lohninger: Teach/Me Data Analysis, Springer-Verlag, Berlin-New York-Tokyo, 1999. ISBN 3-540-14743-8". Click here for further information.

Curve Fitting by Splines

Cubic splines are a common class of functions which are used in many interpolation applications. The basic idea is to fit cubic polynomials between two neighboring data points while ensuring that certain additional conditions are fulfilled (smooth first and second derivative). Furthermore, the concept of splines can be extended to approximations as well, if we introduce a small extension which results in smoothed splines. A smoothed spline degenerates to a simple linear regression if the smoothing factor approaches its maximum.

Assume that we have n+1 data points [xi, yi] with i=0 to n, and x0 < x1 < .... < xn. Then the function S(x) is called a Cubic Spline if there exist n cubic polynomials si(x) having the coefficients ai,0, ai,1, ai,2, ai,3 that satisfy the following conditions:

Click on this image to experiment with spline interpolation.

Please note that there exists a unique cubic spline (called natural spline) with the boundary conditions S"(x0) = 0 and S"(xn) = 0. The natural spline is the curve obtained by forcing a flexible elastic rod through the points but letting the slope at the ends be free to equilibrate to the position that minimizes the oscillatory behavior of the curve.

Last Update: 2006-Jän-18