본문 펼치기
The version of record of this article, first published in Applied Numerical Mathematics, is available online at Publisher’s
website:
[https://doi.org/10.1016/j.apnum.2022.06.012](https://doi.org/10.1016/j.apnum.2022.06.012)
## A note on some bounds between cubic spline interpolants depending on the boundary conditions: Application to a monotonicity property
Antonio Baeza <sup>a,∗</sup>, Dionisio F. Y´a˜nez <sup>a</sup>
aDepartament de Matem`atiques, Universitat de Val`encia, 46100, Burjassot (Spain)
Abstract
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.
Keywords: Cubic spline, boundary conditions, order of approximation, monotonicity
1. 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.
2. 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
x1 < x2 < . . . < xn be a partition of the interval [x1, xn] and let fi = f (xi) be the values of a certain function
⋆Funding: This research has been supported by grant PID2020-117211GB-I00 funded by MCIN/AEI/10.13039/501100011033.
∗Corresponding author.
Email addresses: antonio.baeza@uv.es (Antonio Baeza), dionisio.yanez@uv.es (Dionisio F. Y´a˜nez)
Preprint submitted to Elsevier Received: date / Accepted: date
<sup>n</sup> i=1 <sup>.</sup> <sup>Given</sup> <sup>approximate</sup> <sup>values</sup> <sup>of</sup> <sup>the</sup> <sup>first</sup> <sup>derivative</sup> <sup>of</sup> <sup>f</sup> <sup>at</sup> <sup>the</sup> <sup>knots,</sup> <sup>denoted</sup> <sup>by</sup> <sup>{f˙i}n</sup> i
at the knots {xi} <sup>n</sup> i
at the knots {xi} <sup>n</sup> i=1 <sup>.</sup> <sup>Given</sup> <sup>approximate</sup> <sup>values</sup> <sup>of</sup> <sup>the</sup> <sup>first</sup> <sup>derivative</sup> <sup>of</sup> <sup>f</sup> <sup>at</sup> <sup>the</sup> <sup>knots,</sup> <sup>denoted</sup> <sup>by</sup> <sup>{f˙i}n</sup> i=1 <sup>,</sup> <sup>the</sup>
problem is to construct a piecewise cubic polynomial function P (x), composed by n − 1 cubic polynomial pieces Pi(x)
respectively defined on the intervals [xi, xi+1], that satisfy P (xi) = fi, P (xi+1) = fi+1, P <sup>′</sup> (xi) = f <sup>˙</sup> i, P <sup>′</sup> (xi+1) = f <sup>˙</sup> i+1,
for 1 ≤ i < n. If we denote as ∆fi = fi+1 - fi and mi = ∆fi/hi, where hi = xi+1 - xi are the mesh spacings and
hˆ = maxi=1,...,n−1(hi), then, the i-th polynomial Pi(x), x ∈ [xi, xi+1] (see [3] for details), has the form
Pi(x) = c <sup>i</sup> 1 <sup>+ c</sup> 2 <sup>i</sup> <sup>(x −</sup> <sup>xi) + ci</sup> 3 <sup>(x −</sup> <sup>xi)2 + ci</sup> 4 <sup>(x −</sup> <sup>xi)2(x −</sup> <sup>xi+1),</sup> (1)
where c <sup>i</sup> 1 <sup>:= fi, ci</sup> 2 <sup>:= f</sup> <sup>[xi, xi] =</sup> <sup>f˙i, ci</sup> 3 <sup>:= f</sup> <sup>[xi, xi, xi+1] = (mi</sup> <sup>−</sup> <sup>f˙i)/hi, ci</sup> 4 <sup>:= f</sup> <sup>[xi, xi, xi+1, xi+1] = (f˙i+1</sup> <sup>+</sup> <sup>f˙i</sup> <sup>−</sup> <sup>2mi)/h2</sup> i <sup>.</sup>
Cubic splines are constructed by computing approximate derivative values that enforce continuity of the second
derivative, by solving the following problem:
i <sup>′′(xi+1) = P</sup> i <sup>′′</sup>
Pi <sup>′′</sup>
P1 <sup>′</sup>
n <sup>′</sup> −1 <sup>(xn) =</sup> <sup>f˙n,</sup> (3)
i <sup>′′</sup> +1 <sup>(xi+1),</sup> (2)
1 <sup>′(x1) =</sup> <sup>f˙1,</sup> Pn <sup>′</sup>
with i = 1, . . ., n − 2, where f <sup>˙</sup> 1 and f <sup>˙</sup> 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]):
2 f <sup>˙</sup> 2 + µ1 f <sup>˙</sup> 3 = 3 (λ1 m1 + µ1 m2) − λ1 f <sup>˙</sup> 1 =: b1,
λi f <sup>˙</sup> i + 2 f <sup>˙</sup> i+1 + µi f <sup>˙</sup> i+2 = 3 (λi mi + µi mi+1) =: bi, i = 2, . . ., n − 3,
λn−2 f <sup>˙</sup> n−2 + 2 f <sup>˙</sup> n−1 = 3 (λn−2 mn−2 + µn−2 mn−1) − µn−2 f <sup>˙</sup> n =: bn−2,
where λi = hih+ih+1i+1 <sup>,</sup> <sup>µi</sup> <sup>=</sup> hi+hhii+1 <sup>,</sup> <sup>λi + µi</sup> <sup>= 1,</sup> <sup>i = 1, . . ., n −</sup> <sup>2.</sup>
and
�T
We can write the system in matrix form as AF <sup>˙</sup> = B, with F <sup>˙</sup> =
f˙2, f˙3, . . ., f˙n−1
(4)
. (5)
3(λ1 m1 + µ1 m2) − λ1 f <sup>˙</sup> 1
3(λ2 m2 + µ2 m3)
3(λ3 m3 + µ3 m4)
...
3(λn−4 mn−4 + µn−4 mn−3)
3(λn−3 mn−3 + µn−3 mn−2)
3(λn−2 mn−2 + µn−2 mn−1) − µn−2f <sup>˙</sup> n
=
A =
2 µ1
λ2 2 µ2
λ3 2 µ3
... ... ...
λn−3 2 µn−3
λn−2 2
, B =
b1
b2
b3
...
bn−4
bn−1
bn−2
The system matrix is strictly diagonally dominant and hence non-singular. If we denote by A <sup>−</sup> i,j <sup>1</sup>
The system matrix is strictly diagonally dominant and hence non-singular. If we denote by A <sup>−</sup> i,j <sup>1,</sup> <sup>1 ≤</sup> <sup>i, j</sup> <sup>≤</sup> <sup>n −</sup> <sup>2</sup> <sup>the</sup>
entries of the matrix A <sup>−1</sup> we have
f˙i =
n−2
�j=1
A <sup>−</sup> i− <sup>1</sup> 1,j <sup>bj,</sup> 2 ≤ i ≤ n − 1. (6)
The structure of the entries of the matrix A <sup>−1</sup> 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 A <sup>−</sup> i,j <sup>1.</sup>
Lemma 2.1. Let 0 ≤ µi, λi ≤ 1 with 1 ≤ i ≤ n − 2 be such that
λi + µi = 1 i = 1, . . ., n − 2,
and let A ∈ R <sup>(n−2)×(n−2)</sup> be the matrix defined by (5). Then
0 < (−1) <sup>i−j</sup> A <sup>−</sup> ij <sup>1</sup> <sup>≤</sup> <sup>2</sup> 1 ≤ i, j ≤ n − 2.
3 <sup>· 2−|i−j|,</sup>
3. 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.
2
Proposition 3.1. Let P (x) and P <sup>�</sup> (x) be the cubic spline interpolants of the form (1) for the data {xi, f (xi), f <sup>˙</sup> i} and
{xi, f (xi), f <sup>˙�</sup> i} <sup>n</sup> i=1 <sup>respectively,</sup> <sup>with</sup> <sup>f˙�</sup> i <sup>=</sup> <sup>f˙i</sup> <sup>for</sup> <sup>1</sup> <sup><</sup> <sup>i</sup> <sup><</sup> <sup>n</sup> <sup>(computed</sup> <sup>by</sup> <sup>solving</sup> <sup>system</sup> <sup>(5))</sup> <sup>and</sup> <sup>f˙�</sup> i̸ <sup>=</sup> <sup>f˙i</sup> <sup>for</sup> <sup>i</sup> <sup>=</sup> <sup>1, n.</sup>
Proposition
{xi, f (xi), f <sup>˙�</sup> i} <sup>n</sup> i ̸
For 2 ≤ i ≤ n
Proposition 3.1. Let P (x) and P <sup>�</sup> (x) be the cubic spline interpolants of the form (1) for the data {xi, f (xi), f <sup>˙</sup> i} and
{xi, f (xi), f <sup>˙�</sup> i} <sup>n</sup> i=1 <sup>respectively,</sup> <sup>with</sup> <sup>f˙�</sup> i <sup>=</sup> <sup>f˙i</sup> <sup>for</sup> <sup>1</sup> <sup><</sup> <sup>i</sup> <sup><</sup> <sup>n</sup> <sup>(computed</sup> <sup>by</sup> <sup>solving</sup> <sup>system</sup> <sup>(5))</sup> <sup>and</sup> <sup>f˙�</sup> i̸ <sup>=</sup> <sup>f˙i</sup> <sup>for</sup> <sup>i</sup> <sup>=</sup> <sup>1, n.</sup>
inequality holds:
For 2 ≤ i ≤ n − 2, Pi(x) and P <sup>�</sup> i(x) denote the corresponding polynomial pieces for each spline. Then the following
(7)
|calculatingPi(x) − P <sup>�</sup> i(x)| ≤ 8hi(2 <sup>−i</sup> λ1|f <sup>˙�</sup> 1 − f <sup>˙</sup> 1| + µn−22 <sup>i−n</sup> |f <sup>˙�</sup> n − f <sup>˙</sup> n|), ∀ x ∈ [xi, xi+1].
Proof. Let us start calculating
(8)
Then, for 2 ≤ i ≤b1n − − <sup>�</sup> b11 =it λholds1( f <sup>˙�</sup> 1 − f <sup>˙</sup> 1), bi − <sup>�</sup> bi = 0, 2 ≤ i ≤ n − 1, bn−2 − <sup>�</sup> bn−2 = µn−2( f <sup>˙�</sup> n − f <sup>˙</sup> n).
<sup>−</sup> i− <sup>1</sup> 1,j <sup>(bj</sup> <sup>−</sup> <sup>�bj) = A−</sup> i− <sup>1</sup>
A <sup>−</sup> i− <sup>1</sup> 1,j <sup>�bj</sup> <sup>=</sup>
f˙i − f <sup>˙</sup> - i =
n−2
�j=1
(9)
<sup>−</sup> i− <sup>1</sup> 1,n−2 <sup>µn−2( ˙f�</sup> n <sup>−</sup> <sup>f˙n).</sup>
n−2
�j=1
<sup>−</sup> i− <sup>1</sup> 1,1 <sup>λ1( ˙f�</sup> 1 <sup>−</sup> <sup>f˙1) + A−</sup> i− <sup>1</sup> 1
A <sup>−</sup> i− <sup>1</sup> 1,j <sup>bj</sup> <sup>−</sup>
A <sup>−</sup> i− <sup>1</sup>
n−2
�j=1
A <sup>−1</sup>
i−1
(f <sup>˙</sup> i+1 − f <sup>˙�</sup> i+1) + (f <sup>˙</sup> i − f <sup>˙�</sup> i) = (A <sup>−1</sup>
<sup>−1</sup> i−
i,1 <sup>)λ1( ˙f�</sup> 1 <sup>−</sup> <sup>f˙1) + (A−1</sup>
<sup>−1</sup> 2 ≤ i ≤ n − 2.
i,n−2 <sup>)µn−2( ˙f�</sup> n <sup>−</sup> <sup>f˙n),</sup>
i−1,1 <sup>+ A−1</sup>
i−1,n−2 <sup>+ A−1</sup>
The distance between Pi(x) and P <sup>�</sup> i(x) for all x ∈ [xi, xi+1], i = 2, . . ., n − 2, can be obtained with:
+
- - (x − xi)2(x
hi
Pi(x) − P <sup>�</sup> i(x) =(f <sup>˙</sup> i − f <sup>˙�</sup> i)(x − xi) − (f <sup>˙</sup> i − f <sup>˙�</sup> i) <sup>(x −</sup> <sup>xi)2</sup>
(x − xi)
(f <sup>˙</sup> i+1 − f <sup>˙�</sup> i+1) + (f <sup>˙</sup> i − f <sup>˙�</sup> i)
- xi)
- (x − xi)2h( <sup>2</sup> ix − xi+1)
+
i
hi
+ (A <sup>−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,1 <sup>+ A−</sup> i,1 <sup>1</sup>
=λ1( f <sup>˙�</sup> 1 − f <sup>˙</sup> 1)(x − xi)
A <sup>−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,n−2 <sup>+ A</sup> i <sup>−</sup> - <sup>1</sup>
<sup>−</sup> i,1 <sup>1)(x −</sup> <sup>xi)(x −</sup> <sup>xi+1)</sup>
h <sup>2</sup>
h <sup>2</sup> i
i
<sup>−</sup> i− <sup>1</sup> 1,1 <sup>+ A</sup> i <sup>−</sup> - <sup>1</sup> 1
i−1,1
hi
.
A <sup>−</sup> i− <sup>1</sup>
<sup>−</sup> i,n <sup>1</sup> −2 <sup>| ≤|A−</sup> i,n <sup>1</sup>
(x − xi)
hi
i,n <sup>−1</sup> −2 <sup>)(x −</sup> <sup>xi)(x −</sup> <sup>xi+1)</sup>
h <sup>2</sup>
h <sup>2</sup> i
i
i−1,n−2
+ (A <sup>−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,n−2 <sup>+ A</sup> i,n <sup>−1</sup>
From |A <sup>−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,1 <sup>+ A−</sup> i,1 <sup>1</sup>
+µn−2( f <sup>˙�</sup> n − f <sup>˙</sup> n)(x − xi)
<sup>−</sup> i,1 <sup>1| ≤|A</sup> i <sup>−</sup> - <sup>1</sup> 1
i <sup>−</sup> - <sup>1</sup> 1,1 <sup>|,</sup> <sup>|A−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,n−2 <sup>+ A−</sup> i,n <sup>1</sup>
<sup>−</sup> i,n <sup>1</sup> −2 <sup>|</sup> <sup>and</sup> <sup>|A−</sup> i− <sup>1</sup>
<sup>−</sup> i− <sup>1</sup> 1,n−2 <sup>| ≤|A−</sup> i,n <sup>1</sup>
From |A <sup>−</sup> i− <sup>1</sup> 1,1 <sup>+ A−</sup> i,1 <sup>1| ≤|A</sup> i <sup>−</sup> - <sup>1</sup> 1,1 <sup>|,</sup> <sup>|A−</sup> i− <sup>1</sup> 1,n−2 <sup>+ A−</sup> i,n <sup>1</sup> −2 <sup>| ≤|A−</sup> i,n <sup>1</sup> −2 <sup>|</sup> <sup>and</sup> <sup>|A−</sup> i− <sup>1</sup> 1,n−2 <sup>| ≤|A−</sup> i,n <sup>1</sup> −2 <sup>|,</sup> <sup>i = 2, . . ., n −</sup> <sup>2</sup> <sup>by</sup> <sup>Lemma</sup>
2.1, we get:
i <sup>−</sup> - <sup>1</sup> 1,1 <sup>|| ˙f�</sup> 1 <sup>−</sup> <sup>f˙1|(x −</sup> <sup>xi)</sup>
1 + <sup>(x −</sup> <sup>xi)</sup>
- hi
1 + <sup>(x −</sup> <sup>xi)</sup>
- hi
+ <sup>(x −</sup> <sup>xi)(xi+1 −</sup> <sup>x)</sup>
|Pi(x) − P <sup>�</sup> i(x)| ≤λ1|Ai <sup>−</sup> - <sup>1</sup>
<sup>−1</sup>
i,n−2 <sup>|| ˙f�</sup> n <sup>−</sup> <sup>f˙n|(x −</sup> <sup>xi)</sup>
i
(x − xi) + <sup>(x −</sup> <sup>xi)2</sup>
- hi
h <sup>2</sup> i
i
i
+ <sup>(x −</sup> <sup>xi)(xi+1 −</sup> <sup>x)</sup>
+µn−2|A <sup>−1</sup>
h <sup>2</sup> i
i
.
<sup>−1</sup>
i−1,1 <sup>|| ˙f�</sup> 1 <sup>−</sup> <sup>f˙1| + µn−2|A</sup> i,n <sup>−1</sup>
<sup>8</sup> 3 <sup>2i−n.</sup> <sup>Then:</sup>
=(λ1|A <sup>−1</sup>
hi
+ <sup>(x −</sup> <sup>xi)2(xi+1 −</sup> <sup>x)</sup>
h <sup>2</sup> i
Finally, by Lemma 2.1 it holds |A <sup>−</sup> i− <sup>1</sup>
3 <sup>8</sup> <sup>2−i</sup> <sup>and</sup> <sup>|A</sup> i,n <sup>−1</sup> −2 <sup>| ≤</sup> <sup>8</sup> 3
<sup>−</sup> i− <sup>1</sup> 1,1 <sup>| ≤</sup> 3 <sup>8</sup>
i,n <sup>−1</sup> −2 <sup>|| ˙f�</sup> n <sup>−</sup> <sup>f˙n|)</sup>
(10)
As a consequence of Proposition|Pi(x) −3.1P <sup>�</sup> iwe(x)can| ≤8provehi(2 <sup>−i</sup> theλ1|f <sup>˙�</sup> following1 − f <sup>˙</sup> 1| +result µn−22regarding the <sup>i−n</sup> |f <sup>˙�</sup> n − f <sup>˙</sup> n|).order of approximation of the
spline (known result, showed e.g. in [5]).
Corollary 3.2. Assume that <sup>ˆ</sup> h < 1, f (x) ∈ C <sup>4</sup> ([x1, xn]) and let L > 0 be such that |f <sup>(4)</sup> (x)| ≤ L, for all x ∈ [x1, xn].
for the first derivative values at the interval endpoints that can take any value. If there exist K, p - 0, such that
Let P (x) be the interpolating spline of f and P <sup>�</sup> be another cubic spline constructed with the same data as P (x) except
h/hˆ j ≤ K for all j = 1, . . ., n − 1 and Ω:= {i ∈ N : −p log2(ˆh) < i < n + p log2(ˆh)}̸ = ∅ then
x∈[ximax,xi+1],i∈Ω <sup>| �Pi(x) −</sup> <sup>f</sup> <sup>(x)| = O(ˆhmin{p+1,4}).</sup>
Proof. If P is the spline interpolator constructed with the solution of system AF <sup>˙</sup> = B defined in (5) with clamped
boundary conditions f <sup>˙</sup> 1 = f <sup>′</sup> (x1), f <sup>˙</sup> n = f <sup>′</sup> (xn) then it is known [6] that
x∈[maxxi,xi+1] <sup>|Pi(x) −</sup> <sup>f</sup> <sup>(x)| = O(ˆh4).</sup>
On the other hand, i ∈ Ωimplies 2 <sup>−i</sup> < h <sup>ˆp</sup> and 2 <sup>n−i</sup> < h <sup>ˆp</sup> . The result hence follows from Proposition 3.1.
3
4. 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 Pi be a monotone cubic Hermite interpolant of the data
{(xi, fi, f <sup>˙</sup> i), (xi+1, fi+1, f <sup>˙</sup> i+1)}. Then:
sign(f <sup>˙</sup> i) = sign(f <sup>˙</sup> i+1) = sign(mi). (11)
Furthermore, if mi = 0 then Pi is monotone (constant) if and only if f <sup>˙</sup> i = f <sup>˙</sup> i+1 = 0.
We prove the main proposition of the paper.
Proposition 4.2. Let n be an odd number and {(xi, fi)} <sup>n</sup> i=1 <sup>,</sup> <sup>with</sup> <sup>f1</sup> <sup>≤</sup> <sup>f2</sup> <sup>≤</sup> <sup>. . . ≤</sup> <sup>fn</sup> <sup>be</sup> <sup>the</sup> <sup>data</sup> <sup>used</sup> <sup>to</sup> <sup>construct</sup> <sup>a</sup>
spline P by solving the system given in Eq. (5) with given boundary data f <sup>˙</sup> 1, f <sup>˙</sup> n which satisfies:
- P is monotone in [x1, x2] and [xn−1, xn].
- There exists i0 ∈ N with max(1, 1−log2(R1)) ≤ i0 < min(n−2, n−3+log2(Rn)) such that Pi0 (xi0+ 12 <sup>)−fi0+1</sup> <sup>> 0,</sup>
hi0
12 <sup>= xi0</sup> <sup>+</sup> 2
being xi0+ 12
i0
2, R1 =
Pi0 (xi0+ 12
8K1λ1 with
2 <sup>)−fi0+1</sup>
K1 = 3(A <sup>−</sup> 1, <sup>1</sup> 1 <sup>(λ1 m1 + µ1 m2) + A−</sup> 1,n <sup>1</sup> −2 <sup>(λn−2 mn−2 + µn−2 mn−1)) +</sup>
A <sup>−</sup> 1,j <sup>1bj</sup> <sup>+ 4m1,</sup>
and Rn =
Pi0 (xi0+ 12
8µn−2Kn with
2 <sup>)−fi0+1</sup>
Kn = 3(A <sup>−</sup> n− <sup>1</sup>
<sup>−</sup> n− <sup>1</sup> 2,n−2 <sup>(λn−2 mn−2 + µn−2 mn−1)) +</sup>
<sup>−</sup> n− <sup>1</sup> 2,1 <sup>(λ1 m1 + µ1 m2) + A−</sup> n− <sup>1</sup>
n−3
�j=2
n−3
�j=2
A <sup>−</sup> n− <sup>1</sup> 2,j <sup>bj</sup> <sup>+ 4mn−1.</sup>
notIf amonotonenew splineinP <sup>�</sup> [xis1, xconstructed2] or [xn−1, xwithn] theor same data2 <sup>)</sup> as <sup>−</sup> P <sup>fi0</sup> but <sup>+1</sup> changing> 0, i.e.,thethevaluesnew splinef <sup>˙</sup> 1 andis fnot <sup>˙</sup> n bymonotone.f <sup>˙�</sup> 1 and f <sup>˙�</sup> n then P <sup>�</sup>
- P�i0 (xi0+ 1
is not monotone in [x1, x2] or [xn−1, xn] or
same data2 <sup>)</sup> as <sup>−</sup> P <sup>fi0</sup> but <sup>+1</sup> changing> 0, i.e.,thethevaluesnew splinef <sup>˙</sup> 1 andis fnot <sup>˙</sup> n bymonotone.f <sup>˙�</sup> 1 and f <sup>˙</sup>
- P�i0 (xi0+ 1
Proof. As f1 ≤ . . . ≤ fn, 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 <sup>−</sup> 1, <sup>1</sup> 1 <sup>, A−</sup> 1,n <sup>1</sup> −2 <sup>> 0</sup> <sup>since</sup> <sup>n</sup> <sup>is</sup> <sup>an</sup> <sup>odd</sup>
at any node has to be higher or equal to 0 by Theorem 4.1. By Lemma 2.1 it holds A <sup>−</sup> 1, <sup>1</sup> 1 <sup>, A−</sup> 1,n <sup>1</sup> −2 <sup>> 0</sup> <sup>since</sup> <sup>n</sup> <sup>is</sup> <sup>an</sup> <sup>odd</sup>
number. Thus, we get
f˙2 =
n−2
�j=1
A <sup>−</sup> 1,j <sup>1bj</sup> <sup>= A</sup> 1 <sup>−</sup>, <sup>1</sup> 1 <sup>b1 + A−</sup> 1,n <sup>1</sup> −2 <sup>bn−2 +</sup>
n−3
�j=2
A <sup>−</sup> 1,j <sup>1bj</sup>
A <sup>−</sup> 1,j <sup>1bj</sup>
⇒
=A <sup>−</sup> 1, <sup>1</sup> 1 <sup>(3 (λ1 m1 + µ1 m2) −</sup> <sup>λ1</sup> <sup>f˙1) + A</sup> 1 <sup>−</sup>,n <sup>1</sup> −2 <sup>(3 (λn−2 mn−2 + µn−2 mn−1) −</sup> <sup>µn−2</sup> <sup>f˙n) +</sup>
n−3
�j=2
≤3(A <sup>−</sup> 1, <sup>1</sup> 1 <sup>(λ1 m1 + µ1 m2) + A−</sup> 1,n <sup>1</sup> −2 <sup>(λn−2 mn−2 + µn−2 mn−1)) +</sup>
n−3
�j=2
A <sup>−</sup> 1,j <sup>1bj</sup> <sup>=: k1</sup>
As P1 is monotone in [x1, x2] then
- f2 −h1 f1
- f1 −h1 f2
≤ f <sup>˙</sup> 1 ≤ f <sup>˙</sup> 2 + 4
≤ f2 ⇒ f <sup>˙</sup> 2 + 4
4
1 + <sup>h1</sup>
2 <sup>) =</sup> <sup>f1 +</sup> 2 <sup>f2</sup> 8
f1 ≤ P1(x1+ 1
2
8
f˙1 − f˙2
0 ≤ f <sup>˙</sup> 1 ≤ f <sup>˙</sup> 2 + 4m1 ≤ k1 + 4m1 =: K1
Analogously:
n−2
�j=1
f˙n−1 =
<sup>−</sup> n− <sup>1</sup> 2,j <sup>bj</sup> <sup>= A</sup> n <sup>−</sup> - <sup>1</sup>
A <sup>−</sup> n− <sup>1</sup>
n <sup>−</sup> - <sup>1</sup> 2,1 <sup>b1 + A−</sup> n− <sup>1</sup>
<sup>−</sup> n− <sup>1</sup> 2,n−2 <sup>bn−2 +</sup>
n−3
�j=2
A <sup>−</sup> n− <sup>1</sup> 2,j <sup>bj</sup>
A <sup>−</sup> n− <sup>1</sup>
n−3
�j=2
A <sup>−</sup> n− <sup>1</sup> 2,j <sup>bj</sup>
<sup>−</sup> n− <sup>1</sup> 2,1 <sup>(3 (λ1 m1 + µ1 m2) −</sup> <sup>λ1</sup> <sup>f˙1) + A</sup> n <sup>−</sup> - <sup>1</sup>
=A <sup>−</sup> n− <sup>1</sup>
n <sup>−</sup> - <sup>1</sup> 2,n−2 <sup>(3 (λn−2 mn−2 + µn−2 mn−1) −</sup> <sup>µn−2</sup> <sup>f˙n) +</sup>
≤3(A <sup>−</sup> n− <sup>1</sup>
<sup>−</sup> n− <sup>1</sup> 2,1 <sup>(λ1 m1 + µ1 m2) + A−</sup> n− <sup>1</sup>
<sup>−</sup> n− <sup>1</sup> 2,n−2 <sup>(λn−2 mn−2 + µn−2 mn−1)) +</sup>
n−3
�j=2
A <sup>−</sup> n− <sup>1</sup> 2,j <sup>bj</sup> <sup>=: kn,</sup>
A <sup>−</sup> n− <sup>1</sup>
as Pn−1 is monotone in [xn−1, xn] then
1 + <sup>hn−1</sup>
2 <sup>) =</sup> <sup>fn−1</sup> 2 <sup>+ fn</sup> 8
f˙n−1 − f˙n
fn−1 ≤ Pn−1(xn− 1
2
8
≤ f <sup>˙</sup> n ≤ f <sup>˙</sup> n−1 + 4
2
- fn−h1n −−1 fn
8
- fn −hn−fn1 −1
≤ fn
⇒ f <sup>˙</sup> n−1 + 4
⇒ 0 ≤ f <sup>˙</sup> n ≤ f <sup>˙</sup> n−1 + 4mn−1 ≤ kn + 4mn−1 =: Kn.
The same argument applies to any spline P <sup>�</sup> that is monotone in [x1, x2] and [xn−1, xn] and then the same conditions
have to be satisfied by P <sup>�</sup> i.e. 0 ≤ f <sup>˙�</sup> 1 ≤ K1, 0 ≤ f <sup>˙�</sup> n ≤ Kn. By hypothesis we know that
The same argument applies to any spline P <sup>�</sup> that is monotone in [x1, x2] and [xn−1, xn
have to be satisfied by P <sup>�</sup> i.e. 0 ≤fi0f <sup>˙�</sup> 1+≤ fiK0+11, +0 ≤ <sup>hi</sup> f <sup>0˙�</sup> n ≤ Kn. By hypothesis we know that
= Pi0 (xi0+ 12
fi0 + fi0+1
fi0+1 + <sup>hi0</sup>
2 8
f˙i0 - f˙i0+1
8
12 <sup>) > fi0+1.</sup>
We take
1 + <sup>hi0</sup>
2 <sup>) −</sup> <sup>fi0+1</sup> <sup>=</sup> <sup>fi0</sup> <sup>−</sup> 2 <sup>fi0+1</sup> 8
ε := Pi0 (xi0+ 1
2
8
f˙i0 - f˙i0+1 - 0
-
and by Lemma 2.1, from 1 − log2(R1) ≤ i0 < n − 2 and n − 3 ≥ i0 − log2(Rn) we obtain:
<sup>−</sup> i0 <sup>1</sup>,1 <sup>| ≤</sup> 3 <sup>2</sup>
<sup>−</sup> i0 <sup>1</sup> +1,n−2 <sup>| ≤</sup> 3 <sup>2</sup>
ε
3 <sup>2</sup> <sup>· 2−|n−3−i0|</sup> <sup>≤</sup> 12µn−2Kn .
|A <sup>−</sup> i0 <sup>1</sup>,
ε
3 <sup>2</sup> <sup>· 2−|i0−1|</sup> <sup>≤</sup> 12λ1K1, |A <sup>−</sup> i0 <sup>1</sup>
then, according to (9) the distance with the original derivative approximation is:
If we denote as f <sup>˙�</sup> i0, f <sup>˙�</sup> i0+1 the new values obtained by changing the first derivative values f <sup>˙</sup> 1 and f <sup>˙</sup> n by f <sup>˙�</sup> 1 and f <sup>˙�</sup> n,
i0,
f˙� i0 − f˙i0 = A−1
Finally,
<sup>′</sup> i0,n−2 <sup>µn−2(f ′</sup>
1 <sup>−</sup> <sup>f˙�</sup> 1 <sup>) + A−1</sup> n
<sup>′</sup> i0+1,n−2 <sup>µn−2(f ′</sup>
1 <sup>−</sup> <sup>f˙�</sup> 1 <sup>) + A−1</sup> n
i0,1 <sup>λ1(f ′</sup>
<sup>′</sup> i0
n <sup>−</sup> <sup>f˙�</sup> n <sup>);</sup> f˙� i0+1 − f˙i0+1 = A−1
i0+1,1 <sup>λ1(f ′</sup>
<sup>′</sup>
n <sup>−</sup> <sup>f˙�</sup> n <sup>),</sup>
Finally,
i <sup>−</sup> 0 <sup>1</sup> +1,n−2 <sup>)µn−2(f ′</sup>
2 <sup>) −</sup> <sup>fi0+1</sup> <sup>=</sup> <sup>fi0</sup> <sup>−</sup> 2 <sup>fi0+1</sup> + <sup>h</sup> 8 <sup>i0</sup>
P�i0 (xi0+ 1
+ (A <sup>−1</sup> i0+1
8
= <sup>fi0</sup> <sup>−</sup> <sup>fi0+1</sup>
2
�f˙�i0 - f˙�i0+1�
<sup>)λ1(f ′</sup>
<sup>fi0+1</sup> + <sup>hi0</sup>
2 8
8
f˙i0 - f˙i0+1
i <sup>−</sup> 0 <sup>1</sup> +1,n−2 <sup>)µn−2(f ′</sup>
+ (A <sup>−</sup> i0 <sup>1</sup>,
<sup>−</sup> i0 <sup>1</sup>,1 <sup>−</sup> <sup>A</sup> i <sup>−</sup> 0 <sup>1</sup>
i <sup>−</sup> 0 <sup>1</sup> +1,1 <sup>)λ1(f ′</sup>
<sup>′</sup>
n <sup>−</sup> <sup>f˙�</sup> n <sup>)</sup>
<sup>−2(f ′</sup>
<sup>′</sup>
n <sup>−</sup> <sup>f˙�</sup> n <sup>)</sup>
= ε + (A <sup>−</sup> i0 <sup>1</sup>,
<sup>−</sup> i0 <sup>1</sup>,1 <sup>−</sup> <sup>A</sup> i <sup>−</sup> 0 <sup>1</sup> +1
i <sup>−</sup> 0 <sup>1</sup> +1,1 <sup>)λ1(f ′</sup>
<sup>′</sup> i0,n−2 <sup>−</sup> <sup>A</sup> i <sup>−</sup> 0 <sup>1</sup>
1 <sup>−</sup> <sup>f˙�</sup> 1 <sup>) + (A−1</sup>
<sup>λ1(f ′</sup> i0,n−2 <sup>−</sup>
<sup>′</sup> i0,n−2 <sup>−</sup> <sup>A</sup> i <sup>−</sup> 0 <sup>1</sup> +1
<sup>1</sup> +11 <sup>−</sup>,n− <sup>f˙�</sup> 21 <sup>|) + (µn−2AK−n1</sup>
≥ ε − 4|A <sup>−</sup> i0 <sup>1</sup>,1
<sup>−</sup> i0 <sup>1</sup>,1 <sup>|λ1K1 −</sup> <sup>4|A−</sup> i0 <sup>1</sup>
<sup>−</sup> i0 <sup>1</sup> +1,n−2 <sup>|µn−2Kn</sup>
<sup>4λ1K1</sup> ε − <sup>4µn−2Kn</sup>
12λ1K1 12µn−2Kn
<sup>2</sup> 3 <sup>ε</sup> <sup>=</sup> 3 <sup>ε</sup> <sup>> 0.</sup>
≥ ε − <sup>4λ1K1</sup>
12 <sup>4µ</sup> µ <sup>n</sup> n <sup>−</sup> - <sup>2</sup> 2 <sup>K</sup> K <sup>n</sup> n ε = ε − <sup>2</sup> 3 <sup>ε</sup>
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.
5
References
[1] F. N. Fritsch, R. E. Carlson, Monotone piecewise cubic interpolation, SIAM J. Numer. Anal. 17 (2) (1980) 238–246.
[2] F. Ar`andiga, A. Baeza, D. F. Y´a˜nez, Monotone cubic spline interpolation for functions with a strong gradient,
Appl. Numer. Math. (2022) 591–607.
[3] C. de Boor, A practical guide to splines, Springer-Verlag, 2001.
[4] D. Kershaw, Inequalities on the elements of the inverse of a certain tridiagonal matrix, Math. Comp. 24 (1970)
155–158.
[5] D. Kershaw, The orders of approximation of the first derivative of cubic splines at the knots, Math. Comp. 26
(1972) 191–198.
[6] J. Stoer, R. Bulirsch, Introduction to Numerical Analysis, Springer-Verlag, 1980.
6