# A New Approach of Constrained Interpolation Based on Cubic Hermite Splines

Authors: J. Saeidian; M. Sarfraz; A. Azizi; S. Jalilian
Journal: Journal of Mathematics
 (2021)

---

## Abstract

Suppose we have a constrained set of data and wish to approximate it using a suitable function. It is natural to require the approximant to preserve the constraints. In this work, we state the problem in an interpolating setting and propose a parameter-based method and use the well-known cubic Hermite splines to interpolate the data with a constrained spline to provide with aC1 interpolant. Then, more smoothing constraints are added to obtain C2 continuity. Additionally, a minimization criterion is presented as a theoretical support to the proposed study; this is performed using linear programming. The proposed methods are demonstrated with illustrious examples.


---

## Body

## 1. Introduction

In the industrial design, it is often required to generate a smooth function approximating a given set of data which preserves certain shape properties of the data such as positivity, monotonicity, or convexity, that is, a smooth shape-preserving approximation [1].Shape-preserving approximation is a subfield of computer aided design (CAD) and has extensively been applied in various areas of engineering such as ship design, car body design, and aerospace industry; it also plays a crucial role in aerography and even in animation and games. Now, some emerging research fields, such as modern data analysis, mathematical finance, image processing, visualization, and digital watermarking techniques, are putting forward higher standards for curve and surface shape-preserving modeling systems [2].Here, it is generally assumed that the given data are sufficiently accurate to warrant interpolation, so we focus on the shape-preserving interpolation techniques; however, for more oscillatory data, one may prefer to use other approximation methods such as least squares.In a shape-preserving interpolation problem, we seek for a smooth curve/surface passing through a given set of data in which we priorly know that there is a shape feature in it and one wishes the interpolant to inherit these features [1, 3–9]. Positivity, monotonicity, and convexity are the basic and fundamental shape features which normally arise in everyday scientific phenomena.During the past three decades, various shape-preserving interpolation methods have been proposed. In this problem, splines play a crucial role, and every approach to shape-preserving interpolation, more or less, uses splines as a cornerstone.The shape-preserving problem can be handled using different bases, and innovative techniques have been employed to cope with different aspects of this generally studied problem [10, 11].A good survey of different approaches for shape-preserving interpolation techniques could be found in [2] and the references therein.One of the hidden features in a dataset may be its boundedness. This happens, for example, when the data come from a sampling of a bounded function or they reflect the probability or efficiency of a process. Actually, any quantity which is expressed as a percentage of another quantity will necessarily lie between 0 and 100; in this case, the data satisfym≤fi≤M, for known bounds m and M. However, the bounds could be imposed by functions (curves) as well, i.e., for known functions B1x and B2x, the data satisfy B1xi≤fi≤B2xi. When we recreate the underlying entity by interpolation from the sampled values, we need to ensure that the interpolating curve adheres to these known properties, so we wish to find a function gx which approximates (fits) the data and is also bounded into m,M; moreover, as every shape-preserving modeling, we require a reasonable degree of smoothness. Such a problem may have lots of applications, for example, in engineering and data visualization. There is a good review of literature in [12], where Asim and Brodlie have mentioned the advantages and drawbacks of different approaches; they have also modified the knot insertion algorithm proposed in [13]. The Shepard interpolation family [14] have been used by Brodlie et al. in [15] to study this problem.This article studies the problem in an interpolating setting and takes advantage of cubic splines to visualize the data. It proposes a parameter-based method and uses the well-known cubic Hermite splines to interpolate a constrained data with aC1 cubic spline, which preserves the desired bounds. It furthermore proposes the work to obtain C2 spline by adding more smoothing constraints. Additionally, an energy minimization technique is used to provide C1 and C2 interpolating functions. This is performed using a linear programming technique.The structure of the study is as follows. In Section2, the cubic Hermite spline with unknown derivative parameters is used to provide with a C1 interpolant; then, more smoothing constraints are added in Section 3 to obtain C2 continuity. Section 4 deals with more general constraints and studies the case where the constraints are quadratic polynomials. A minimization criterion is presented in Section 5, and Section 6 is devoted for demonstration with illustrious examples.


## 2. BoundedC1 Cubic Hermite Spline

Considerxi,fii=1n as a dataset, where xi are distinct points in real line and fi are bounded values, say fi∈m,M. Without loss of generality, we assume that m=0 and M=1, so we wish to find a smooth interpolant px on x1,xn with 0≤px≤1. For each subinterval xi,xi+1, i=1,…,n−1, we define hi=xi+1−xi, δi=fi+1−fi/hi, and t=x−xi/hi. We state the C1 bounded interpolation problem (C1BIP) as follows.Problem 1 (C1BIP).
For a bounded datasetxi,fii=1n, where 0≤fi≤1, there is an interpolant which is C1 on x1,xn and is bounded into 0,1.To answer this question, we use aC1 cubic Hermite spline (CHS) Sx, which is defined in xi,xi+1 as follows:(1)Sx≡Six=fi+mihit+3δi−2mi−mi+1hit2+mi+mi+1−2δihit3,where mi=S′xi are the unknown values. They are the shape parameters, and we use them to force the interpolant to satisfy the bounding conditions, i.e., 0≤Sx≤1. Schmidt and Hess [16] have given the necessary and sufficient conditions, for a cubic polynomial, to be positive on an interval. We use a sufficient condition extracted from their results to ensure Six≥0 and 1−Six≥0.We assume that0≤fi≤1 for i=0,…,n.Lemma 1 (See [16]).
The functionSix on xi,xi+1 is positive if mi,mi+1∈R1, where(2)R1=x,y|x≥−3fihi,y≤3fi+1hi.Corollary 1.
Ifmi,mi+1∈R2, where(3)R2=x,y|x≤31−fihi,y≥3fi+1−1hi,then Six≤1 on xi,xi+1.Proof.
It suffices to apply Lemma1 on 1−Six.Theorem 1.
A sufficient condition for the cubic Hermite splineSx to satisfy 0≤Sx≤1 is that the set of values mii=1n fulfills the following system of inequalities:(4)−3f1h1≤m1≤31−f1h1,(5)max−3fihi,3fi−1hi−1≤mi≤min31−fihi,3fihi−1,i=2,…,n−1,(6)3fn−1hn−1≤mn≤3fnhn−1.Proof.
The constraints resulted from Lemma1 and Corollary 1 must be applied to each subinterval. The value of m1 is affected by only the first interval constraints, so it suffices to satisfy (4). For every mi,i=2,…,n−1, one must consider restrictions of two consecutive subintervals, namely, xi−1,xi and xi,xi+1. So, there are 4 restrictions on mi as follows:(i)
Applying Lemma1 on xi−1,xi forces mi≤3fi/hi−1(ii)
Applying Corollary1 on xi−1,xi forces mi≥3fi−1/hi−1(iii)
Applying Corollary1 on xi,xi+1 forces mi≤31−fi/hi(iv)
Applying Lemma1 on xi,xi+1 forces mi≥−3fi/hi
These inequalities must be satisfied simultaneously, so inequalities (5) is the natural presentation of these constraints. The case of mn is similar to m1.Definition 1.
The set of all points satisfying inequalities (4)–(6) is defined to be the feasible region of the cubic Hermite spline method for C1BIP.Lemma 2.
The feasible region of the Definition1 is nonempty.Proof.
For eachmi,i=1,…,n, we should verify that the lower bound of the corresponding constraints, from inequalities (4)–(6), is actually lower than the upper bound. This is obvious due to the assumption 0≤fi≤1. In inequalities (4)–(6), every lower bound is a nonpositive value, while each upper bound is nonnegative.The following theorem is a straightforward result of Lemma2.Theorem 2.
For any datasetxi,fii=1n, there exists a C1 cubic Hermite spline interpolant, in the form of equation (1), which provides a solution to Problem 1.Remark 1.
Any point in the feasible region, presented by inequalities (4)–(6), provides with a solution to Problem 1. One may choose each mi to be the middle point of the corresponding feasible interval. In the next section, we seek for optimal solutions which provide with more smooth and visually pleasing solution curves.


## 3. BoundedC2 Cubic Hermite Spline

The cubic Hermite spline (1) provides a family of solutions to Problem 1. Any set of mii=1n from the feasible region results in a C1 bounded interpolant. We can impose more restrictions on mi values to obtain interpolants with desired properties. Imposing the C2 continuity property, the second derivative of Sx must be continuous at each interior point xi+1, i=1,…,n−2:(7)1himi+2hi+2hi+1mi+1+1hi+1mi+2=3hiδi+3hi+1δi+1,i=1,…,n−2.The system of linear equation (7) with inequalities (4)–(6) forms a set of constraints. To find a feasible solution, one can solve a linear programming problem subjected to these constraints. So, a question of feasibility arises here: “does a solution to the system (7) satisfies in (4)–(6)?” This is dependent upon fi values; here, we state a sufficient condition.Lemma 3.
Ifxi forms a uniform partition and 1/2≤fi≤1 for all i=1,…,n (or, respectively, 0≤fi≤1/2), then solution to the linear system (5) satisfies the inequalities (4)–(6).Proof.
Using notationh=hi,i=1,…,n−1, one can rewrite equation (7) as(8)mi+4mi+1+mi+2=3δi+δi+1,i=1,…,n−2.
One should verify that equation (8) is feasible subject to constraints (4)–(6). We assume mii=1n satisfy (4)–(6). Taking advantage of equations(9)maxa,b=a+b2+a−b2,mina,b=a+b2−a−b2,one can represent(10)Li=min−3fih,3fi−1h=−32h1−2fi−1,Ui=max31−fih,3fih=32h1−2fi−1.
Fori=2,…,n−2, equation (5) leads to the following restrictions:(11)Li≤mi≤Ui,Li+1≤mi+1≤Ui+1,Li+2≤mi+2≤Ui+2,which results in(12)−32h6−2fi−1−42fi+1−1−2fi+2−1≤mi+4mi+1+mi+2,mi+4mi+1+mi+2≤32h6−2fi−1−42fi+1−1−2fi+2−1.
Now, for the feasibility of equation (8), it remains to verify(13)−32h6−2fi−1−42fi+1−1−2fi+2−1≤3δi+δi+1,(14)3δi+δi+1≤32h6−2fi−1−42fi+1−1−2fi+2−1.
Here, we add the assumptions1/2≤fi≤1 for all i=1,…,n, which leads to(15)fi+2fi+1≤3.
The latter inequality is obvious due to our assumption forfi values. Similar calculations can be used to verify (14). Using inequalities (4) and (6), respectively, one can easily handle the feasibility for i=1 and i=n.


## 4. Constraining Cubic Hermite Interpolation

Problem 2.
For a constrained datasetxi,fii=1n, where fi is bounded by two curves B1x and B2x, i.e., B1xi≤fi≤B2xi, there is an interpolating function g which is also constrained by B1x and B2x, i.e.,(16)gxi=fi,i=1,…,n,B1x≤gx≤B2x.We consider the case whereB1x and B2x are, at most, quadratic polynomials and set some sufficient conditions on the cubic Hermite spline (1) to fulfill condition (16).Denoting(17)B1x=a1x2+b1x+c1,B2x=a2x2+b2x+c2,one can rewrite the constraining conditions B1x≤Sx≤B2x in two positivity conditions:(18)Sx−B1x≥0,B2x−Sx≥0.Applying Lemma1, we have the following result:Theorem 3.
A sufficient condition for the interpolating cubic Hermite splineSx (1) to be constrained by B1x and B2x (16) is to satisfy the following conditions:(19)m1≥3a1x12+b1x1+c1−f1h1+2a1x1+b1,m1≤3a2x12+b2x1+c2−f2h1+2a2x1+b2,mi≤min3a2xi2+b2xi+c2−fihi+2a2xi+b2,−3a1xi−12+b1xi−1+c1−fihi−1−4a1xi−1−2b1−2a1hi−1,mi≥max3a1xi2+b1xi+c1−fihi+2a1xi+b1,−3a2xi−12+b2xi−1+c2−fihi−1−4a2xi−1−2b2−a2hi−1,mn≥−3a2xn−12+b2xn−1+c2−fnhn−1−4a2xn−1−2b2−a2hn−1,mn≤−3a1xn−12+b1xn−1+c2−fnhn−1−4a1xn−1−2b1−a1hn−1.For getting more smoothness, one can easily addC2 continuity conditions, and the reasoning is the same as the bounded case.


## 5. Energy Minimization Technique

So far, we have solved the bounded and constrained interpolation problems, and we know that there does existC1 as well as C2 solutions to these problems. However, in both cases, there may exist a number of solutions; so, a matter of choosing the “optimal solution” arises here. Moreover, to get an explicit result, one has to solve a linear programming problem.The energy minimization method has successfully been used by Burmeister et al. [17] to obtain an interpolating spline with minimum energy. It is generally based on minimizing the curvature of the spline which is represented by(20)E=∫x=x1x=xnS″2x1+S′2x5/2dx.Wolberg and Alfy [18] have proposed different, but closely related, quantities to express the energy of a spline. They introduced an energy measure based on the second derivative discontinuities:(21)ED=∑k=2n−1S″xk−−S″xk+2.They have simplified the discontinuity energy measure,ED, to be linear with the first derivatives, so that a linear programming procedure can be applied. The simplification is performed by using the absolute values of the discontinuities:(22)E˜D=∑k=2n−1S″xk−−S″xk+.For each discontinuity point, they define a slack variable,sk, whose value is forced to be the absolute value of the discontinuity, using the following inequality constraints:(23)S″xk−−S″xk+≤sk,−S″xk−−S″xk+≤sk.E˜D can be written as(24)E˜D=∑k=2n−1sk.Here, we use the same techniques and try to reach suitable splines in two stages. We state the idea for bounded case, and then, it can be easily extended to a constrained case. First, we putE˜D as an objective function and minimize its subject to the following constraints.(i)
Absolute value constraints: equation (23)(ii)
Boundedness constraints: equations (4)–(6)The mentioned linear programming (LP) problem could be handled by any LP-solver. The solution to this LP is a vector of valuesF∗=m0,…,mn,s1,…,sn−1t, and now, we have a solution to Problem 1 (C1BIP).At this point, we can switch to the second stage.E˜D reflects the sum of discontinuities in the second derivative; so, whenever it has a relatively small value, we hope that we are close to a C2 solution. Having the solution of the mentioned LP at the hand, we try to reach a C2 solution as well. To do so, we add the C2 continuity constraints, i.e., equation (7) to the set of constraints. This time, we use E from equation (21) as an objective and minimize its subject to the following constraints:(i)
Boundedness constraints: equation (4)–(6)(ii)
C2 continuity conditions: equation (7)This is a nonlinear programming problem and needs a starting guess; we use the solutionF∗ of the mentioned LP as the starting point.


## 6. Examples and Illustrations

In previous sections, the bounded and constrained cubic Hermite spline problems (Problems1 and 2) have been transformed to a linear programming problem which can be easily handled in MATLAB. To reach a smoother solution, the C2 continuity constraints were put in a nonlinear programming problem, which also can be solved by MATLAB using “fmincon” function. The maximum vector norm of MATLAB with a discretization is used to compare the errors. We illustrate these results through some examples: the first group of examples confined to bounded interpolation and the second group presents the constrained case.


### 6.1. Bounded CHS Examples

Example 1.
We consider the dataset in Table1.
This is a uniform sampling of the semicircle described by the functionfx=1−1/2x2−x on 0,2. The C1 solution as well as the original curve is illustrated in Figure 1. It is seen that the maximum error is 0.0551. The C2 solution is more pleasing and is reported in Figure 2. The maximum error in this case reduces to 0.0531. Table 2 represents the maximum error for both solutions in each subinterval.Table 1
Dataset of a sampling.
xi00.20.40.60.81.01.21.41.61.82.0fi10.70000.60000.54170.51010.50000.51010.54170.60000.70001Figure 1
C1 cubic Hermite approximation of a semicircle.Figure 2
C2 cubic Hermite approximation of a semicircle.Table 2
Errors forC1 and C2 spline for the dataset from Example 1.
Intervals[0, 0.2][0.2, 0.4][0.4, 0.6][0.6, 0.8][0.8, 1][1, 1.2][1.2, 1.4][1.4, 1.6][1.6, 1.8][1.8, 2]C1 spline0.05510.00420.00080.00020.00000.00000.00020.00080.00420.0551C2 spline0.05300.00470.00120.00030.00010.00010.00030.00130.00470.0531Example 2.
Table3 presents a data sampled from the function(25)fx=10e−x/41+e1−x/4−10e−x/41+e1−x2/16+12.
These data are oscillatory and do not fulfill the conditions of Lemma3; however, the cubic Hermite solutions are convincing enough. The C1 solution as well as the original curve is depicted in Figure 3. It is seen that in C1 case, the maximum error is 0.0193. Table 4 presents the errors for each interval in both C1 and C2 cases.
In theC2 solution, the maximum error is 0.0195, and it is depicted in Figure 4.Table 3
Dataset from Example2.
xi0123456789fi0.50000.80700.84400.71490.50000.28550.15450.13850.20020.2831Figure 3
C1 CHS solution of Example 2.Table 4
Errors forC1 and C2 CHS solutions for the dataset from Example 2.
Intervals[0, 1][1, 2][2, 3][3, 4][4, 5][5, 6][6, 7][7, 8][8, 9]C1 spline0.01930.00480.00120.00030.00010.00040.00010.00010.0009C2 spline0.05300.00470.00120.00030.00010.00010.00030.00130.0047Figure 4
C2 CHS solution to Example 2.Example 3.
Consider the data given in Table5, which come from the burning of coal in a furnace: the y values are the percentage of oxygen in flue gas over a range of time. If we visualize these data by cubic spline, it would give a pleasing smooth curve, but it is unfortunately physically nonsense since it generates negative percentages. This problem have been handled in [12] by Hermite and rational splines, and they have reported C1 positive interpolants. Qin and Xu [19] got advantage of a trigonometric spline to propose a C1 positivity preserving approximation. Here, the proposed method provides with a C2 interpolant where its curve lies completely between maximum and minimum values of percentage (Figure 5).Table 5
Dataset from Example3.
xi02410283032yi20.88.84.20.53.96.29.6Figure 5
BoundedC2 CHS solution to Example 3.


### 6.2. Constrained CHS Examples

Example 4.
Dataset in Table6 is a sampling of(26)fx=xe−x−42/1010e3−x−3xe−2x−4/1010on a uniform partition in 0,12. We wish to find the corresponding interpolant which lies between B1x=0.1x2+1.08x and B2x=−0.12x2−1.56x. The resulted C1 solution curve has the maximum error 0.1733 and is depicted in Figure 6. The C2 solution is obtained by the energy minimization technique and has the maximum error 0.0120, which is very convincing and shows that this technique provides a smooth solution with lesser error. Figure 7 is the C2 solution; in both figures, the solid line refers to the interpolant, the dotted curve is the original function, and the dashed lines are constraining functions.
The ordinary cubic spline also could be used to solve this interpolating problem, but it may not fulfill the constraining conditions. However, in this example, the spline solution satisfies the constraints. Here, theC1 and C2 Hermite cubic solutions can be compared with the ordinary spline solution which is obtained by MATLAB. Table 7 provides the corresponding errors in subintervals. According to this report, the C2 solution gives a more satisfying result. Also, the C1 solution competes well enough. However, in cases where the constraints are tighter, the Hermite spline solutions, both C1 and C2, are comparably better than ordinary spline solution.Table 6
Dataset from Example4.
xi0123456fi0−0.5459−0.8884−1.0526−1.0528−0.7757−0.1133xi789101112fi0.95042.16583.04023.15162.49081.4597Figure 6
ConstrainedC1 CHS solution to Example 4.Figure 7
ConstrainedC2 CHS solution to Example 4.Table 7
Comparison of errors in Example4.
xi,xi+1MATLAB splineC2 CHSC1 CHS0,10.11120.01200.15841,20.02990.00330.04252,30.00780.00070.01123,40.00240.00050.00334,50.00050.00010.00085,60.00030.00050.00036,70.00140.00120.00147,80.00030.00070.00028,90.00300.00100.00279,100.01530.00180.014210,110.04970.00100.045611,120.18840.00090.1733Example 5.
In this example, we intend to make more restricting conditions. Consider the functionfx=−0.5xesinx in the interval −3.5,3.5, and we have a sample of this function in Table 8. It is aimed to find an interpolant which is bounded by curves B1x=−0.3x2−0.7x−0.4 and B2x=0.2x2−0.9x+0.1 as lower and upper constraints.
These curves and the original function as well as theC1 and C2 CHS solutions are shown in Figures 8 and 9, respectively.Table 8
Sampled data from Example5.
xi−3.5−3−2−101233.5fi2.48531.30260.40280.21550−1.1599−2.4826−1.7273−1.2322Figure 8
ConstrainedC1 CHS solution to Example 5.Figure 9
ConstrainedC1 CHS solution to Example 5.


## 6.1. Bounded CHS Examples

Example 1.
We consider the dataset in Table1.
This is a uniform sampling of the semicircle described by the functionfx=1−1/2x2−x on 0,2. The C1 solution as well as the original curve is illustrated in Figure 1. It is seen that the maximum error is 0.0551. The C2 solution is more pleasing and is reported in Figure 2. The maximum error in this case reduces to 0.0531. Table 2 represents the maximum error for both solutions in each subinterval.Table 1
Dataset of a sampling.
xi00.20.40.60.81.01.21.41.61.82.0fi10.70000.60000.54170.51010.50000.51010.54170.60000.70001Figure 1
C1 cubic Hermite approximation of a semicircle.Figure 2
C2 cubic Hermite approximation of a semicircle.Table 2
Errors forC1 and C2 spline for the dataset from Example 1.
Intervals[0, 0.2][0.2, 0.4][0.4, 0.6][0.6, 0.8][0.8, 1][1, 1.2][1.2, 1.4][1.4, 1.6][1.6, 1.8][1.8, 2]C1 spline0.05510.00420.00080.00020.00000.00000.00020.00080.00420.0551C2 spline0.05300.00470.00120.00030.00010.00010.00030.00130.00470.0531Example 2.
Table3 presents a data sampled from the function(25)fx=10e−x/41+e1−x/4−10e−x/41+e1−x2/16+12.
These data are oscillatory and do not fulfill the conditions of Lemma3; however, the cubic Hermite solutions are convincing enough. The C1 solution as well as the original curve is depicted in Figure 3. It is seen that in C1 case, the maximum error is 0.0193. Table 4 presents the errors for each interval in both C1 and C2 cases.
In theC2 solution, the maximum error is 0.0195, and it is depicted in Figure 4.Table 3
Dataset from Example2.
xi0123456789fi0.50000.80700.84400.71490.50000.28550.15450.13850.20020.2831Figure 3
C1 CHS solution of Example 2.Table 4
Errors forC1 and C2 CHS solutions for the dataset from Example 2.
Intervals[0, 1][1, 2][2, 3][3, 4][4, 5][5, 6][6, 7][7, 8][8, 9]C1 spline0.01930.00480.00120.00030.00010.00040.00010.00010.0009C2 spline0.05300.00470.00120.00030.00010.00010.00030.00130.0047Figure 4
C2 CHS solution to Example 2.Example 3.
Consider the data given in Table5, which come from the burning of coal in a furnace: the y values are the percentage of oxygen in flue gas over a range of time. If we visualize these data by cubic spline, it would give a pleasing smooth curve, but it is unfortunately physically nonsense since it generates negative percentages. This problem have been handled in [12] by Hermite and rational splines, and they have reported C1 positive interpolants. Qin and Xu [19] got advantage of a trigonometric spline to propose a C1 positivity preserving approximation. Here, the proposed method provides with a C2 interpolant where its curve lies completely between maximum and minimum values of percentage (Figure 5).Table 5
Dataset from Example3.
xi02410283032yi20.88.84.20.53.96.29.6Figure 5
BoundedC2 CHS solution to Example 3.


## 6.2. Constrained CHS Examples

Example 4.
Dataset in Table6 is a sampling of(26)fx=xe−x−42/1010e3−x−3xe−2x−4/1010on a uniform partition in 0,12. We wish to find the corresponding interpolant which lies between B1x=0.1x2+1.08x and B2x=−0.12x2−1.56x. The resulted C1 solution curve has the maximum error 0.1733 and is depicted in Figure 6. The C2 solution is obtained by the energy minimization technique and has the maximum error 0.0120, which is very convincing and shows that this technique provides a smooth solution with lesser error. Figure 7 is the C2 solution; in both figures, the solid line refers to the interpolant, the dotted curve is the original function, and the dashed lines are constraining functions.
The ordinary cubic spline also could be used to solve this interpolating problem, but it may not fulfill the constraining conditions. However, in this example, the spline solution satisfies the constraints. Here, theC1 and C2 Hermite cubic solutions can be compared with the ordinary spline solution which is obtained by MATLAB. Table 7 provides the corresponding errors in subintervals. According to this report, the C2 solution gives a more satisfying result. Also, the C1 solution competes well enough. However, in cases where the constraints are tighter, the Hermite spline solutions, both C1 and C2, are comparably better than ordinary spline solution.Table 6
Dataset from Example4.
xi0123456fi0−0.5459−0.8884−1.0526−1.0528−0.7757−0.1133xi789101112fi0.95042.16583.04023.15162.49081.4597Figure 6
ConstrainedC1 CHS solution to Example 4.Figure 7
ConstrainedC2 CHS solution to Example 4.Table 7
Comparison of errors in Example4.
xi,xi+1MATLAB splineC2 CHSC1 CHS0,10.11120.01200.15841,20.02990.00330.04252,30.00780.00070.01123,40.00240.00050.00334,50.00050.00010.00085,60.00030.00050.00036,70.00140.00120.00147,80.00030.00070.00028,90.00300.00100.00279,100.01530.00180.014210,110.04970.00100.045611,120.18840.00090.1733Example 5.
In this example, we intend to make more restricting conditions. Consider the functionfx=−0.5xesinx in the interval −3.5,3.5, and we have a sample of this function in Table 8. It is aimed to find an interpolant which is bounded by curves B1x=−0.3x2−0.7x−0.4 and B2x=0.2x2−0.9x+0.1 as lower and upper constraints.
These curves and the original function as well as theC1 and C2 CHS solutions are shown in Figures 8 and 9, respectively.Table 8
Sampled data from Example5.
xi−3.5−3−2−101233.5fi2.48531.30260.40280.21550−1.1599−2.4826−1.7273−1.2322Figure 8
ConstrainedC1 CHS solution to Example 5.Figure 9
ConstrainedC1 CHS solution to Example 5.


## 7. Concluding Remarks

A special kind of shape-preserving approximation which deals with bounding constraints has been addressed; although it has partially been studied in the literature [12], we propose a linear programming approach and use energy minimization techniques to gain C2 continuity. Quadratic constraints are handled, which give the positivity and linear constraints a special case.It should be mentioned here that the bounded interpolation problem may be considered as a piecewise monotonic interpolation. In every subinterval, we may select a suitable function which preserves the monotonicity. This is a problem which has extensively been studied [18]. But a monotone solution may not be a suitable approximation for a bounded phenomenon, and the monotone interpolant cannot reach values outside the minimum and maximum of the sampling. This drawback was our motivation to seek for a really bounded approximation.It is worth indicating two experimental results:(i)
The constrained/bounded cubic Hermite spline is a promising technique for interpolating scattered data(ii)
The energy minimization technique is a convincing tool to gain more smoothness and reduce the approximation error



---

*Source: 5925163-2021-08-31.xml*