Documentation |
On this page… |
---|
Polynomials are the approximating functions of choice when a smooth function is to be approximated locally. For example, the truncated Taylor series
$$\sum _{i=0}^{n}{\left(x-a\right)}^{i}{D}^{i}f(a)/i!$$
provides a satisfactory approximation for f(x) if f is sufficiently smooth and x is sufficiently close to a. But if a function is to be approximated on a larger interval, the degree, n, of the approximating polynomial may have to be chosen unacceptably large. The alternative is to subdivide the interval [a..b] of approximation into sufficiently small intervals [ξ_{j}..ξ_{j+1}], with a = ξ_{1}<··· <ξ_{l+1} = b, so that, on each such interval, a polynomial p_{j} of relatively low degree can provide a good approximation to f. This can even be done in such a way that the polynomial pieces blend smoothly, i.e., so that the resulting patched or composite function s(x) that equals p_{j}(x) for x∊[ξ_{j} ξ_{j+1}], all j, has several continuous derivatives. Any such smooth piecewise polynomial function is called a spline. I.J. Schoenberg coined this term because a twice continuously differentiable cubic spline with sufficiently small first derivative approximates the shape of a draftsman's spline.
There are two commonly used ways to represent a polynomial spline, the ppform and the B-form. In this toolbox, a spline in ppform is often referred to as a piecewise polynomial, while a piecewise polynomial in B-form is often referred to as a spline. This reflects the fact that piecewise polynomials and (polynomial) splines are just two different views of the same thing.
The ppform of a polynomial spline of order k provides a description in terms of its breaks ξ_{1}..ξ_{l+1} and the local polynomial coefficients c_{ji} of its l pieces.
$$\begin{array}{cc}{p}_{j}\left(x\right)={{\displaystyle \sum _{i=1}^{k}\left(x-{\xi}_{j}\right)}}^{k-i}{c}_{ji},& j=1:l\end{array}$$
For example, a cubic spline is of order 4, corresponding to the fact that it requires four coefficients to specify a cubic polynomial. The ppform is convenient for the evaluation and other uses of a spline.
The B-form has become the standard way to represent a spline during its construction, because the B-form makes it easy to build in smoothness requirements across breaks and leads to banded linear systems. The B-form describes a spline as a weighted sum
$$\sum _{j=1}^{n}{B}_{j,k}{a}_{j}$$
of B-splines of the required order k, with their number, n, at least as big as k–1 plus the number of polynomial pieces that make up the spline. Here, B_{j,k }= B (·|t_{j}, ...,t_{j}_{+}_{k}) is the jth B-spline of order k for the knot sequence t_{1}≤t_{2}≤··· ≤t_{n}_{+}_{k}. In particular, B_{j,k} is piecewise-polynomial of degree < k, with breaks t_{j}, ...,t_{j}_{+}_{k} , is nonnegative, is zero outside the interval [t_{j}, ..t_{j}_{+}_{k}], and is so normalized that
$$\begin{array}{ccc}{\displaystyle \sum _{j=1}^{n}{B}_{j,k}\left(x\right)}=1& on& \left[{t}_{k}\mathrm{..}{t}_{n+1}\right]\end{array}$$
The multiplicity of the knots governs the smoothness, in the following way: If the number τ occurs exactly r times in the sequence t_{j},...t_{j+k}, then B_{j,k} and its first k-r-1 derivatives are continuous across the break τ, while the (k-r)th derivative has a jump at τ. You can experiment with all these properties of the B-spline in a very visual and interactive way using the command bspligui.