# Shape Preserving Interpolation UsingC

Authors: Samsul Ariffin Abdul Karim; Kong Voon Pang
Journal: Journal of Applied Mathematics
 (2016)

---

## Abstract

This paper discusses the construction of newC
2 rational cubic spline interpolant with cubic numerator and quadratic denominator. The idea has been extended to shape preserving interpolation for positive data using the constructed rational cubic spline interpolation. The rational cubic spline has three parameters α
i, β
i, and γ
i. The sufficient conditions for the positivity are derived on one parameter γ
i while the other two parameters α
i and β
i are free parameters that can be used to change the final shape of the resulting interpolating curves. This will enable the user to produce many varieties of the positive interpolating curves. Cubic spline interpolation with C
2 continuity is not able to preserve the shape of the positive data. Notably our scheme is easy to use and does not require knots insertion and C
2 continuity can be achieved by solving tridiagonal systems of linear equations for the unknown first derivatives d
i, i
=
1
,
…
,
n
-
1. Comparisons with existing schemes also have been done in detail. From all presented numerical results the new C
2 rational cubic spline gives very smooth interpolating curves compared to some established rational cubic schemes. An error analysis when the function to be interpolated is f
t
∈
C
3
t
0
,
t
n is also investigated in detail.


---

## Body

## 1. Introduction

Spline interpolation has been used extensively in many research disciplines such as in car design and airplane fuselage. Univariate and bivariate spline can be used to approximate or interpolate the given finite data sets. Even though the cubic spline has second-order parametric continuity,C
2, it has some weakness such that the interpolating curves may give few unwanted behavior of the original data due to the existing wiggles along some interval. This uncharacteristic behavior may destroy the data. If the given data is positive cubic spline may give some negative values along the whole interval where the interpolating curves will lie below x-axis. For some application any negativity is unacceptable. For example, the wind speed, solar energy, and rainfall received are always having positive values and any negativity values need to be avoided as it may destroy any important information that may exist in the original data. Similarly if the data is monotone, then the resulting interpolating curves also must be monotone too. Furthermore if the given data is convex, the rational cubic spline interpolation should be able to maintain the shape of the original data. Thus shape preserving interpolation is important in computer graphics and computer aided geometric design (CAGD).Due to the fact that cubic spline is not able to produce completely the positive, monotone, and convex interpolating curves on entire given interval, many researchers have proposed several methods and idea to preserve the positivity, monotonicity, and convexity of the data. Fritsch and Carlson [1] and Dougherty et al. [2] have discussed the monotonicity, positivity, and convexity preserving by using cubic spline interpolation by modifying the first derivative values in which the shape violation is found. Butt and Brodlie [3] and Brodlie and Butt [4] have used cubic spline interpolation to preserve the positivity and convexity of the finite data by inserting extra knots in the interval in which the positivity and/or convexity is not preserved by the cubic spline. Their methods did not give any extra freedom to the user in controlling the final shape of the interpolating curves. In order to change the final shape of the interpolating curves, the user needs to change the given data. Another thing is that their methods require the modification of the first derivative parameters. Sarfraz [5], Sarfraz et al. [6, 7], and Abbas [8] studied the use of rational cubic interpolant for preserving the positive data. Meanwhile M. Z. Hussain and M. Hussain [9] studied positivity preserving for curves and surfaces by utilizing rational cubic spline with quadratic denominator. In works by Hussain et al. [10] and Sarfraz et al. [11] the rational cubic spline with quadratic denominator has been used for positivity, monotonicity, and convexity preserving with C
2 continuity. Hussain et al. [10] have only one free parameter meanwhile Sarfraz et al. [11] have no free parameter. Abbas [8] and Abbas et al. [12] have discussed the positivity by using new C
2 rational cubic spline with two free parameters. Another paper concerning C
2 rational spline can be found by Delbourgo [13], Gregory [14], and Delbourgo and Gregory [15]. Karim and Kong [16–19] have proposed new C
1 rational cubic spline (cubic/quadratic) with three parameters where two of them are free parameters. The rational cubic spline has been successfully applied to the local control of the interpolating functions, positivity, monotonicity, and convexity preserving as well as the derivative control including an error analysis when the function to be interpolated is f
t
∈
C
3
t
0
,
t
n. Motivated by the works of Tian et al. [20], Abbas et al. [12], Hussain et al. [10], and Sarfraz et al. [11], in this paper the authors will proposed new C
2 rational cubic spline for positivity, monotonicity, and convexity preserving and data constrained modeling. Under some circumstances our C
2 rational cubic spline will give new C
2 rational cubic spline based on rational cubic spline defined by Tian et al. [20]. Numerical comparison between C
2 rational cubic spline and the works of Hussain et al. [10], Abbas [8], Abbas et al. [12], and Sarfraz et al. [11] also has been made comprehensively. From all presented numerical results shape preserving interpolation by using the new C
2 rational cubic spline gives comparable results with existing rational cubic spline schemes. The main scientific contribution of this paper is summarized as follows:(i)
In this paperC
2 rational cubic spline (cubic/quadratic) with three parameters has been used for positivity, monotonicity, and convexity preserving and constrained data modeling while in works by Karim and Kong [17–19], M. Z. Hussain and M. Hussain [9], and Sarfraz [5] the degree of smoothness attained is C
1.
(ii)
Hussain et al. [10] and Sarfraz et al. [11] discussed the positivity by using C
2 rational cubic spline (cubic/quadratic) with two parameters with one or no free parameter while our rational cubic spline has two free parameters. Even though Abbas et al. [12] also proposed C
2 rational cubic spline (cubic/quadratic) with two parameters, their rational spline is different form our rational cubic spline. Furthermore it was noticed that schemes of Abbas et al. [12] may not be able to produce completely positive interpolating curves with C
2 continuity.
(iii)
Whenγ
i
=
0, we may obtain the new C
2 rational cubic spline with two parameters, an extension to the original C
1 rational cubic spline of Tian et al. [20]. Thus our C
2 rational cubic spline gives a larger class of rational cubic spline which also includes the rational cubic spline of Tian et al. [20].
(iv)
Our rational scheme is local while in Lamberti and Manni [21] their scheme is global. Furthermore our rational scheme works well for both equally and unequally spaced data while the rational spline interpolant by Duan et al. [22] and Bao et al. [23] only works for equally spaced data.
(v)
Numerical comparisons between theC
2 rational cubic spline and the existing schemes such as Hussain et al. [10], Sarfraz et al. [11], and Abbas et al. [12] for positivity preserving and C
1 rational spline of Karim and Kong [17–19] also have been done comprehensively.
(vi)
Our method also does not require any knots insertion. Meanwhile the cubic spline interpolation by Butt and Brodlie [3], Brodlie and Butt [4], and Fiorot and Tabka [24] requires knots insertion in the interval where the interpolating curves produce the negative values (lies below x-axis) for positive data, nonmonotone interpolating curves (for monotone data), and nonconvex interpolating curves for convex data.
(vii)
This paper utilized the rational cubic spline meanwhile in Dube and Tiwari [25], Pan and Wang [26], and Ibraheem et al. [27] the rational trigonometric spline is used in place of standard rational cubic spline. Thus no trigonometric functions are involved. Therefore the method is not computationally expensive.The remainder of the paper is organized as follows. Section2 introduces the new C
2 rational cubic spline with three parameters, with some discussion on the methods to estimate the first derivatives values as well as shape controls of the rational cubic spline interpolation. Meanwhile Section 3 discusses the positivity preserving by using C
2 rational cubic spline together with numerical demonstrations as well as comparison with some existing schemes including error analysis. Section 4 is devoted for research discussion. Finally a summary and conclusions are given in Section 5.


## 2.C
2 Rational Cubic Spline Interpolant

This section will introduceC
2 rational cubic spline interpolant with three parameters. Originally this rational cubic spline has been initiated by Karim and Kong [18]. The main difference is that in this paper the rational cubic spline has C
2 continuity while in work by Karim and Kong [18] it has C
1 continuity. We begin with the definition of C
2 rational cubic spline interpolant, given set of data points x
i
,
f
i
,
i
=
0,1
,
…
,
n such that x
0
<
x
1
<
⋯
<
x
n. Let h
i
=
x
i
+
1
-
x
i, Δ
i
=
f
i
+
1
-
f
i
/
h
i and θ
=
x
-
x
i
/
h
i, where 0
≤
θ
≤
1. For x
∈
x
i
,
x
i
+
1, i
=
0,1
,
2
,
…
,
n
-
1, the rational cubic spline interpolant with three parameters is defined as follows:(1)
s
x
≡
s
i
x
=
A
i
0
1
-
θ
3
+
A
i
1
θ
1
-
θ
2
+
A
i
2
θ
2
1
-
θ
+
A
i
3
θ
3
1
-
θ
2
α
i
+
θ
1
-
θ
2
α
i
β
i
+
γ
i
+
θ
2
β
i
.The following conditions will assure that the rational cubic spline interpolant in (1) has C
2 continuity: (2)
s
x
i
=
f
i
,
s
x
i
+
1
=
f
i
+
1
,
s
1
x
i
=
d
i
,
s
1
x
i
+
1
=
d
i
+
1
,
s
2
x
i
+
=
s
2
x
i
-
,where s
1
x
i and s
2
x
i denote the first- and second-order derivative with respect to x, respectively. Meanwhile the notations s
2
x
i
+ and s
2
x
i
- correspond to the right and left second derivatives values. Furthermore d
i denotes the derivative value which is given at the knot x
i, i
=
0,1
,
2
,
…
,
n.By using (2), the required C
2 rational cubic spline interpolant with three parameters defined by (1) has the unknowns A
i
j, j
=
0,1
,
2,3, and is given as follows: (3)
A
i
0
=
α
i
f
i
,
A
i
1
=
2
α
i
β
i
+
α
i
+
γ
i
f
i
+
α
i
h
i
d
i
,
A
i
2
=
2
α
i
β
i
+
β
i
+
γ
i
f
i
+
1
-
β
i
h
i
d
i
+
1
,
A
i
3
=
β
i
f
i
+
1
.The parameters α
i
,
β
i
>
0, γ
i
≥
0 are used to control the final shape of the interpolating curves. From work by Karim and Kong [19], the second-order derivative s
2
x is given as(4)
s
2
x
=
∑
j
=
0
3
C
i
j
1
-
θ
3
-
j
θ
j
h
i
Q
i
θ
3
,where(5)
C
i
0
=
2
α
i
2
γ
i
Δ
i
-
d
i
-
β
i
d
i
+
1
-
Δ
i
-
2
α
i
β
i
d
i
-
Δ
i
,
C
i
1
=
6
α
i
2
β
i
Δ
i
-
d
i
,
C
i
2
=
6
α
i
β
i
2
d
i
+
1
-
Δ
i
,
C
i
3
=
2
β
i
2
γ
i
d
i
+
1
-
Δ
i
-
α
i
Δ
i
-
d
i
-
2
β
i
d
i
+
1
-
Δ
i
.Now C
2 continuity, s
2
x
i
+
=
s
2
x
i
-
,
i
=
1,2
,
…
,
n
-
1, will give (6)
2
γ
i
-
1
d
i
-
Δ
i
-
1
-
α
i
-
1
Δ
i
-
1
-
d
i
-
1
-
2
β
i
-
1
d
i
-
Δ
i
-
1
h
i
-
1
β
i
-
1
=
2
γ
i
Δ
i
-
d
i
-
β
i
d
i
+
1
-
Δ
i
-
2
α
i
β
i
d
i
-
Δ
i
h
i
α
i
.Now (6) provides the following system of linear equations that can be used to compute the first derivative parameters, d
i
,
i
=
1,2
,
…
,
n
-
1, such that (7)
a
i
d
i
-
1
+
b
i
d
i
+
c
i
d
i
+
1
=
e
i
,
i
=
1,2
,
…
,
n
-
1
,with(8)
a
i
=
h
i
α
i
-
1
α
i
,
b
i
=
h
i
α
i
γ
i
-
1
+
2
α
i
-
1
β
i
-
1
+
h
i
-
1
β
i
-
1
γ
i
+
2
α
i
β
i
,
c
i
=
h
i
-
1
β
i
-
1
β
i
,
e
i
=
h
i
α
i
γ
i
-
1
+
α
i
-
1
+
2
α
i
-
1
β
i
-
1
Δ
i
-
1
+
h
i
-
1
β
i
-
1
γ
i
+
β
i
+
2
α
i
β
i
Δ
i
.The system of linear equations given by (7) is strictly tridiagonal and has a unique solution for the unknown derivative parameters d
i
,
i
=
1,2
,
…
,
n
-
1, for all α
i
,
β
i
>
0
,
γ
i
≥
0. The system in (7) gives n
-
1 linear equations for n
+
1 unknown derivative values. Thus two more equations are required in order to obtain the unique solution in (7). The following is common choices for the end points condition, that is, d
0 and d
n:(9)
s
1
x
0
=
d
0
,
s
1
x
n
=
d
n
. By using (3), C
2 rational cubic spline interpolant in (1) can be reformulated and is given as follows: (10)
s
x
≡
s
i
x
=
P
i
θ
Q
i
θ
,where(11)
P
i
θ
=
α
i
f
i
1
-
θ
3
+
2
α
i
β
i
+
α
i
+
γ
i
f
i
+
α
i
h
i
d
i
θ
1
-
θ
2
+
2
α
i
β
i
+
β
i
+
γ
i
f
i
+
1
-
β
i
h
i
d
i
+
1
θ
2
1
-
θ
+
β
i
f
i
+
1
θ
3
,
Q
i
θ
=
1
-
θ
2
α
i
+
θ
1
-
θ
2
α
i
β
i
+
γ
i
+
θ
2
β
i
.The data-dependent sufficient conditions on parameters γ
i will be developed in order to preserve the positivity, data constrained, monotonicity, and convexity on the entire interval x
i
,
x
i
+
1
,
i
=
0,1
,
2
,
…
,
n
-
1. The remaining parameters α
i and β
i can be used to refine the resulting interpolating curves. Thus the rational cubic spline provides greater flexibility to the user in controlling the final shape of the interpolating curves.Theorem 1 (C
2 rational cubic spline interpolant).
The rational cubic spline with three parameters defined by (1) is C
2
∈
x
0
,
x
n if there exist positive parameters α
i
,
β
i
>
0
,
γ
i
≥
0, and d
i
,
i
=
1,2
,
…
,
n
-
1, that satisfy (7).The choice of the end point derivativesd
0 and d
n depended on the original data which are chosen as follows.Choice 1 (Geometric Mean Method (GMM)). Consider (12)
d
0
=
0
,
Δ
0
=
0
o
r
Δ
2,0
=
0
Δ
0
1
+
h
0
/
h
1
Δ
2,1
-
h
0
/
h
1
otherwise
,
d
n
=
0
Δ
n
-
1
=
0
or
Δ
n
,
n
-
2
=
0
Δ
n
-
1
1
+
h
n
-
1
/
h
n
-
2
Δ
n
,
n
-
2
-
h
n
-
1
/
h
n
-
2
o
t
h
e
r
w
i
s
e
.Choice 2 (Arithmetic Mean Method (AMM)). Consider(13)
d
0
=
Δ
0
+
Δ
0
-
Δ
1
h
0
h
0
+
h
1
,
d
n
=
Δ
n
-
1
+
Δ
n
-
1
-
Δ
n
-
2
h
n
-
1
h
n
-
1
+
h
n
-
2
.Delbourgo and Gregory [29] give more details about the method that can be used to estimate the first derivative value. In this paper the AMM will be used to estimate the end point derivatives d
0 and d
n, respectively.Some observation and shape control analysis of the newC
2 rational cubic spline interpolant defined by (10) are given as follows:(1)
Whenα
i
>
0
,
β
i
>
0
,
and
γ
i
=
0, the rational interpolant in (10) reduces to the rational spline of the form cubic/quadratic by Tian et al. [20] and we may obtain C
2 rational cubic spline with two parameters, an extension to C
1 rational cubic spline originally proposed by Tian et al. [20]. Thus by rewriting C
2 condition in (7), we can obtain C
2 rational cubic of Tian et al. [20].
(2)
Whenα
i
=
β
i
=
1
;
γ
i
=
0, the rational cubic interpolant in (1) is just a standard cubic Hermite spline with C
1 continuity that may not be able to completely preserve the positivity of the data [18]:(14)
s
x
=
1
-
θ
2
1
-
2
θ
f
i
+
θ
2
3
-
2
θ
f
i
+
1
+
θ
1
-
θ
2
d
i
-
θ
2
1
-
θ
d
i
+
1
,
fori
=
0,1
,
…
,
n
-
1
.
(3)
Furthermore the rational interpolant in (1) can be written as [18] (15)
s
x
=
1
-
θ
f
i
+
θ
f
i
+
1
+
h
i
θ
1
-
θ
α
i
d
i
-
Δ
i
1
-
θ
+
β
i
Δ
i
-
d
i
+
1
θ
Q
i
θ
.
(4)
Obviously whenα
i
→
0
,
β
i
→
0, or γ
i
→
∞, the rational interpolant in (10) converges to following straight line: (16)
lim
α
i
,
β
i
→
0
,
γ
i
→
∞
⁡
s
x
=
1
-
θ
f
i
+
θ
f
i
+
1
.Either the decrease of the parameters α
i and β
i or the increase of γ
i will reduce the rational cubic spline to a linear interpolant. Figure 1 shows this example. We test shape control analysis by using the data from work by Sarfraz et al. [6] given in Table 1.Table 1
A data from work by Sarfraz et al. [6].
i
0
1
1
3
4
x
i
0
2
3
9
11
f
i
0.5
1.5
7
9
13
h
i
2
1
6
2
Δ
i
0.5
5.5
1/3
2
d
i (C
1)
−2.833
3.833
4.7619
1.5833
2.4167
d
i (C
2)
−2.833
4.3223
4.9828
1.2146
2.4167Figure 1
Interpolating curve for data in Table1. (a) Default C
1 cubic spline with α
i
=
β
i
=
1 and γ
i
=
0. (b) C
1 rational cubic spline with α
i
=
β
i
=
1 and γ
i
=
2. (c) C
2 rational cubic spline by using derivative calculated from tridiagonal equation (7) with α
i
=
β
i
=
1 and γ
i
=
2. (d) The graphs of (b)  C
1 rational cubic spline (blue) and (c) C
2 rational cubic spline (red).
(a)
(b)
(c)
(d)To show the difference betweenC
2 rational cubic spline with three parameters and C
1 rational cubic spline of Karim and Kong [17–19], we choose α
i
=
β
i
=
1
;
γ
i
=
2 for both cases. The main difference is that to generate C
1 rational interpolating curves the first derivative parameter d
i
,
i
=
0,1
,
2
,
…
,
n, is calculated by using Arithmetic Mean Method (AMM); meanwhile to generate C
2 rational cubic spline with three parameters, the first derivative parameter d
i
,
i
=
1,2
,
…
,
n
-
1, is calculated by solving (7) with suitable choices of the end point derivatives d
0 and d
n.Remark 2.
IfΔ
i
-
d
i
=
0 or d
i
+
1
-
Δ
i
=
0, then d
i
=
d
i
+
1
=
Δ
i. In this case the rational interpolant in (10) will be linear in the corresponding interval or region; that is,(17)
s
x
=
1
-
θ
f
i
+
θ
f
i
+
1
.Figure2 shows the shape control using the rational cubic spline for the given data in Table 1.Figure 2
Shape control of rational cubic interpolating curves with various values of shape parameters list in Table2.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)Table 2
Shape parameters value for Figure2.
Figure2
i
0
1
2
3
Figure2(a)
α
i
0.1
0.1
0.1
0.1
β
i
1
1
1
1
γ
i
1
1
1
1
Figure2(b)
α
i
1
1
1
1
β
i
0.1
0.1
0.1
0.1
γ
i
1
1
1
1
Figure2(c)
α
i
1
1
1
1
β
i
1
1
1
1
γ
i
100
100
100
100
Figure2(d)
α
i
5
5
5
5
β
i
5
5
5
5
γ
i
100
100
100
100
Figure2(e)
α
i
5
5
5
5
β
i
5
5
5
5
γ
i
1000
1000
1000
1000
Figure2(h)
α
i
0.01
0.01
0.01
0.01
β
i
0.01
0.01
0.01
0.01
γ
i
1
1
1
1
Figure2(i)
α
i
0.01
0.01
0.01
0.01
β
i
1
1
1
1
γ
i
1
1
1
1
Figure2(j)
α
i
1
1
1
1
β
i
0.01
0.01
0.01
0.01
γ
i
1
1
1
1Figure2(f) shows the combination of Figures 2(a), 2(d), and 2(e). Meanwhile Figure 2(g) shows the combination of Figures 2(a), 2(b), and 2(c), respectively.Clearly the curves approach to the straight line ifα
i
→
0, β
i
→
0, or γ
i
→
∞. Furthermore decreases in the value of β
i will pull the curves upward and vice versa. This shape control will be useful for shape preserving interpolation as well as local control of the interpolating curves.Meanwhile from Figure1(d), it can be seen clearly that C
2 rational cubic spline interpolation (shown as red color) is smoother than C
1 rational cubic spline interpolation (shown as black color). Thus the new C
2 rational cubic spline provides good alternative to the existing C
1 and C
2 rational cubic spline.Remark 3.
Since the constructedC
2 rational cubic spline has three parameters, then how do we choose the parameter values? To answer this question, the choices of the parameters totally depend on the data that are under considerations by the main user. The main difference between our C
2 rational cubic spline and C
2 cubic spline interpolation is that, in order to change the final shape of the interpolating curves, our schemes are only required to change the parameters values without the need to change the data points itself. But there are no free parameters in the descriptions of C
2 cubic spline interpolation.


## 3. Positivity Preserving UsingC
2 Rational Cubic Spline Interpolation

In this section, the positivity preserving by using the proposedC
2 rational cubic spline interpolation defined by (10) will be discussed in detail. We follow the same idea of Karim and Kong [18] and Abbas et al. [12] such that simple data-dependent conditions for positivity are derived on one parameter γ
i while the remaining parameters α
i and β
i are free to be utilized. The main objective is that, in order to preserve the positivity of the positive data, the rational cubic spline interpolant must be positive on the entire given interval. The simple way to achieve it is by finding the automated choice of the shape parameter γ
i. We begin by giving the definition of strictly positive data.Given the strictly positive set of datax
i
,
f
i
,
i
=
0,1
,
…
,
n
,
x
0
<
x
1
<
⋯
<
x
n, such that (18)
f
i
>
0
,
i
=
0,1
,
…
,
n
.Now from (10), the rational cubic spline will preserve the positivity of the data if and only if P
i
θ
>
0 and Q
i
θ
>
0. Since for all α
i
,
β
i
>
0 and γ
i
≥
0, the denominator Q
i
θ
>
0
,
i
=
0,1
,
…
,
n
-
1. Thus s
x
>
0 if and only if P
i
θ
>
0
,
i
=
0,1
,
…
,
n
-
1
. The cubic polynomial P
i
θ
,
i
=
0,1
,
…
,
n
-
1 can be written as follows [18]:(19)
P
i
θ
=
B
i
θ
3
+
C
i
θ
2
+
D
i
θ
+
E
i
,where (20)
B
i
=
α
i
h
i
d
i
+
β
i
h
i
d
i
+
1
+
2
α
i
β
i
f
i
+
γ
i
f
i
-
2
α
i
β
i
f
i
+
1
-
γ
i
f
i
+
1
,
C
i
=
-
2
α
i
h
i
d
i
-
β
i
h
i
d
i
+
1
+
α
i
f
i
-
4
α
i
β
i
f
i
-
2
γ
i
f
i
+
β
i
f
i
+
1
+
2
α
i
β
i
f
i
+
1
+
γ
i
f
i
+
1
,
D
i
=
α
i
h
i
d
i
-
2
α
i
f
i
+
2
α
i
β
i
f
i
+
γ
i
f
,
E
i
=
α
i
f
i
.From Schmidt and Hess [30], with variable substitution θ
=
s
/
(
1
+
s
), s
≥
0, P
i
θ, i
=
0,1
,
…
,
n
-
1, can be rewritten as follows:(21)
P
i
s
=
A
s
3
+
B
s
2
+
C
s
+
D
,where(22)
A
=
β
i
f
i
+
1
,
B
=
2
α
i
β
i
+
β
i
+
γ
i
f
i
+
1
-
β
i
h
i
d
i
+
1
,
C
=
2
α
i
β
i
+
α
i
+
γ
i
f
i
-
α
i
h
i
d
i
,
D
=
α
i
f
i
.Theorem 4.
For strictly positive data defined in (18), C
2 rational cubic interpolant defined over the interval x
0
,
x
n is positive if in each subinterval x
i
,
x
i
+
1
,
i
=
0,1
,
…
,
n
-
1, the involving parameters α
i
,
β
i, and γ
i satisfy the following sufficient conditions:(23)
α
i
,
β
i
>
0
,
γ
i
>
M
a
x
0
,
-
α
i
h
i
d
i
+
2
β
i
+
1
f
i
f
i
,
β
i
h
i
d
i
+
1
-
2
α
i
+
1
f
i
+
1
f
i
+
1
.Remark 5.
The sufficient condition for positivity preserving by usingC
2 rational cubic interpolant is different from the sufficient condition for positivity preserving by using C
1 rational cubic interpolant of Karim and Kong [18]. To achieve C
2 continuity, the derivative parameters d
i
,
i
=
1,2
,
…
,
n
-
1, must be calculated from C
2 condition given in (7); meanwhile to achieve C
1 continuity, the derivative parameters d
i
,
i
=
0,1
,
2
,
…
,
n, are estimated by using standard approximation methods such as Arithmetic Mean Method (AMM).Remark 6.
The sufficient condition in (23) can be rewritten as(24)
α
i
,
β
i
>
0
,
γ
i
=
λ
i
+
M
a
x
0
,
-
α
i
h
i
d
i
+
2
β
i
+
1
f
i
f
i
,
β
i
h
i
d
i
+
1
-
2
α
i
+
1
f
i
+
1
f
i
+
1
,
λ
i
>
0
.The following is an algorithm that can be used to generateC
2 positivity-preserving curves.Algorithm 7 (C
2 positivity preserving).
Consider the following:(1)
Input the data pointsx
i
,
f
i
i
=
0
n
,
d
0, and d
n
.
(2)
Fori
=
0,1
,
…
,
n
-
1, calculate the parameter γ
i using (24) with suitable choices of α
i
>
0
,
β
i
>
0, and λ
i
>
0
.
(3)
Fori
=
1,2
,
…
,
n
-
1, calculate the value of derivative, d
i, by solving (7) by usingLU decomposition and so forth.
(4)
Fori
=
0,1
,
…
,
n
-
1, construct the piecewise positive C
2 rational interpolating curves defined by (10).


### 3.1. Numerical Demonstrations

In this section several numerical results for positivity preserving by usingC
2 rational interpolating curves will be shown including comparison with existing rational cubic spline schemes. Two sets of positive data taken from works by Hussain et al. [10] and Sarfraz et al. [28] were used.Figures3 and 4 show the positivity preserving by using C
2 rational cubic spline for data in Tables 3 and 5, respectively. Figures 3(a) and 4(a) show the default cubic Hermite spline polynomial for data in Tables 3 and 5, respectively. Numerical results of Figure 3(d) were obtained by using the parameters from the data in Table 4. Meanwhile numerical results of Figure 4(e) were generated by using the data in Table 6. It can be seen clearly that the positivity preserving by using our C
2 rational cubic spline gives more smooth results compared with the works of Hussain et al. [10] and Abbas et al. [12]. The graphical results in Figure 3(e) were very smooth and visually pleasing. Meanwhile for the positive data given in Table 5, our C
2 rational cubic spline gives comparable results with the works of Abbas et al. [12], Hussain et al. [10], and Sarfraz et al. [11]. The final resulting positive curves by using the proposed C
2 rational cubic spline interpolant are slightly different between the works of Abbas et al. [12], Hussain et al. [10], and Sarfraz et al. [11]. Finally Figure 5 shows the examples of positive interpolating by using Fritsch and Carlson [1] cubic spline schemes that are well documented in Matlab as PCHIP. It can be seen clearly that shape preserving by using PCHIP does not give smooth results and is not visually pleasing enough. Some of the interpolating curves tend to overshot on some interval that the interpolating curves are tight when compared with our work in this paper. For instance, in Figure 4(b), the interpolating curves are very tight and not visually pleasing.Table 3
A positive data from work by Hussain et al. [10].
i
0
1
2
3
x
i
0.0
1.0
1.70
1.80
f
i
0.25
1.0
11.10
25Table 4
Numerical results.
i
0
1
2
3
d
i (C
1)
−7.296
8.796
123.429
154.570
Δ
i
0.75
14.429
139
α
i
0.5
0.5
0.5
β
i
0.5
0.5
0.5
γ
i
13.84
3.14
0.25
d
i (C
2)
−7.296
2.108
82.5421
154.570Table 5
A Positive data from work by Sarfraz et al. [28].
i
0
1
2
3
4
5
6
x
i
2
3
7
8
9
13
14
f
i
10
2
3
7
2
3
10Table 6
Numerical results.
i
0
1
2
3
4
5
6
d
i (C
1)
−9.65
−6.35
3.25
0
−3.95
5.65
8.35
Δ
i
−8
2.25
4.0
−0.5
0.25
7
α
i
2.5
2.5
2.5
2.5
2.5
2.5
β
i
2.5
2.5
2.5
2.5
2.5
2.5
γ
i
0.1
16.85
0.1
0.1
4.85
0.1
d
i (C
2)
−9.65
−4.86
3.34
−0.48
−4.057
5.25
8.35Figure 3
Comparison of (a) cubic Hermite spline curve, (b) Hussain et al. [10], (c) Abbas et al. [12], and positivity-preserving rational cubic spline with values of shape parameters: (d) α
i
=
β
i
=
0.5; (e) α
i
=
β
i
=
2.
(a)
(b)
(c)
(d)
(e)Figure 4
Comparison of (a) cubic Hermite spline curve, (b) Sarfraz et al. [11], (c) Abbas et al. [12], and positivity-preserving rational cubic spline with values of shape parameters: (d) α
i
=
β
i
=
0.5; (e) α
i
=
β
i
=
2.5.
(a)
(b)
(c)
(d)
(e)Figure 5
(a)
(b)Error Analysis. In this section, the error analysis for the function to be interpolated is f
t
∈
C
3
t
0
,
t
n using our C
2 rational cubic spline which will be discussed in detail. Note that the constructed rational cubic spline with three parameters is a local interpolant and without loss of generality, we may just consider the error on the subinterval I
i
=
t
i
,
t
i
+
1. By using Peano Kernel Theorem [31] the error of interpolation in each subinterval I
i
=
t
i
,
t
i
+
1 is defined as (25)
R
f
=
f
t
-
P
i
t
=
1
2
∫
t
i
t
i
+
1
f
3
R
t
t
-
τ
+
2
d
τ
,where (26)
R
t
t
-
τ
+
2
=
r
τ
,
t
,
t
i
<
τ
<
t
,
s
τ
,
t
,
t
<
τ
<
t
i
+
1with(27)
r
τ
,
t
=
t
-
τ
2
+
s
τ
,
t
,
s
τ
,
t
=
-
2
α
i
β
i
+
β
i
+
γ
i
ζ
2
-
2
h
i
β
i
ζ
θ
2
1
-
θ
+
β
i
ζ
2
θ
3
Q
i
θwith ζ
=
t
i
+
1
-
τ.The absolute error in each subintervalI
i
=
x
i
,
x
i
+
1 is given as follows:(28)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
.In order to enable us to derive the error analysis of C
2 rational cubic spline interpolation, we need to study the properties of the kernel functions r
τ
,
t and s
τ
,
t and evaluate the following definite integrals: (29)
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
∫
t
i
t
r
τ
,
x
d
τ
+
∫
t
t
i
+
1
s
τ
,
x
d
τ
.To simplify the integrals in (29) we begin by finding the roots of r
t
,
t
=
0,  r
τ
,
t
=
0, and s
τ
,
t
=
0, respectively. It is easy to see that the roots of r
t
,
t
=
0 in 0,1 are θ
=
0,1 and θ
∗
=
1
-
β
i
/
ρ
i, where ρ
i
=
2
α
i
β
i
+
γ
i. Meanwhile the roots of r
τ
,
t
=
0 are(30)
τ
k
=
x
-
θ
h
i
θ
ρ
i
+
-
1
k
+
1
H
α
i
+
θ
ρ
i
,
k
=
1,2
,where(31)
H
=
ρ
i
-
β
i
α
i
+
ρ
i
θ
-
α
i
ρ
i
θ
.The roots of s
τ
,
t
=
0 are τ
3
=
t
i
+
1
,
τ
4
=
t
i
+
1
-
2
β
i
h
i
1
-
θ
/
(
β
i
+
1
-
θ
ρ
i
). Thus the following three cases can be obtained.Case 1.
For0
≤
β
i
/
ρ
i
≤
1
,
0
<
θ
<
θ
∗, then (28) takes the following form: (32)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
G
i
τwith (33)
G
i
τ
=
∫
t
i
t
-
r
τ
,
t
d
τ
+
∫
t
τ
4
-
s
τ
,
t
d
τ
+
∫
τ
4
t
i
+
1
s
τ
,
t
d
τ
.Hence (34)
f
t
-
P
i
t
≤
f
3
τ
ζ
1
α
i
,
β
i
,
γ
i
,
θ
,where (35)
ζ
1
α
i
,
β
i
,
γ
i
,
θ
=
-
h
i
3
θ
3
3
+
β
i
h
i
3
θ
3
3
Q
i
θ
-
2
ρ
i
+
β
i
8
h
i
3
θ
2
1
-
θ
4
3
ρ
i
1
-
θ
+
β
i
3
Q
i
θ
+
8
β
i
2
h
i
3
θ
2
1
-
θ
2
3
ρ
i
1
-
θ
+
β
i
2
Q
i
θ
-
16
β
i
h
i
3
θ
3
1
-
θ
3
3
ρ
i
1
-
θ
+
β
i
3
Q
i
θ
+
h
i
3
1
-
θ
θ
2
3
Q
i
θ
ρ
i
-
2
β
i
.Case 2.
For0
≤
β
i
/
ρ
i
≤
1
,
θ
∗
<
θ
<
1, then (28) takes the following form: (36)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
G
2
τwith(37)
G
2
τ
=
∫
t
i
τ
2
-
r
τ
,
t
d
τ
+
∫
τ
2
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
.Hence(38)
f
t
-
P
i
t
≤
f
3
τ
ζ
2
α
i
,
β
i
,
γ
i
,
θ
,where (39)
ζ
2
α
i
,
β
i
,
γ
i
,
θ
=
2
h
i
3
θ
3
θ
ρ
i
-
H
3
3
-
2
β
i
h
i
3
θ
3
G
3
θ
3
3
Q
i
θ
-
2
ρ
i
+
β
i
h
i
3
1
-
θ
θ
2
G
3
θ
3
3
Q
i
θ
+
2
β
i
h
i
3
1
-
θ
θ
2
G
3
θ
3
Q
i
θwith G
3
θ
=
1
-
θ
+
θ
θ
ρ
i
-
H
/
α
i
+
ρ
i
θ.Case 3.
Forβ
i
/
ρ
i
>
1
,
0
<
θ
<
1, then (28) takes the following form: (40)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
∫
t
i
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
=
f
3
τ
ζ
3
α
i
,
β
i
,
γ
i
,
θ
, where(41)
ζ
3
α
i
,
β
i
,
γ
i
,
θ
=
h
i
3
θ
3
3
-
ρ
i
+
β
i
h
i
3
1
-
θ
θ
2
3
Q
i
θ
+
β
i
h
i
3
1
-
θ
θ
2
Q
i
θ
-
β
i
h
i
3
θ
3
3
Q
i
θ
.Theorem 8.
The error for the interpolating rational cubic spline interpolant defined by (1) in each subinterval I
i
=
t
i
,
t
i
+
1, when f
t
∈
C
3
t
0
,
t
n, is given by(42)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
∫
t
i
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
=
f
3
τ
c
i
,with(43)
c
i
=
max
⁡
ζ
α
i
,
β
i
,
γ
i
,
θ
,
ζ
α
i
,
β
i
,
γ
i
,
θ
=
ζ
1
α
i
,
β
i
,
γ
i
,
θ
,
0
≤
θ
≤
θ
∗
ζ
2
α
i
,
β
i
,
γ
i
,
θ
,
θ
∗
≤
θ
≤
1
ζ
3
α
i
,
β
i
,
γ
i
,
θ
,
0
≤
θ
≤
1
.Remark 9.
Whenα
i
=
1
,
β
i
=
1, and γ
i
=
0, the interpolation function defined by (1) is reduced to the standard cubic Hermite interpolation with(44)
ζ
1
α
i
,
β
i
,
γ
i
,
θ
=
4
θ
2
1
-
θ
3
3
3
-
2
θ
2
,
0
≤
θ
≤
1
2
,
ζ
2
α
i
,
β
i
,
γ
i
,
θ
=
4
θ
3
1
-
θ
2
3
1
+
2
θ
2
,
1
2
≤
θ
≤
1
,
ζ
3
α
i
,
β
i
,
γ
i
,
θ
=
0
,
0
≤
θ
≤
1
,and c
i
=
1
/
96. This is standard error for cubic Hermite polynomial spline.


## 3.1. Numerical Demonstrations

In this section several numerical results for positivity preserving by usingC
2 rational interpolating curves will be shown including comparison with existing rational cubic spline schemes. Two sets of positive data taken from works by Hussain et al. [10] and Sarfraz et al. [28] were used.Figures3 and 4 show the positivity preserving by using C
2 rational cubic spline for data in Tables 3 and 5, respectively. Figures 3(a) and 4(a) show the default cubic Hermite spline polynomial for data in Tables 3 and 5, respectively. Numerical results of Figure 3(d) were obtained by using the parameters from the data in Table 4. Meanwhile numerical results of Figure 4(e) were generated by using the data in Table 6. It can be seen clearly that the positivity preserving by using our C
2 rational cubic spline gives more smooth results compared with the works of Hussain et al. [10] and Abbas et al. [12]. The graphical results in Figure 3(e) were very smooth and visually pleasing. Meanwhile for the positive data given in Table 5, our C
2 rational cubic spline gives comparable results with the works of Abbas et al. [12], Hussain et al. [10], and Sarfraz et al. [11]. The final resulting positive curves by using the proposed C
2 rational cubic spline interpolant are slightly different between the works of Abbas et al. [12], Hussain et al. [10], and Sarfraz et al. [11]. Finally Figure 5 shows the examples of positive interpolating by using Fritsch and Carlson [1] cubic spline schemes that are well documented in Matlab as PCHIP. It can be seen clearly that shape preserving by using PCHIP does not give smooth results and is not visually pleasing enough. Some of the interpolating curves tend to overshot on some interval that the interpolating curves are tight when compared with our work in this paper. For instance, in Figure 4(b), the interpolating curves are very tight and not visually pleasing.Table 3
A positive data from work by Hussain et al. [10].
i
0
1
2
3
x
i
0.0
1.0
1.70
1.80
f
i
0.25
1.0
11.10
25Table 4
Numerical results.
i
0
1
2
3
d
i (C
1)
−7.296
8.796
123.429
154.570
Δ
i
0.75
14.429
139
α
i
0.5
0.5
0.5
β
i
0.5
0.5
0.5
γ
i
13.84
3.14
0.25
d
i (C
2)
−7.296
2.108
82.5421
154.570Table 5
A Positive data from work by Sarfraz et al. [28].
i
0
1
2
3
4
5
6
x
i
2
3
7
8
9
13
14
f
i
10
2
3
7
2
3
10Table 6
Numerical results.
i
0
1
2
3
4
5
6
d
i (C
1)
−9.65
−6.35
3.25
0
−3.95
5.65
8.35
Δ
i
−8
2.25
4.0
−0.5
0.25
7
α
i
2.5
2.5
2.5
2.5
2.5
2.5
β
i
2.5
2.5
2.5
2.5
2.5
2.5
γ
i
0.1
16.85
0.1
0.1
4.85
0.1
d
i (C
2)
−9.65
−4.86
3.34
−0.48
−4.057
5.25
8.35Figure 3
Comparison of (a) cubic Hermite spline curve, (b) Hussain et al. [10], (c) Abbas et al. [12], and positivity-preserving rational cubic spline with values of shape parameters: (d) α
i
=
β
i
=
0.5; (e) α
i
=
β
i
=
2.
(a)
(b)
(c)
(d)
(e)Figure 4
Comparison of (a) cubic Hermite spline curve, (b) Sarfraz et al. [11], (c) Abbas et al. [12], and positivity-preserving rational cubic spline with values of shape parameters: (d) α
i
=
β
i
=
0.5; (e) α
i
=
β
i
=
2.5.
(a)
(b)
(c)
(d)
(e)Figure 5
(a)
(b)Error Analysis. In this section, the error analysis for the function to be interpolated is f
t
∈
C
3
t
0
,
t
n using our C
2 rational cubic spline which will be discussed in detail. Note that the constructed rational cubic spline with three parameters is a local interpolant and without loss of generality, we may just consider the error on the subinterval I
i
=
t
i
,
t
i
+
1. By using Peano Kernel Theorem [31] the error of interpolation in each subinterval I
i
=
t
i
,
t
i
+
1 is defined as (25)
R
f
=
f
t
-
P
i
t
=
1
2
∫
t
i
t
i
+
1
f
3
R
t
t
-
τ
+
2
d
τ
,where (26)
R
t
t
-
τ
+
2
=
r
τ
,
t
,
t
i
<
τ
<
t
,
s
τ
,
t
,
t
<
τ
<
t
i
+
1with(27)
r
τ
,
t
=
t
-
τ
2
+
s
τ
,
t
,
s
τ
,
t
=
-
2
α
i
β
i
+
β
i
+
γ
i
ζ
2
-
2
h
i
β
i
ζ
θ
2
1
-
θ
+
β
i
ζ
2
θ
3
Q
i
θwith ζ
=
t
i
+
1
-
τ.The absolute error in each subintervalI
i
=
x
i
,
x
i
+
1 is given as follows:(28)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
.In order to enable us to derive the error analysis of C
2 rational cubic spline interpolation, we need to study the properties of the kernel functions r
τ
,
t and s
τ
,
t and evaluate the following definite integrals: (29)
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
∫
t
i
t
r
τ
,
x
d
τ
+
∫
t
t
i
+
1
s
τ
,
x
d
τ
.To simplify the integrals in (29) we begin by finding the roots of r
t
,
t
=
0,  r
τ
,
t
=
0, and s
τ
,
t
=
0, respectively. It is easy to see that the roots of r
t
,
t
=
0 in 0,1 are θ
=
0,1 and θ
∗
=
1
-
β
i
/
ρ
i, where ρ
i
=
2
α
i
β
i
+
γ
i. Meanwhile the roots of r
τ
,
t
=
0 are(30)
τ
k
=
x
-
θ
h
i
θ
ρ
i
+
-
1
k
+
1
H
α
i
+
θ
ρ
i
,
k
=
1,2
,where(31)
H
=
ρ
i
-
β
i
α
i
+
ρ
i
θ
-
α
i
ρ
i
θ
.The roots of s
τ
,
t
=
0 are τ
3
=
t
i
+
1
,
τ
4
=
t
i
+
1
-
2
β
i
h
i
1
-
θ
/
(
β
i
+
1
-
θ
ρ
i
). Thus the following three cases can be obtained.Case 1.
For0
≤
β
i
/
ρ
i
≤
1
,
0
<
θ
<
θ
∗, then (28) takes the following form: (32)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
G
i
τwith (33)
G
i
τ
=
∫
t
i
t
-
r
τ
,
t
d
τ
+
∫
t
τ
4
-
s
τ
,
t
d
τ
+
∫
τ
4
t
i
+
1
s
τ
,
t
d
τ
.Hence (34)
f
t
-
P
i
t
≤
f
3
τ
ζ
1
α
i
,
β
i
,
γ
i
,
θ
,where (35)
ζ
1
α
i
,
β
i
,
γ
i
,
θ
=
-
h
i
3
θ
3
3
+
β
i
h
i
3
θ
3
3
Q
i
θ
-
2
ρ
i
+
β
i
8
h
i
3
θ
2
1
-
θ
4
3
ρ
i
1
-
θ
+
β
i
3
Q
i
θ
+
8
β
i
2
h
i
3
θ
2
1
-
θ
2
3
ρ
i
1
-
θ
+
β
i
2
Q
i
θ
-
16
β
i
h
i
3
θ
3
1
-
θ
3
3
ρ
i
1
-
θ
+
β
i
3
Q
i
θ
+
h
i
3
1
-
θ
θ
2
3
Q
i
θ
ρ
i
-
2
β
i
.Case 2.
For0
≤
β
i
/
ρ
i
≤
1
,
θ
∗
<
θ
<
1, then (28) takes the following form: (36)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
G
2
τwith(37)
G
2
τ
=
∫
t
i
τ
2
-
r
τ
,
t
d
τ
+
∫
τ
2
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
.Hence(38)
f
t
-
P
i
t
≤
f
3
τ
ζ
2
α
i
,
β
i
,
γ
i
,
θ
,where (39)
ζ
2
α
i
,
β
i
,
γ
i
,
θ
=
2
h
i
3
θ
3
θ
ρ
i
-
H
3
3
-
2
β
i
h
i
3
θ
3
G
3
θ
3
3
Q
i
θ
-
2
ρ
i
+
β
i
h
i
3
1
-
θ
θ
2
G
3
θ
3
3
Q
i
θ
+
2
β
i
h
i
3
1
-
θ
θ
2
G
3
θ
3
Q
i
θwith G
3
θ
=
1
-
θ
+
θ
θ
ρ
i
-
H
/
α
i
+
ρ
i
θ.Case 3.
Forβ
i
/
ρ
i
>
1
,
0
<
θ
<
1, then (28) takes the following form: (40)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
∫
t
i
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
=
f
3
τ
ζ
3
α
i
,
β
i
,
γ
i
,
θ
, where(41)
ζ
3
α
i
,
β
i
,
γ
i
,
θ
=
h
i
3
θ
3
3
-
ρ
i
+
β
i
h
i
3
1
-
θ
θ
2
3
Q
i
θ
+
β
i
h
i
3
1
-
θ
θ
2
Q
i
θ
-
β
i
h
i
3
θ
3
3
Q
i
θ
.Theorem 8.
The error for the interpolating rational cubic spline interpolant defined by (1) in each subinterval I
i
=
t
i
,
t
i
+
1, when f
t
∈
C
3
t
0
,
t
n, is given by(42)
f
t
-
P
i
t
≤
1
2
f
3
τ
∫
t
i
t
i
+
1
R
t
t
-
τ
+
2
d
τ
=
1
2
f
3
τ
∫
t
i
t
r
τ
,
t
d
τ
+
∫
t
t
i
+
1
s
τ
,
t
d
τ
=
f
3
τ
c
i
,with(43)
c
i
=
max
⁡
ζ
α
i
,
β
i
,
γ
i
,
θ
,
ζ
α
i
,
β
i
,
γ
i
,
θ
=
ζ
1
α
i
,
β
i
,
γ
i
,
θ
,
0
≤
θ
≤
θ
∗
ζ
2
α
i
,
β
i
,
γ
i
,
θ
,
θ
∗
≤
θ
≤
1
ζ
3
α
i
,
β
i
,
γ
i
,
θ
,
0
≤
θ
≤
1
.Remark 9.
Whenα
i
=
1
,
β
i
=
1, and γ
i
=
0, the interpolation function defined by (1) is reduced to the standard cubic Hermite interpolation with(44)
ζ
1
α
i
,
β
i
,
γ
i
,
θ
=
4
θ
2
1
-
θ
3
3
3
-
2
θ
2
,
0
≤
θ
≤
1
2
,
ζ
2
α
i
,
β
i
,
γ
i
,
θ
=
4
θ
3
1
-
θ
2
3
1
+
2
θ
2
,
1
2
≤
θ
≤
1
,
ζ
3
α
i
,
β
i
,
γ
i
,
θ
=
0
,
0
≤
θ
≤
1
,and c
i
=
1
/
96. This is standard error for cubic Hermite polynomial spline.


## 4. Discussions

From all numerical results presented in Section3.1, it can be seen clearly that the proposed C
2 rational cubic spline works very well and it is comparable with existing schemes such as Hussain et al. [10], Sarfraz et al. [11], and Abbas et al. [12] for positivity preserving. Furthermore similar to the construction of rational cubic of Abbas et al. [8] our C
2 rational cubic spline interpolation also has three parameters where two are free parameters. But based on our numerical experiments, it was noticed that schemes of Abbas et al. [12] may not be able to produce completely C
2 positive interpolating curves. Meanwhile the sufficient condition for positivity, monotonicity, and convexity preserving and data constrained are derived on the remaining parameter. One of the advantages by using our C
2 rational cubic spline is that when γ
i
=
0 we may obtain the new variant of C
2 rational cubic spline of Hussain and Ali [32], M. Z. Hussain and M. Hussain [9], and Tian et al. [20] for positivity- and convexity-preserving interpolation. Thus our C
2 rational cubic spline has a larger spline class compared to the works by Abbas et al. [12]. Furthermore the error analysis when the function to be interpolated is f
t
∈
C
3
t
0
,
t
n also has been derived in detail.


## 5. Conclusions

In this paper the newC
2 rational cubic spline with three parameters has been introduced. It is an extension to the work of Karim and Pang [16]. To achieve C
2 continuity at the join knots x
i
,
i
=
1,2
,
…
,
n
-
1, the first derivative value, d
i, is calculated by solving systems of linear equation (tridiagonal) that is strictly positive and the solution is unique. Shape control of the new C
2 rational cubic interpolation with numerical examples also was presented. Finally C
2 rational cubic spline has been used for positivity preserving including a comparison with existing schemes. From the numerical results clearly our C
2 rational cubic spline gives comparable results with existing schemes. Finally work in parametric shape preserving is underway by the authors.



---

*Source: 4875358-2016-07-19.xml*