A note on some bounds between cubic spline interpolants depending on the boundary conditions: Application to a monotonicity property

In the context of cubic splines, the authors have contributed to a recent paper dealing with the computation of nonlinear derivatives at the interior nodes so that monotonicity is enforced while keeping the order of approximation of the spline as high as possible. During the review process of that paper, one of the reviewers raised the question of whether a cubic spline interpolating monotone data could be forced to preserve monotonicity by imposing suitable values of the first derivative at the endpoints. Albeit a negative answer appears to be intuitive, we have found no results regarding this fact. In this short work we prove that the answer to that question is actually negative.


Introduction
Approximation techniques are used in applications as design of curves, surfaces, robotics, creation of pieces in industry In many applications that use approximations of given data by means of smooth curves or surfaces, additional properties like monotonicity and convexity preservation are often required.In particular, interpolation by cubic splines is a well-known technique that provides twice continuously differentiable curves.The problem consists on constructing a piecewise polynomial with equal first and second derivative values at the nodes, so that the interpolant is globally twice continuously differentiable.
In order to solve the problem, values for the first or second derivative at the boundary points are necessary.For natural splines, the values for the second derivative at the endpoints are set to zero, while for interpolating splines first derivative values are forced to coincide with those of the function derivative at the endpoint.
Splines do not preserve data monotonicity and consequently many works have dealt with the problem of monotonicitypreserving spline interpolation, being [1] a seminal paper on the matter.
The authors have participated in a contribution [2] where a monotonicity-preserving reconstruction is proposed using nonlinear reconstructions of the first derivatives at the interior points.During the review process of the paper one of the reviewers raised the following question: By changing the first derivative at the endpoints of the interval, is it possible to find twice continuously differentiable monotonicity preserving cubic spline interpolants?
In this note we show that the answer to this question is negative.We first prove a bound on the distance between two splines that interpolate the same data but differ on the values imposed at the boundary.We then show that monotonicity preservation is not possible by simply changing these boundary data.The paper is organized as follows: in Section 2 we introduce the notation and basic facts about cubic splines.In Section 3 we prove the main result and in Section 4 the main result of the paper stating that finding a monotonicity-preserving cubic spline by manipulating the derivative values at the interval endpoints is not always possible.

Notation. Cubic splines in Hermite form
We use the same notation as in [2].We start with the problem of piecewise cubic Hermite interpolation.Let x 1 < x 2 < . . .< x n be a partition of the interval [x 1 , x n ] and let f i = f (x i ) be the values of a certain function at the knots {x i } n i=1 .Given approximate values of the first derivative of f at the knots, denoted by { ḟi } n i=1 , the problem is to construct a piecewise cubic polynomial function P (x), composed by n − 1 cubic polynomial pieces P i (x) respectively defined on the intervals [x i , x i+1 ], that satisfy P (x i ) = f i , P (x i+1 ) = f i+1 , P ′ (x i ) = ḟi , P ′ (x i+1 ) = ḟi+1 , for 1 ≤ i < n.If we denote as ∆f i = f i+1 − f i and m i = ∆f i /h i , where h i = x i+1 − x i are the mesh spacings and ĥ = max i=1,...,n−1 (h i ), then, the i-th polynomial P i (x), x ∈ [x i , x i+1 ] (see [3] for details), has the form where Cubic splines are constructed by computing approximate derivative values that enforce continuity of the second derivative, by solving the following problem: with i = 1, . . ., n − 2, where ḟ1 and ḟn are given boundary conditions at the interval endpoints.
It is easy to get that ( 2)-( 3) corresponds to the following linear system (see more details in [2]): where We can write the system in matrix form as A Ḟ = B, with Ḟ = ḟ2 , ḟ3 , . . ., ḟn−1 The system matrix is strictly diagonally dominant and hence non-singular.If we denote by The structure of the entries of the matrix A −1 is crucial to prove that the images of two splines with different conditions (3) become more and more similar as the points get far from the boundary.We state a result (a particular case of the result in [4]) that provides a bound on the values and let A ∈ R (n−2)×(n−2) be the matrix defined by (5).Then

Distance between two spline interpolations with different boundary conditions
In this section we apply Lemma 2.1 to compute a bound on the distance between two splines constructed using different boundary values.Proposition 3.1.Let P (x) and P (x) be the cubic spline interpolants of the form (1) for the data {x i , f (x i ), ḟi } and ˙ f i = ḟi for 1 < i < n (computed by solving system (5)) and ˙ f i = ḟi for i = 1, n.For 2 ≤ i ≤ n − 2, P i (x) and P i (x) denote the corresponding polynomial pieces for each spline.Then the following inequality holds: Proof.Let us start calculating The distance between P i (x) and P i (x) for all x ∈ [x i , x i+1 ], i = 2, . . ., n − 2, can be obtained with: Finally, by Lemma 2.1 it holds As a consequence of Proposition 3.1 we can prove the following result regarding the order of approximation of the spline (known result, showed e.g. in [5]).
Let P (x) be the interpolating spline of f and P be another cubic spline constructed with the same data as P (x) except for the first derivative values at the interval endpoints that can take any value.If there exist K, p > 0, such that ĥ/h j ≤ K for all j = 1, . . ., n − 1 and Ω := {i ∈ N : −p log 2 ( ĥ) < i < n + p log 2 ( ĥ)} = ∅ then Proof.If P is the spline interpolator constructed with the solution of system A Ḟ = B defined in (5) On the other hand, i ∈ Ω implies 2 −i < ĥp and 2 n−i < ĥp .The result hence follows from Proposition 3.1.

Main result
In this section we show that given a cubic spline that does not preserve data monotonicity, is it not always possible to obtain another cubic spline that does by only changing the first derivative at the endpoints.We recall following theorem [1]: Theorem 4.1.(Necessary conditions for monotonicity.)Let P i be a monotone cubic Hermite interpolant of the data {(x i , f i , ḟi ), (x i+1 , f i+1 , ḟi+1 )}.Then: Furthermore, if m i = 0 then P i is monotone (constant) if and only if ḟi = ḟi+1 = 0.
We prove the main proposition of the paper.
Proposition 4.2.Let n be an odd number and {(x i , f i )} n i=1 , with f 1 ≤ f 2 ≤ . . .≤ f n be the data used to construct a spline P by solving the system given in Eq. ( 5) with given boundary data ḟ1 , ḟn which satisfies: and If a new spline P is constructed with the same data as P but changing the values ḟ1 and ḟn by ˙ f 1 and ˙ f n then P 2 ) − f i0+1 > 0, i.e., the new spline is not monotone.
Proof.As f 1 ≤ . . .≤ f n , in order to obtain a monotone spline we have that any approximation to the first derivative at any node has to be higher or equal to 0 by Theorem 4.1.By Lemma 2.1 it holds A −1 1,1 , A −1 1,n−2 > 0 since n is an odd number.Thus, we get The same argument applies to any spline P that is monotone in [x 1 , x 2 ] and [x n−1 , x n ] and then the same conditions have to be satisfied by P i.e. 0 ≤ ˙ By hypothesis we know that We take ε : If we denote as ˙ f i0 , ˙ f i0+1 the new values obtained by changing the first derivative values ḟ1 and ḟn by ˙ f 1 and ˙ f n , then, according to (9) the distance with the original derivative approximation is: Finally, As a conclusion we remark that the form of the matrix A in (5) and its inverse lead to splines that are close to each other in intervals far from the boundary when different values for the first derivatives are set at the endpoints.
Acknowlegments: We thank the reviewer of [2] who raised the question that inspired this paper.