|
- Another type of a two times differentiable piecewise interpolation of a finite
data set (xi,yi), i=1,...,n with strictly increasing xi
is obtained from the spline under tension, whose physical model is a thin
elastic rod with fixed position at a set of points under a tension force applied
to its two ends (this corresponds to the parameter σ appearing in the following).
This spline, called s here, is defined by the following set of conditions:
s(x)=si(x) for xi<=x<=xi+1 (piecewise definition)
si"(x)-σ2si(x)=
((xi+1-x)*(Mi-σ2yi)+(x-xi)*
(Mi+1-σ2yi+1))/(xi+1-xi)
a second order ode for si on the interval
xi<=x<=xi+1
Mi = s"(xi) (the so called bending moments)
si(xi)=yi, si(xi+1)=yi+1 (the required two boundary conditions which produce the
interpolation)
s'''(x0)=0, s'''(xn)=0, the two additional conditions making this unique
s'i(xi+1)=s'i+1(xi+1), i=0,...,n-1 continuity of s',
fixing the Mi
(The continuity of s follows from the interpolation conditions and continuity of s''
from the construction of the differential equation)
- Hence s is two times continuously differentiable. Its ''pieces'' are obtained from
linear two point boundary value problems. The solution manifold of the homogeneous form
of the differential equation has a solution manifold made up from exp(-σ*x), exp(σ*x)
(or cosh(σ*x), sinh(σ*x)).
Hence si is composed from the homogeneous solution and
a linear function
(since the right
hand side of the differential equation is a linear function, we can find a special
inhomogeneous solution of this type.)
For the representation of si one can equally well use sinh(σ*(x-xi)) and sinh(σ*(xi+1-x)) ,
as is done here.
- The unknowns Mi are obtained from a linear system of equations with a tridiagonal
structure. But for larger σ this becomes, contrary to the polynomial spline, quite illconditioned.
- With the tension force σ increasing to infinity this spline approaches the piecewise
linear arc connecting the given data points.
- Hence using an appropriate σ one can compromise between goodness of interpolation error
and curvature of the interpolating function.
- For σ = 0 one gets the classical natural cubic spline if one replaces the
end conditions used here (for better approximation) by s"(x0)=0, s"(xn)=0.
- The computational code used here is fitpack from netlib.
|