Abstract
In many applications, it is useful to use piecewise polynomials that satisfy certain regularity conditions at the joint points. Cubic spline functions emerge as good candidates having C2 regularity. On the other hand, if the data points present discontinuities, the classical spline approximations produce Gibbs oscillations. In a recent paper, we have introduced a new nonlinear spline approximation avoiding the presence of these oscillations. Unfortunately, this new reconstruction loses the C2 regularity. This paper introduces a new nonlinear spline that preserves the regularity at all the joint points except at the end points of an interval containing a discontinuity, and that avoids the Gibbs oscillations.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
A spline can be defined as any function constructed from one or more polynomial pieces that are joined together satisfying given differentiability requirements. There exist different types of splines (see, e.g., [9]) which can be classified depending on the restrictions introduced (see, e.g., [21]). C2-splines are used in the industry in very different kind of applications. The most familiar is computer-aided design, where splines are used to represent geometric entities (see, e.g., [7, 8, 12, 23]) or image processing (see, e.g., [10, 18, 27]). Another example is computer-aided manufacturing, where splines are involved in the modeling of geometric parts or used in the representation paths for machine tool cutters (see, e.g., [24, 28]). They are also used in the reconstruction of field data in many areas of engineering. Other kinds of splines are used to create approximations to the solution of ordinary differential equations, partial differential equations, integral equations, etc. using the finite element method (see, e.g., [6, 7, 17, 22]).
However, when the data contains real or numerical discontinuities, classical interpolation algorithms are not satisfactory. Recently, some new techniques have been developed in order to recover discontinuous functions, for example using Radial Bases Functions (RBF), see [5, 20]. In these cases, standard splines suffer from Gibbs oscillations, this phenomenon is first detected in the context of truncated Fourier expansions, [13], and it has been widely analyzed (see, e.g., [11, 14, 19]). In our paper [3], we introduced a nonlinear procedure that modifies a given spline in order to avoid these oscillations. However, this recent reconstruction loses the C2 regularity. The goal of the present work is to present a new spline combining both properties: the C2 regularity and the adaptation to discontinuities.
This article is organized as follows: Section 2 describes the framework that we will use, explains how classical splines are obtained and how to adapt them to the presence of discontinuities. Section 3 introduces and analyzes the properties of a new nonlinear weighted mean that is used to construct a new class of splines adapted to the presence of jump discontinuities having C2 regularity. Section 4 studies the approximation properties of the new class of splines close to discontinuities and a specific example is considered in Section 5. In Section 6, we analyze how the new spline avoids the Gibbs oscillations. Section 7 presents some numerical experiments where it is shown how the new nonlinear splines perform close to jump discontinuities with uniform grid spacing. Finally, Section 8 presents some conclusions.
2 Classical cubic splines versus nonlinear cubic splines
In this section, we recall the classical cubic interpolation and analyze the nonlinear modification introduced by Amat, Ruiz, Shu and Trillo in [3]. We will prove that this new type of spline is not necessarily C2, i.e., the continuity is sacrificed to avoid the presence of Gibbs oscillations. In order to obtain C2 regularity adapted to discontinuities, we slightly change the points of interpolation, i.e., we construct a quasi-interpolatory spline approximations using the same technique developed in [3].
Following the notation described in [3], let us consider the set of piecewise continuous functions in the interval [a,b], and let X be a non-uniform partition of the interval [a,b] into m subintervals,
Then, we can define the point-values discretization as the values of a function at these points,
The spline g(x) in the interval [a,b] depends of the m + 1 pairs of values (xi,yi),i = 0,⋯ ,m and in each subinterval [xi,xi+ 1] it is a cubic polynomial gi(x). More precisely, g(x) = gi(x), x ∈ [xi,xi+ 1], where
subjected to the following conditions
and
This way, a cubic spline that is at least C2 is obtained. If we solve the previous equations, we get that,
where Di stands for the first derivative at every interior knot. We obtain a system of equations for the Dis replacing the conditions for the spline (1) in (2),
If we take the natural boundary conditions, i.e., \(g^{\prime \prime }_{0}(x_{0})=0\) and \(g^{\prime \prime }_{m-1}(x_{m})=0\), from (1), the left boundary condition implies the equation,
and for the right boundary we obtain,
Denoting
we get the system:
with \(\delta _{i}=\frac {y_{i}-y_{i-1}}{h_{i}}\) for i = 1,…,m.
Denoting:
the previous system can be also written as AD = 3f, with
where Mα,β(x,y) is a weighted mean depending on two constants 0 < α,β < 1 such that α + β = 1 and are functions \(M_{\alpha ,\beta }:\mathbb {R}\times \mathbb {R}\to \mathbb {R}\) defined as Mα,β(x,y) = αx + βy.
As mentioned in the introduction, it is not difficult to check that linear C2 splines produce Gibbs phenomenon at zones close to the discontinuities. For this reason, in [3], the authors construct a new nonlinear spline that we present in the following subsection.
Remark 2.1
Throughout, the paper we define \(h={\max \limits } (h)_{i=1}^{m}\), and we consider approximation orders in powers of h as h ↘ 0. By the notation e = O(hα) we mean |e|≤ Chα where C is independent of h.
2.1 A class of nonlinear cubic splines
In order to design the nonlinear spline, we defined a nonlinear weighted mean. Thus, we present the following definition.
Definition 1 (Non-linear weighted mean)
Let 0 < α,β < 1, α + β = 1 be two constants and \(\mathbb {R}^{+}=\{x\in \mathbb {R}: x>0\}\). A nonlinear weighted mean, \(\tilde {H}^{+}_{\alpha ,\beta }:\mathbb {R}^{+}\times \mathbb {R}^{+} \to \mathbb {R}^{+}\), will be a function which satisfies the following five properties:
- 1):
-
\(\min \limits \{x,y\}\leq \tilde {H}^{+}_{\alpha ,\beta }(x,y)\leq \max \limits \{x,y\}\), for all \(x,y\in \mathbb {R}^{+}\).
- 2):
-
\(\tilde {H}^{+}_{\alpha ,\beta }(x,x)=x\), for all \(x\in \mathbb {R}^{+}\).
- 3):
-
Commutative (C) property. \(\tilde {H}^{+}_{\alpha ,\beta }(x,y)=\tilde {H}^{+}_{\beta ,\alpha }(y,x)\), for all \(x,y\in \mathbb {R}^{+}\).
- 4):
-
Order of accuracy (OA) property. There exist p ≥ 1 and h > 0 such that if x = O(1), y = O(1), x ⋅ y > 0 and |x − y| = O(h), then
$$ \left|\tilde{H}^{+}_{\alpha,\beta}(x,y)-M_{\alpha,\beta}(x,y)\right|=O(h^{p}). $$(9) - 5):
-
Adaptation to discontinuities (AD) property. There exists p ≥ 1 such that for all \(x,y\in \mathbb {R}\):
$$|\tilde{H}^{+}_{\alpha,\beta}(x,y)|\leq p\min\{|x|,|y|\}.$$
We extend this definition for all \((x,y)\in \mathbb {R}^{2}\) as:
where
However, we will lose order of accuracy at critical points, i.e., when x = O(1), y = O(1) and |x − y| = O(h) but x ⋅ y ≤ 0. In order to solve this problem Amat et al. propose in [3] the following nonlinear weighted mean:
where \(T_{\varepsilon }:\mathbb {R}^{2}\to \mathbb {R}\) is a function defined as:
being ε(x,y) > 0 a function defined for all \((x,y)\in \mathbb {R}^{2}\). This function depends on the data at each interval. For simplicity, in the rest of the paper, we denote \(H_{\alpha ,\beta }=H^{T_{\varepsilon }}_{\alpha ,\beta }\).
If we choose a convenient function ε(x,y) (see Section 5 or [3]), it is possible to prove that the (C), (OA) and (AD) properties are satisfied by Hα,β for all the points in the plane \(\mathbb {R}^{2}\).
Using the same reasoning showed in [3], denoting as \(H_{\alpha _{i},\beta _{i}}(\delta _{i},\delta _{i-1})=H_{i}\), i = 2,...,m, we redefine the system (8) changing the vector f by
Thus, the new system is \(\mathbf {A}\tilde {\mathbf {D}}=3\tilde {\mathbf {f}}\) where A is the matrix defined in (8). Then, the coefficients of this nonlinear spline are given by:
By a direct computation it is easy to check that \(\tilde {g}_{i-1}^{\prime }(x_{i})=\tilde {g}_{i}^{\prime }(x_{i})=\tilde {D}_{i}\), so the nonlinear spline has at least C1-regularity. However, the values \(\tilde {\mathbf {D}}=(\tilde {D}_{i})_{i=0}^{m}\) obtained solving this system are not necessarily equal to the values D obtained in (8). This fact causes the spline to lose its C2 regularity because the new approximation to the derivatives, (\(\tilde {D}_{i}\)), does not satisfy (4). In particular, in [3], this system is obtained for a specific nonlinear mean.
In order to generate a spline that is C2 continuous, we propose to change the values that we use to interpolate. Thus, the resulting approximation is not interpolatory.
3 Construction of C 2-cubic splines adapted to discontinuities
The idea of this new type of spline is to obtain new data \((\hat {y}_{i})_{i=0}^{m}\) such that the associated linear system (7) agrees with the nonlinear splines defined using the modified right hand side in (12). Thus, by construction the spline will have C2 regularity at the modified points. In order to obtain values close to the original ones, we cannot introduce modifications at the slopes defined by the points whose intervals contain discontinuities. In particular, at these points we cannot expect C2 regularity.
We define the new values, \(\hat {y}_{i}\), implicitly by
such that their weighted arithmetic means coincide with the weighted nonlinear means used at the right hand side of the system (12). Thus, we define:
where
being 0 < η < 1 a constant. The function G is defined taking into account that in smooth regions |δi − δi− 1| = O(h) and close to the discontinuity |δi − δi− 1| = O(1).
With this modification, the slope generated by the pairs of values defining an interval that contains a discontinuity is not modified and the other values remain at a distance of O(hp) from the original data values. In all the paper, we assume that the parameter h is sufficiently small.
The associated spline will be C2 except between the pairs of values defining an interval that contains a discontinuity, but the spline becomes only quasi-interpolatory. In any case, we will prove that the order of approximation is the same in both nonlinear schemes.
Lemma 3.1
Let j0,j1 be natural numbers with 1 ≤ j0 < j1; \((x_{i},y_{i})_{i=j_{0}}^{j_{1}}\), j1 − j0 + 1 points, \(h=\max \limits (h_{i})_{i=j_{0}}^{j_{1}}\), \((\delta _{i})_{i=j_{0}}^{j_{1}}\) the values defined as \(\delta _{i}=\frac {y_{i}-y_{i-1}}{h_{i}}\), for all j0 ≤ i ≤ j1, and \((\hat {\delta }_{i})_{i=j_{0}}^{j_{1}}\) defined in (14) with \(\hat {\delta }_{j_{0}-1}=\delta _{j_{0}-1}\), being Hα,β(x,y) a nonlinear weighted mean satisfying the (OA) property with p ≥ 1. If |δi − δi− 1| = O(h), for all i = j0 + 1,…,j1, then
Proof
By induction, we start with i = j0 since \(\delta _{j_{0}-1}=\hat {\delta }_{j_{0}-1}\), then as \(\alpha _{j_{0}}=O(1)\) and \(|\delta _{j_{0}}-\delta _{j_{0}-1}|=O(h)\), by (14), (15), and (OA) property, we get
we suppose that \(|\delta _{i-1}-\hat {\delta }_{i-1}|=O(h^{p})\), for i − 1 < j1 and prove the case i. As αi = O(1) and |δi − δi− 1| = O(h), then:
□
Corollary 3.2
Let j0,j1 be natural numbers with 1 ≤ j0 < j1; \((x_{i},y_{i})_{i=j_{0}}^{j_{1}}\), j1 − j0 + 1 points, \(h=\max \limits (h_{i})_{i=j_{0}}^{j_{1}}\), \((\delta _{i})_{i=j_{0}}^{j_{1}}\) the values defined as \(\delta _{i}=\frac {y_{i}-y_{i-1}}{h_{i}}\), for all j0 ≤ i ≤ j1, and \((\hat {\delta }_{i})_{i=j_{0}}^{j_{1}}\) defined in (14) with \(\hat {\delta }_{j_{0}-1}=\delta _{j_{0}-1}\) and \(\hat {y}_{j_{0}-1}=y_{j_{0}-1}+O(h^{p+1})\), being Hα,β(x,y) a nonlinear weighted mean satisfying the (OA) property with p ≥ 1. If |δi − δi− 1| = O(h), for all i = j0 + 1,…,j1, then
Proof
By induction, we start with i = j0 since \(y_{j_{0}-1}=\hat {y}_{j_{0}-1}+O(h^{p+1})\), by Lemma 3.1
we suppose that \(|y_{i-1}-\hat {y}_{i-1}|=O(h^{p+1})\), for i − 1 < j1, then
□
We suppose that there exists an isolated discontinuity (similar for k discontinuities) between two consecutive values denoted by i0 ∈{1,…,m − 1} and i0 − 1.
Using these results, if we take j0 = 1 and j1 = i0 − 1, we have
We do not change the values δi at the interval where there exists a discontinuity since \(|\delta _{i_{0}}-\delta _{i_{0}-1}|> h_{i_{0}}^{\eta }\), (15). Then, by (15), we get:
Yet, the values yi are changed at an interval which is close to a discontinuity since:
Analogously, for i0 + 1, as \(|\delta _{i_{0}+1}-\delta _{i_{0}}|>h_{i_{0}+1}^{\eta }\), we have
then:
If i0 + 2 ≤ i ≤ m, we again have |δi − δi− 1| = O(hi), and \(|y_{i_{0}+1}-\hat {y}_{i_{0}+1}| =O(h^{p+1})\) by (19). We have the hypotheses of Corollary 3.2 with j0 = i0 + 2 and j1 = m
With these new values, it is clear that \(\hat {\delta }_{m}\) is not necessarily equal to δm. In order to obtain exactly the system (12), we will suppose as boundary condition that satisfies
We define then the piecewise spline \(\hat {g}(x)\) by
at each interval [xi,xi+ 1], i = 0,…,m, with
where \(\hat {D}_{i}\) are the values obtained solving the system (12) except at the interval where the discontinuity is placed.
We can summarize this result in the following theorem.
Theorem 3.3
Let \((x_{i},y_{i})_{i=0}^{m}\) be m + 1 points, hi = xi − xi− 1, \(h=\max \limits (h_{i})_{i=0}^{m}\), \(\lambda _{i}=h_{i}^{-1}\),
We suppose 1 ≤ i0 ≤ m − 1 such that there exists a discontinuity of y(x) at the interval \([x_{i_{0}-1},x_{i_{0}}]\) and Gα,β(x,y,z,h) is the function introduced in (15) being Hα,β(x,y) a nonlinear weighted mean satisfying the (OA) property with p ≥ 1. If we define:
and \(\hat {g}(x)\) such that
at each interval [xi,xi+ 1], i = 0,…,m, with
then, the associated linear system used to calculate \(\hat {D}_{i}\), which satisfies the conditions in (2) with
is \(\mathbf {A}\hat {\mathbf {D}}=3\hat {\mathbf {f}}\), being A defined in (8) and
Finally, mixing the conditions of the linear and nonlinear splines, (13) and (22), we define a new approximating spline, \(u(x):=\tilde {\hat {g}}(x)\), as:
at each interval [xi,xi+ 1], i = 0,…,m, with
where \(\tilde {D}_{i}\) are the values that approximate the derivatives obtained solving the system (12) and the \(\hat {y}_{i}\) are defined using (14). We can prove the following theorem.
Theorem 3.4
Using identical notation as before, let 2 < i0 < m − 1 be an integer such that there exists a discontinuity of y(x) at the interval \([x_{i_{0}-1},x_{i_{0}}]\). Then the spline \(u(x)=\tilde {\hat {g}}(x)\) defined in (24) and (25) is \(C^{2}([x_{0},x_{m}]\setminus \{x_{i_{0}-1},x_{i_{0}},x_{i_{0}+1}\})\).
Proof
Let 2 ≤ i < i0, the \(\tilde {D}_{i}\) are the solutions of the system (12), and \(\beta _{i}=\frac {\lambda _{i-1}}{\lambda _{i}+\lambda _{i-1}}\), then we get:
Using this relation we can see that:
Analogously for i0 + 1 < i ≤ m − 1. □
4 On the order of accuracy
Let us start with the special case when the function is sufficiently smooth. In this case, we expect to obtain similar approximations as the original linear spline, i.e., that the distance between the new spline and the original linear spline is of the order introduced by the (OA) property, (9). We prove two auxiliary lemmas that we will use throughout the section. They consist of proving that having an estimate of the order of the approximation for the derivative values, we can estimate the order of approximation of the associated spline.
Lemma 4.1
Let \((x_{i},y_{i})_{i=0}^{m}\) be a set of points with hi = xi − xi− 1, being \(h=\max \limits (h_{i})_{i=1}^{m}<1\) and let g(x) be the linear spline defined by (1) and (3), being \(\tilde {g}(x)\) defined by (13) and u(x) the new spline defined by (24) and (25) with Hα,β(x,y) a nonlinear weighted mean which satisfies the (OA) property with p ≥ 1 in both cases. Let \(\hat {y}_{i}\) be defined by (14), and let \(\tilde {D}_{i}=\tilde {g}^{\prime }(x_{i})\). If there exists j0 such that
then
Proof
By (3), (13), and (28), we get
Analogously, by (3), (25), and (28), we have
Finally, if \(x\in [x_{j_{0}},x_{j_{0}+1}]\),
□
Lemma 4.2
Let \((x_{i},y_{i})_{i=0}^{m}\) be a set of points with hi = xi − xi− 1, being \(h=\max \limits (h_{i})_{i=1}^{m}<1\) and let g(x) be the linear spline defined by (1) with (3), \(\tilde {g}(x)\) defined by (13) and u(x) the new spline defined by (25) with Hα,β(x,y) a nonlinear weighted mean which satisfies the (OA) property with p ≥ 1 in both cases. If there exists j0 such that
and q ≥ 1 such that |y(x) − g(x)| = O(hq) with \(x\in [x_{j_{0}},x_{j_{0}+1}]\), then
Proof
The proof is straightforward using Lemma 4.1. If \(x\in [x_{j_{0}},x_{j_{0}+1}]\) then
□
Now, with these lemmas, we can calculate the order of approximation.
Proposition 4.3
Let \((x_{i},y_{i})_{i=0}^{m}\) be a set of points with hi = xi − xi− 1, being \(h=\max \limits (h_{i})_{i=0}^{m}<1\) and let g(x) be the linear cubic spline defined by (1) with (3), \(\tilde {g}(x)\) defined by (13) and u(x) the new spline defined by (25) with Hα,β(x,y) a nonlinear weighted mean which satisfies the (OA) property with p ≥ 1 in both cases, then for all x ∈ [a,b]:
Proof
The proof follows by verifying the conditions of Lemma 4.1 for all i = 0,…,m − 1. Using systems (8) and (12), we obtain:
where \(\|\mathbf {A}^{-1}\|_{\infty }=O(1)\) and by (OA) property we have that \(\|\mathbf {f}-\tilde {\mathbf {f}}\|_{\infty }=O(h^{p})\). Then \(\|\mathbf {D}-\tilde {\mathbf {D}}\|_{\infty }=O(h^{p}),\) and by Corollary 3.2, we get
□
In the following corollary, we prove that if the data are values that come from the discretization of a smooth function by point values, then the new spline has the same order of accuracy as the linear one.
Corollary 4.4
Let y(x) be a function in C4([a,b]), and \(X=(x_{i})^{m}_{i=0}\), x0 = a,hi = xi − xi− 1, a partition of [a,b], \(h=\max \limits (h_{i})_{i=0}^{m}\) and g(x) the linear spline defined by (1) with (3), \(\tilde {g}(x)\) defined by (13) and u(x) the new spline defined by (25) with Hα,β(x,y) a nonlinear weighted mean which satisfies the (OA) property with p ≥ 1 in both cases. Given x ∈ [a,b], if there exists q ≥ 1 such that |y(x) − g(x)| = O(hq), then
Proof
It is direct by Lemma 4.2 and Prop. 4.3. □
Therefore, at the smooth zones, since the classical cubic spline is of order q = 4, if we take a nonlinear average satisfying the (OA) property with p = 3, then the new spline will reach maximum order of accuracy.
Now, we will study the case with jump discontinuities. For this case, we calculate the distance between D and \(\tilde {\mathbf {D}}\). We bound the norm of the inverse matrix, A− 1 using the following lemma proved in [15] and [16] and used, for example, in [4].
Lemma 4.5
[15, 16] If the elements of A− 1 are denoted by \((a^{-1}_{j,k})_{j,k=0}^{m}\) then
If there exists a discontinuity at the interval \([x_{i_{0}-1},x_{i_{0}}]\) with 1 ≤ i0 ≤ m − 1, then \((\mathbf {f}-\tilde {\mathbf {f}})_{i_{0}-1}=f_{i_{0}-1}-\tilde {f}_{i_{0}-1}=O(1)\) and \((\mathbf {f}-\tilde {\mathbf {f}})_{i_{0}}=f_{i_{0}}-\tilde {f}_{i_{0}}=O(1)\) from
thus, if j = 0,…,m, we can calculate that
since \({\sum }_{k=1}^{m-1}\frac {2}{3}\cdot \gamma ^{-|j-k|}\leq 2\), for all j = 1,…,m − 1. In order to obtain \(\gamma ^{-|j-i_{0}+1|}\leq h^{p}\), we have to impose that
supposing that h < 1. We can summarize this result in Proposition 4.6.
Remark 4.1
It is clear that by (36) depending on values p, h and γ, the number of points m, and the location of the discontinuity i0 have to satisfy:
Thus, we assume that the previous expression is satisfied in the following results.
Proposition 4.6
Let \(X=(x_{i})^{m}_{i=0}\), x0 = a,hi = xi − xi− 1, be a partition of [a,b], \(h=\max \limits (h_{i})_{i=1}^{m}<1\). We suppose that there exists 1 ≤ i0 ≤ m − 1 such that y(x) is a function in \(C^{4}([a,x_{i_{0}-1}]\cup [x_{i_{0}},b]),\) let AD = f and \(\mathbf {A}\tilde {\mathbf {D}}=\tilde {\mathbf {f}}\) be the systems defined in (8) and (12) respectively with Hα,β(x,y) satisfying the (OA) property with p ≥ 1, then:
being \(\gamma =2+\sqrt {3}\) if hi = hi− 1 for all 1 ≤ i ≤ m, γ = 2 otherwise.
Proof
We obtain the result because if
then \(\gamma ^{-|j-i_{0}+1|}\leq h^{p}\) and by (35). □
Finally, we prove that at intervals placed sufficiently far away from the discontinuities, the order of approximation obtained by the nonlinear splines is maximal.
Corollary 4.7
Let \(X=(x_{i})^{m}_{i=0}\), x0 = a,hi = xi − xi− 1, be a partition of [a,b], \(h=\max \limits (h_{i})_{i=0}^{m}<1\). We suppose that there exists 1 ≤ i0 ≤ m − 1 such that y(x) is a function in \(C^{4}([a,x_{i_{0}-1}]\cup [x_{i_{0}},b]),\) let g(x) be the linear spline defined by (1) and (3), \(\tilde {g}(x)\) defined by (13) and u(x) the new spline defined by (25) with Hα,β(x,y) a nonlinear weighted mean which satisfies the (OA) property with p ≥ 1 in both cases, if there exists qi ≥ 1 such that \(|y_{i}(x)-g_{i}(x)|=O(h^{q_{i}})\), i = 0,…,m. Then:
where
with \(\gamma =2+\sqrt {3}\) if hi = hi− 1 for all 1 ≤ i ≤ m, γ = 2 otherwise.
Proof
The proof directly follows since by Lemma 4.1 and Prop. 4.6, we have
with
with \(\gamma =2+\sqrt {3}\) if hi = hi− 1 for all 1 ≤ i ≤ m, γ = 2 otherwise. □
5 On a specific example of a nonlinear weighted mean
In order to define a particular nonlinear weighted mean that satisfies the (C), (OA) and (AD) properties for any p, we need two principal components: a new limiter and a nonlinear translation. We take the new mean introduced in [3]. Thus, let 0 < α,β < 1 be two constants with α + β = 1, and p ≥ 1, we define
These means are a generalization of the means introduced in [25] and reduce to them for uniform grid spacing. The new limiter satisfies the properties presented in the following proposition. The proof is trivial and is not included for brevity.
Proposition 5.1
The \({\tilde {HW}_{p,\alpha ,\beta }}(x,y)\) mean is a nonlinear weighted mean, Def. 1. Also, for all \((x,y)\in \mathbb {R}^{2}\), it satisfies
-
1.
\({\tilde {HW}_{p,\alpha ,\beta }}(-x,-y)=-{\tilde {HW}_{p,\alpha ,\beta }}(x,y)\).
-
2.
\({\tilde {HW}_{p,\alpha ,\beta }}(x,y)=0, \textrm { if } xy\leq 0\).
-
3.
\({\tilde {HW}_{p,\alpha ,\beta }}(x,y)=\tilde {HW}_{p,\beta ,\alpha }(y,x)\).
-
4.
If xy > 0, x = O(1), y = O(1), |x − y| = O(h),
$$ \left|(\alpha x +\beta y)-{\tilde{HW}_{p,\alpha,\beta}}(x, y)\right|=O(h^{p}). $$(38) -
5.
\(|\tilde {HW}_{p,\beta ,\alpha }(x, y)|\le p\min \limits (|x|,|y|)\).
In order to obtain the maximal approximation order, as we have seen in Section 4, we choose p = 3, i.e., \(\tilde {HW}_{3}\). In particular, if we are working with a uniform grid spacing, hi = hi+ 1 for all i = 1,…,m − 1 then αi = βi = 1/2 and the nonlinear weighted means introduced in the previous Subsection transform into de p-power means introduced in [25]. The p-power mean has the general expression,
The most important properties that make the power means appropriate are (see [1, 25] for more details):
Proposition 5.2
For all \((x,y)\in \mathbb {R}^{2}\), the \(\tilde {H}_{p}(x,y)\) mean satisfies
-
1.
\(\tilde {H}_{p}(-x,-y)=-\tilde {H}_{p}(x,y)\).
-
2.
\(\tilde {H}_{p}(x,y)=0 \quad if xy\leq 0\).
-
3.
\(\tilde {H}_{p}(x,y)=\tilde {H}_{p}(y,x)\).
-
4.
If x = O(1), y = O(1), |y − x| = O(h) and xy > 0 then \(|\frac {x+y}{2}-\tilde {H}_{p}(x,y)|=O(h^{p})\).
-
5.
\(|\tilde {H}_{p}(x,y)| \leq p \min \limits {(|x|,|y|)}\) (related to the adaption to the singularities).
-
6.
\(|\tilde {H}_{p}(x,y)|\leq \max \limits {(|x|,|y|)}\).
Finally, to define Tε we only have to determine the function \(\varepsilon :\mathbb {R}^{2}\to \mathbb {R}^{+}\). In [3], it is suggested a nonlinear ε(x,y) based on the smoothness indicators proposed in [26], that is defined as:
where ISj is a smoothness indicator that satisfies that is O(1) close to a jump discontinuity and O(h2) at smooth parts. It is clear that at a jump discontinuity εj is O(h4) and if |x| < |y|, we get
then the translation does not affect the adaption attained at jump discontinuities unless a change of sign in the first derivative is placed exactly at the discontinuity but it is adapted to the presence of critical points in the sense that is O(1) at critical points (and around them) and that goes to zero away from them. In order to measure the smoothness of our function, we will use the smoothness indicator designed by Jiang and Shu in [26]. The proposed expression for a non-uniform grid spacing is,
where r is the degree of the polynomial pj(x). We have chosen the smoothness indicators in the point values for r = 2 that result from (42). They have the following expression for a uniform grid-spacing,
If we choose a smoothness indicator with a wider stencil the results are similar. With this choice, it is proved that smoothness indicators are O(1) at a jump discontinuity and O(h2) at smooth parts (see [2] for more details).
6 Analysis of the Gibbs phenomenon for nonlinear cubic splines
Let us consider the elimination of the Gibbs phenomenon for jump discontinuities. First of all, let’s remember the definition of the Gibbs phenomenon introduced by D. Gottlieb and C.W. Shu in [11]. Given a punctually discontinuous function f and its sampling fh defined by \({f^{h}_{n}}=f(nh)\), the Gibbs phenomenon deals with the convergence of the approximation gh based on fh towards f when h goes to 0. It can be characterized by two features [11]:
-
1.
Away from the discontinuity the convergence is rather slow and for any point x,
$$|f(x)-g^{h}(x)|=O(h).$$ -
2.
There is an overshoot, close to the discontinuity, that does not diminish with the reduction of h. Thus,
$$\max|f(x)-g^{h}(x)| \textrm{ does not tend to zero with } h.$$
Following the ideas introduced in [3] it is easy to check that the new nonlinear spline does not suffer from the Gibbs phenomenon.
Theorem 6.1
The nonlinear spline obtained through (24) and (25) does not present Gibbs oscillations.
Proof
Let us analyze the right hand side of the system in (12). If we remember now that δi and δi− 1 are divided differences, we know that they are O(1/h) in the presence of a jump discontinuity. Taking into account property 5 of Proposition 5.2, we know that the right hand side of (12) will be,
Then, the vector of derivatives \(\tilde {\mathbf {D}}\) that results from solving (12) will be,
At smooth zones \(\hat {y}_{i+1}-\hat {y}_{i}=O(h)\) so,
This means that the perturbation introduced by the nonlinear spline is O(h) except at the interval that contains the discontinuity.
Now we can try to prove that the nonlinear spline provides a prediction that is in the interval \([\hat {y}_{i}, \hat {y}_{i+1}]\) when h goes to zero. In order to do so, we express the equation of the spline (1), using the change of variables \(s=\frac {x-x_{i}}{h}\), as
where the first two terms of (46) amount to a dilation and a translation of the element s2(3 − 2s), that has a minimum at s = 0 and a maximum at s = 1, so it can not introduce Gibbs phenomenon. Let us analyze the third and fourth terms of (46). We can see that s3 − 2s2 + s and s3 − s2 are oscillating functions so the apparition of Gibbs phenomenon can be explained due to the presence of large coefficients accompanying these two elements. In the case of the nonlinear spline in (12) we have already analyzed that \(\tilde {D}_{i}=O(1)\). If this is the case, the two last terms in (46) go to zero when h → 0. Thus, there can not be Gibbs oscillation. □
7 Numerical experiments
The splines proposed are a modification of those introduced in [3] in order to maintain a regularity C2. In this numerical section, we are interested in checking that the new splines own the good properties of the splines presented in [3] concerning order of approximation and elimination of Gibbs-like oscillations. Moreover, we are interested in proving that the algorithm is robust with respect to the presence of perturbations in the data, for this reason we will present experiments where we perturb the functions with additive white Gaussian noise. In addition, we would like to confirm that the intervals affected by a discontinuity verify Proposition 4.6. In particular, that we always maintain at least order 1, which is not verified in the case of linear splines causing Gibbs-like oscillations, and that the order increases as we move away from the discontinuity until we recover the maximum order of accuracy.
We perform some numerical tests in order to validate the theoretical results. In particular, we divide this section in three parts: Firstly, we analyze the distance obtained when we apply the function G, (15) with η = 1/8 (we take this constant for all the examples) on the points \(\{y_{i}\}_{i=0}^{m}\) to get \(\{\hat {y}_{i}\}_{i=0}^{m}\), system given in (14). We will use a uniform grid depending on the parameter h and we will approximate the order obtained. In the second part of this section, we will analyze the Gibbs phenomenon and we will prove that the resulting spline has similar behaviour as that of the splines designed in [3]. Finally, in third part, we study the order of accuracy checking the theoretical results obtained in Section 4. We use the following two functions:
and
presented in Fig. 1.
7.1 Distance between the original and the new data
For our first experiment, we discretize the functions f(x) and l(x) in the interval [− 1,1] using 2k points, \(h_{k}=\frac {2}{2^{k}-1}\) to get the data \(({y_{i}^{k}})_{i=0}^{2^{k}-1}\) and we apply the algorithm introduced in (14) to obtain \((\hat {y}_{i}^{k})_{i=0}^{2^{k}-1}\). We compute \(\ell ^{\infty }\)-norm to the left of the discontinuity, i.e.,
and the numerical approximation order which is:
As we can see in Table 1, the numerical order of accuracy converges to 3 when hk decreases.
7.2 Numerical experiments using a uniform-grid
In this subsection, we reproduce the experiments presented in [3] but introducing the modification proposed in previous sections. We start from a sampling of the functions in (47) and (48) with 8192 points in [− 1,1]. We subsample the original data to 512 points and subdivide this data to obtain 8192 samples using the proposed spline (modifying the low resolution original data as a preprocessing through (14) and (15)) and the linear spline (7) (without modifying the low resolution original data) over data with and without noise. Then we compare the result with the original data at the highest resolution. In Figs. 2 and 3, the original subsampled data has been represented with red filled circles, the original high resolution data with blue crosses and the reconstruction with black points. All the numerical experiments presented use a uniform grid spacing. The results for the non linear spline have been done using the nonlinear translated mean (10) with the translation defined in (11) and the 𝜖 defined in (40). For the experiments with noise, we have chosen additive white gaussian noise of amplitude 0.1 for the function in (48) and 0.5 for the function in (47) (Fig. 3). We can see that the results are similar to the ones obtained in [3] from a quantitative point of view, but in this case the new spline has been proved theoretically to maintain C2 regularity, an important qualitative property for applications as we mentioned in Section 1.
7.3 Accuracy close to the discontinuity
In this subsection, we check the spatial distribution of the accuracy attained by the spline close to the discontinuity. In order to do so, we measure the error in the infinity norm between the nodes of the splines obtained for the function in (48) in an experiment of subdivision similar to the ones presented in Section 7.2. We will start from a low resolution data of m = 513 nodes, i.e., \(h=\frac {2}{512}\) and then construct a linear and a nonlinear spline, computed at 15 interior points between the original nodes. Then we divide h by two in order to perform a grid refinement analysis. In particular, we center our attention at the 17 intervals (between the original nodes) to the left of x = 0 that are closer to the discontinuity, we denote the error at the interval (−nh,−(n − 1)h) as e−nh,n = 1,…,17. Dividing the mesh size by two and applying the order formula, (49), we obtain an approximation of the order of accuracy attained in each interval denoting the orders by o−nh. Since \([x_{i_{0}-1},x_{i_{0}}]=[0,h]\) is the interval where the discontinuity is contained, then
Therefore, we can use Prop. 4.6 to calculate the theoretical interval where the order p + 1 is recovered, which is:
where \(\gamma =2+\sqrt {3}\) because in this example the grid is uniform. In Table 2, we show these constants for every h.
It is interesting to notice that the theoretical values are slightly worse than the numerical ones. In Table 2 we can see that for h = 1.95e-03 the value − n0 = − 14.21 and in Table 3, order of accuracy p = 4 is recovered in the interval [− 8h,− 7h], (o− 8h = 4.09), i.e., there exists an error of 6 intervals where the optimal order is reached. Analogously, for all h, the optimal order 4 is reached in previous intervals (marked in bold in Table 3) to the theoretical interval achieved using Prop. 4.6 (Table 2, column 2). This phenomenon occurs because in Lemma 4.5 and in (35), we use some manipulations in the inequalities that may be unnecessary in some cases. Also, in the results shown in Fig. 4, we can see how the order grows as we get away from the discontinuity.
Finally, we compare the order of accuracy obtained using linear splines. Tables 4 and 5 show the order of accuracy obtained for the linear splines. Comparing with the results shown in Tables 2 and 3, we can observe that in the nonlinear case, at least order 1 is maintained in all the intervals.
8 Conclusions
In this paper, we have included a new nonlinear spline avoiding the Gibbs oscillations near discontinuities and preserving the C2 regularity crucial for some applications. Some theoretical results related to the order of approximation and to the elimination of the Gibbs oscillations have been proved. The numerical results presented confirm the good properties of this new spline.
References
Amat, S., Dadourian, K., Liandrat, J., Trillo, J.: High order nonlinear interpolatory reconstruction operators and associated multiresolution schemes. J. Comput. Appl. Math. 253, 163–180 (2013)
Amat, S., Ruiz, J.: New WENO smoothness indicators computationally efficient in the presence of corner discontinuities. J. Sci Comput. 71(3), 1265–1302 (2017)
Amat, S., Ruiz, J., Shu, C.-W., Trillo, J.C.: On a class of splines free of Gibbs phenomenon. ESAIM: Math. Model. Numer. Anal. 55, S29–S64 (2021)
Aràndiga, F., Baeza, A., Yáṅez, D.F.: Monotone cubic spline interpolation for functions with a strong gradient. Appl. Numer Math. 172, 591–607 (2022)
Aràndiga, F., Donat, R., Romani, L., Rossini, M.: On the reconstruction of discontinuous functions using multiquadric RBF-WENO local interpolation techniques. Math. Comput. Simul. 176, 4–24 (2020). Applied Scientific Computing XV: Innovative Modelling and Simulation in Sciences
Bloor, M., Wilson, M.: Representing PDE surfaces in terms of B-splines. Comput. Aided Des. 22(6), 324–331 (1990)
Boehm, W.: Multivariate spline methods in CAGD. Comput. Aided Des. 18(2), 102–104 (1986)
Cottrell, J.A., Hughes, T.J.R., Bazilevs, Y: Isogeometric analysis: toward integration of CAD and FEA, vol. 27. Wiley, Chichester (2009)
de Boor, C.: A practical guide to splines volume, vol. 27. Springer-Verlag New York, SIAM (1980)
Forster, B.: Splines Analysis, Multiresolution, pp 1675–1716. Springer, New York (2015)
Gottlieb, D., Shu, C.-W.: On the Gibbs phenomenon and its resolution. SIAM Rev. 39(4), 644–668 (1997)
Hettinga, G.J., Kosinka, J.: A multisided C2 B-spline patch over extraordinary vertices in quadrilateral meshes. Comput. Aided Des. 127, 102855 (2020)
Hewitt, E., Hewitt, R.E.: The Gibbs-Wilbraham phenomenon: an episode in fourier analysis. Arch. Hist. Exact. Sci. 21
Jung, J.-H., Shizgal, B.D.: On the numerical convergence with the inverse polynomial reconstruction method for the resolution of the gibbs phenomenon. J. Comput. Phys. 224(2), 477–488 (2007)
Kershaw, D.: A note on the convergence of interpolatory cubic splines. SIAM J. Numer. Anal. 8, 7–74 (1971)
Kershaw, D.: The orders of approximation of the first derivative of cubic splines at the knots. Math. Comp. 26, 191–198 (1972)
Kouibia, A., Pasadas, M., Rodríguez, M.: Construction of ODE curves. Numer Algorithm. 34, 367–377 (2003)
Lehmann, T.M., Gonner, C., Spitzer, K.: Addendum: B-spline interpolation in medical image processing. IEEE Trans. Med. Imag. 20(7), 660–665 (2001)
Marchi, S.D.: Mapped polynomials and discontinuous kernels for runge and gibbs phenomena. to appear in SEMA SIMAI Springer Series
Marchi, S.D., Erb, W., Marchetti, F., Perracchione, E., kernels, M. Rossini.: Shape-driven interpolation with discontinuous error analysis, edge extraction, and applications in magnetic particle imaging. SIAM J. Sci. Comput. 42(2), B472–B491 (2020)
Mason, J., Rodriguez, G., Seatzu, S.: Orthogonal splines based on B-splines- with applications to least squares, smoothing and regularisation problems. Numer. Algorithm. 5(3), 25–40 (1993)
Pasadas, M., Rodríguez, M.L.: Multivariate approximation by PDE splines. J. Comput. Appl. Math. 218(2), 556–567 (2008)
Sarfraz, M.: A rational spline with tension: some cagd perspectives. In: Proceedings. 1998 IEEE Conference on Information Visualization. An International Conference on Computer Visualization and Graphics (Cat. No.98TB100246), pp 178–183 (1998)
Schillinger, D., Dedè, L., Scott, M.A., Evans, J.A., Borden, M.J., Rank, E., Hughesm, T.J.: An isogeometric design-through-analysis methodology based on adaptive hierarchical refinement of nurbs, immersed boundary methods, and T-spline CAD surfaces. Comput. Methods Appl. Mech. Eng. 249-252, 116–150 (2012). Higher Order Finite Element and Isogeometric Methods
Serna, S., Marquina, A.: Power ENO methods: a fifth-order accurate weighted power ENO method. J. Comput. Phys. 194(2), 632–658 (2004)
Shu, C.-W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes. J Comput. Phys. 77(2), 439–471 (1988)
Unser, M.: Splines: a perfect fit for signal and image processing. IEEE Signal Process. Mag. 16(6), 22–38 (1999)
Yang, J., Chen, Y., Chen, Y., Zhang, D.: A tool path generation and contour error estimation method for four-axis serial machines. Mechatronics 31, 78–88 (2015)
Funding
Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature. This work was funded by the Programa de Apoyo a la investigación de la fundación Séneca-Agencia de Ciencia y Tecnología de la Región de Murcia 20928/PI/18, by the national research project MMTM2015-64382-P and PID2019-108336GB-I00 (MINECO/FEDER), by grant MTM2017-83942 funded by Spanish MINECO and by grant PID2020-117211GB-I00 funded by MCIN/AEI/10.13039/501100011033.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Data availability
Data sharing not applicable to this article as no datasets were generated or analysed during the current study.
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Amat, S., Levin, D., Ruiz-Álvarez, J. et al. A class of C2 quasi-interpolating splines free of Gibbs phenomenon. Numer Algor 91, 51–79 (2022). https://doi.org/10.1007/s11075-022-01254-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11075-022-01254-6