# Putting Cubic B-Splines into Standard Polynomial Form

Lately I have been working on an implementation of monotone smoothing splines, based on [1]. As the title suggests, this technique is based on a univariate cubic B-spline. The form of the spline function used in the paper is as follows:

The knot points _{j}_{3}(t)_{i}(t)

I’m interested in providing an interpolated splines using the Apache Commons Math API, in particular the PolynomialSplineFunction class. In principle the above is clearly such a polynomial, but there are a few hitches.

`PolynomialSplineFunction`

wants its knot intervals in closed standard polynomial formax ^{3}+ bx^{2}+ cx + d- It wants each such polynomial expressed in the translated space
(x-K , where_{j})K is the greatest knot point that is <= x._{j} - The actual domain of S(x) is
K . The first 3 “negative” knots are there to make the summation for S(x) cleaner._{0}... K_{m-1}`PolynomialSplineFunction`

needs its functions to be defined purely on the actual domain.

Consider the arguments to _{3}_{j-1}_{j}_{j}

We can apply this same manipulation to show that the arguments to _{3}_{j}

By the definition of _{3}_{3}(t)_{j-3} ... K_{j}

This suggests a way to manipulate the equations into a standard form. In the transformed space t, the four nonzero terms are:

and by plugging in the appropriate _{i}

Now, `PolynomialSplineFunction`

is going to automatically identify the appropriate _{j}*that* transform as _{j}

I substitute the argument (αu) into the definitions of the four _{i}

Lastly, collecting like terms gives me the standard-form coefficients that I need for `PolynomialSplineFunction`

:

Now I am equipped to return a `PolynomialSplineFunction`

to my users, which implements the cubic B-spline that I fit to their data. Happy computing!

#### References

[1] H. Fujioka and H. Kano: Monotone smoothing spline curves using normalized uniform cubic B-splines, Trans. Institute of Systems, Control and Information Engineers, Vol. 26, No. 11, pp. 389–397, 2013