This paper discusses the construction of new C2 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 C2 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 C2 continuity can be achieved by solving tridiagonal systems of linear equations for the unknown first derivatives di, i=1,…,n-1. Comparisons with existing schemes also have been done in detail. From all presented numerical results the new C2 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 ft∈C3t0,tn is also investigated in detail.
Universiti Teknologi Petronas0153AA-D911. 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, C2, 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 C2 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 C2 rational cubic spline with two free parameters. Another paper concerning C2 rational spline can be found by Delbourgo [13], Gregory [14], and Delbourgo and Gregory [15]. Karim and Kong [16–19] have proposed new C1 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 ft∈C3t0,tn. 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 C2 rational cubic spline for positivity, monotonicity, and convexity preserving and data constrained modeling. Under some circumstances our C2 rational cubic spline will give new C2 rational cubic spline based on rational cubic spline defined by Tian et al. [20]. Numerical comparison between C2 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 C2 rational cubic spline gives comparable results with existing rational cubic spline schemes. The main scientific contribution of this paper is summarized as follows:
In this paper C2 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 C1.
Hussain et al. [10] and Sarfraz et al. [11] discussed the positivity by using C2 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 C2 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 C2 continuity.
When γi=0, we may obtain the new C2 rational cubic spline with two parameters, an extension to the original C1 rational cubic spline of Tian et al. [20]. Thus our C2 rational cubic spline gives a larger class of rational cubic spline which also includes the rational cubic spline of Tian et al. [20].
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.
Numerical comparisons between the C2 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 C1 rational spline of Karim and Kong [17–19] also have been done comprehensively.
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.
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. Section 2 introduces the new C2 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 C2 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.
This section will introduce C2 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 C2 continuity while in work by Karim and Kong [18] it has C1 continuity. We begin with the definition of C2 rational cubic spline interpolant, given set of data points xi,fi,i=0,1,…,n such that x0<x1<⋯<xn. Let hi=xi+1-xi, Δi=fi+1-fi/hi and θ=x-xi/hi, where 0≤θ≤1. For x∈xi,xi+1, i=0,1,2,…,n-1, the rational cubic spline interpolant with three parameters is defined as follows:(1)sx≡six=Ai01-θ3+Ai1θ1-θ2+Ai2θ21-θ+Ai3θ31-θ2αi+θ1-θ2αiβi+γi+θ2βi.The following conditions will assure that the rational cubic spline interpolant in (1) has C2 continuity: (2)sxi=fi,sxi+1=fi+1,s1xi=di,s1xi+1=di+1,s2xi+=s2xi-,where s1xi and s2xi denote the first- and second-order derivative with respect to x, respectively. Meanwhile the notations s2xi+ and s2xi- correspond to the right and left second derivatives values. Furthermore di denotes the derivative value which is given at the knot xi, i=0,1,2,…,n.
By using (2), the required C2 rational cubic spline interpolant with three parameters defined by (1) has the unknowns Aij, j=0,1,2,3, and is given as follows: (3)Ai0=αifi,Ai1=2αiβi+αi+γifi+αihidi,Ai2=2αiβi+βi+γifi+1-βihidi+1,Ai3=βifi+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 s2x is given as(4)s2x=∑j=03Cij1-θ3-jθjhiQiθ3,where(5)Ci0=2αi2γiΔi-di-βidi+1-Δi-2αiβidi-Δi,Ci1=6αi2βiΔi-di,Ci2=6αiβi2di+1-Δi,Ci3=2βi2γidi+1-Δi-αiΔi-di-2βidi+1-Δi.Now C2 continuity, s2xi+=s2xi-,i=1,2,…,n-1, will give (6)2γi-1di-Δi-1-αi-1Δi-1-di-1-2βi-1di-Δi-1hi-1βi-1=2γiΔi-di-βidi+1-Δi-2αiβidi-Δihiαi.Now (6) provides the following system of linear equations that can be used to compute the first derivative parameters, di,i=1,2,…,n-1, such that (7)aidi-1+bidi+cidi+1=ei,i=1,2,…,n-1,with(8)ai=hiαi-1αi,bi=hiαiγi-1+2αi-1βi-1+hi-1βi-1γi+2αiβi,ci=hi-1βi-1βi,ei=hiαiγi-1+αi-1+2αi-1βi-1Δi-1+hi-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 di,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, d0 and dn:(9)s1x0=d0,s1xn=dn. By using (3), C2 rational cubic spline interpolant in (1) can be reformulated and is given as follows: (10)sx≡six=PiθQiθ,where(11)Piθ=αifi1-θ3+2αiβi+αi+γifi+αihidiθ1-θ2+2αiβi+βi+γifi+1-βihidi+1θ21-θ+βifi+1θ3,Qiθ=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 xi,xi+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.
The rational cubic spline with three parameters defined by (1) is C2∈x0,xn if there exist positive parameters αi,βi>0,γi≥0, and di,i=1,2,…,n-1, that satisfy (7).
The choice of the end point derivatives d0 and dn depended on the original data which are chosen as follows.
Choice 1 (Geometric Mean Method (GMM)). Consider (12)d0=0,Δ0=0orΔ2,0=0Δ01+h0/h1Δ2,1-h0/h1otherwise,dn=0Δn-1=0 or Δn,n-2=0Δn-11+hn-1/hn-2Δn,n-2-hn-1/hn-2otherwise.
Choice 2 (Arithmetic Mean Method (AMM)). Consider(13)d0=Δ0+Δ0-Δ1h0h0+h1,dn=Δn-1+Δn-1-Δn-2hn-1hn-1+hn-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 d0 and dn, respectively.
Some observation and shape control analysis of the new C2 rational cubic spline interpolant defined by (10) are given as follows:
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 C2 rational cubic spline with two parameters, an extension to C1 rational cubic spline originally proposed by Tian et al. [20]. Thus by rewriting C2 condition in (7), we can obtain C2 rational cubic of Tian et al. [20].
When αi=βi=1;γi=0, the rational cubic interpolant in (1) is just a standard cubic Hermite spline with C1 continuity that may not be able to completely preserve the positivity of the data [18]:(14)sx=1-θ21-2θfi+θ23-2θfi+1+θ1-θ2di-θ21-θdi+1,
for i=0,1,…,n-1.
Furthermore the rational interpolant in (1) can be written as [18] (15)sx=1-θfi+θfi+1+hiθ1-θαidi-Δi1-θ+βiΔi-di+1θQiθ.
Obviously when αi→0,βi→0, or γi→∞, the rational interpolant in (10) converges to following straight line: (16)limαi,βi→0,γi→∞sx=1-θfi+θfi+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.
A data from work by Sarfraz et al. [6].
i
0
1
1
3
4
xi
0
2
3
9
11
fi
0.5
1.5
7
9
13
hi
2
1
6
2
Δi
0.5
5.5
1/3
2
di (C1)
−2.833
3.833
4.7619
1.5833
2.4167
di (C2)
−2.833
4.3223
4.9828
1.2146
2.4167
Interpolating curve for data in Table 1. (a) Default C1 cubic spline with αi=βi=1 and γi=0. (b) C1 rational cubic spline with αi=βi=1 and γi=2. (c) C2 rational cubic spline by using derivative calculated from tridiagonal equation (7) with αi=βi=1 and γi=2. (d) The graphs of (b) C1 rational cubic spline (blue) and (c) C2 rational cubic spline (red).
To show the difference between C2 rational cubic spline with three parameters and C1 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 C1 rational interpolating curves the first derivative parameter di,i=0,1,2,…,n, is calculated by using Arithmetic Mean Method (AMM); meanwhile to generate C2 rational cubic spline with three parameters, the first derivative parameter di,i=1,2,…,n-1, is calculated by solving (7) with suitable choices of the end point derivatives d0 and dn.
Remark 2.
If Δi-di=0 or di+1-Δi=0, then di=di+1=Δi. In this case the rational interpolant in (10) will be linear in the corresponding interval or region; that is,(17)sx=1-θfi+θfi+1.
Figure 2 shows the shape control using the rational cubic spline for the given data in Table 1.
Shape control of rational cubic interpolating curves with various values of shape parameters list in Table 2.
Shape parameters value for Figure 2.
Figure 2
i
0
1
2
3
Figure 2(a)
αi
0.1
0.1
0.1
0.1
βi
1
1
1
1
γi
1
1
1
1
Figure 2(b)
αi
1
1
1
1
βi
0.1
0.1
0.1
0.1
γi
1
1
1
1
Figure 2(c)
αi
1
1
1
1
βi
1
1
1
1
γi
100
100
100
100
Figure 2(d)
αi
5
5
5
5
βi
5
5
5
5
γi
100
100
100
100
Figure 2(e)
αi
5
5
5
5
βi
5
5
5
5
γi
1000
1000
1000
1000
Figure 2(h)
αi
0.01
0.01
0.01
0.01
βi
0.01
0.01
0.01
0.01
γi
1
1
1
1
Figure 2(i)
αi
0.01
0.01
0.01
0.01
βi
1
1
1
1
γi
1
1
1
1
Figure 2(j)
αi
1
1
1
1
βi
0.01
0.01
0.01
0.01
γi
1
1
1
1
Figure 2(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 Figure 1(d), it can be seen clearly that C2 rational cubic spline interpolation (shown as red color) is smoother than C1 rational cubic spline interpolation (shown as black color). Thus the new C2 rational cubic spline provides good alternative to the existing C1 and C2 rational cubic spline.
Remark 3.
Since the constructed C2 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 C2 rational cubic spline and C2 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 C2 cubic spline interpolation.
In this section, the positivity preserving by using the proposed C2 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 data xi,fi,i=0,1,…,n,x0<x1<⋯<xn, such that (18)fi>0,i=0,1,…,n.Now from (10), the rational cubic spline will preserve the positivity of the data if and only if Piθ>0 and Qiθ>0. Since for all αi,βi>0 and γi≥0, the denominator Qiθ>0,i=0,1,…,n-1. Thus sx>0 if and only if Piθ>0,i=0,1,…,n-1. The cubic polynomial Piθ,i=0,1,…,n-1 can be written as follows [18]:(19)Piθ=Biθ3+Ciθ2+Diθ+Ei,where (20)Bi=αihidi+βihidi+1+2αiβifi+γifi-2αiβifi+1-γifi+1,Ci=-2αihidi-βihidi+1+αifi-4αiβifi-2γifi+βifi+1+2αiβifi+1+γifi+1,Di=αihidi-2αifi+2αiβifi+γif,Ei=αifi.From Schmidt and Hess [30], with variable substitution θ=s/(1+s), s≥0, Piθ, i=0,1,…,n-1, can be rewritten as follows:(21)Pis=As3+Bs2+Cs+D,where(22)A=βifi+1,B=2αiβi+βi+γifi+1-βihidi+1,C=2αiβi+αi+γifi-αihidi,D=αifi.
Theorem 4.
For strictly positive data defined in (18), C2 rational cubic interpolant defined over the interval x0,xn is positive if in each subinterval xi,xi+1,i=0,1,…,n-1, the involving parameters αi,βi, and γi satisfy the following sufficient conditions:(23)αi,βi>0,γi>Max0,-αihidi+2βi+1fifi,βihidi+1-2αi+1fi+1fi+1.
Remark 5.
The sufficient condition for positivity preserving by using C2 rational cubic interpolant is different from the sufficient condition for positivity preserving by using C1 rational cubic interpolant of Karim and Kong [18]. To achieve C2 continuity, the derivative parameters di,i=1,2,…,n-1, must be calculated from C2 condition given in (7); meanwhile to achieve C1 continuity, the derivative parameters di,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+Max0,-αihidi+2βi+1fifi,βihidi+1-2αi+1fi+1fi+1,λi>0.
The following is an algorithm that can be used to generate C2 positivity-preserving curves.
For i=0,1,…,n-1, calculate the parameter γi using (24) with suitable choices of αi>0,βi>0, and λi>0.
For i=1,2,…,n-1, calculate the value of derivative, di, by solving (7) by using LU decomposition and so forth.
For i=0,1,…,n-1, construct the piecewise positive C2 rational interpolating curves defined by (10).
3.1. Numerical Demonstrations
In this section several numerical results for positivity preserving by using C2 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.
Figures 3 and 4 show the positivity preserving by using C2 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 C2 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 C2 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 C2 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.
A positive data from work by Hussain et al. [10].
i
0
1
2
3
xi
0.0
1.0
1.70
1.80
fi
0.25
1.0
11.10
25
Numerical results.
i
0
1
2
3
di (C1)
−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
di (C2)
−7.296
2.108
82.5421
154.570
A Positive data from work by Sarfraz et al. [28].
i
0
1
2
3
4
5
6
xi
2
3
7
8
9
13
14
fi
10
2
3
7
2
3
10
Numerical results.
i
0
1
2
3
4
5
6
di (C1)
−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
di (C2)
−9.65
−4.86
3.34
−0.48
−4.057
5.25
8.35
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.
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.
Error Analysis. In this section, the error analysis for the function to be interpolated is ft∈C3t0,tn using our C2 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 Ii=ti,ti+1. By using Peano Kernel Theorem [31] the error of interpolation in each subinterval Ii=ti,ti+1 is defined as (25)Rf=ft-Pit=12∫titi+1f3Rtt-τ+2dτ,where (26)Rtt-τ+2=rτ,t,ti<τ<t,sτ,t,t<τ<ti+1with(27)rτ,t=t-τ2+sτ,t,sτ,t=-2αiβi+βi+γiζ2-2hiβiζθ21-θ+βiζ2θ3Qiθwith ζ=ti+1-τ.
The absolute error in each subinterval Ii=xi,xi+1 is given as follows:(28)ft-Pit≤12f3τ∫titi+1Rtt-τ+2dτ.In order to enable us to derive the error analysis of C2 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)∫titi+1Rtt-τ+2dτ=∫titrτ,xdτ+∫tti+1sτ,xdτ.To simplify the integrals in (29) we begin by finding the roots of rt,t=0, rτ,t=0, and sτ,t=0, respectively. It is easy to see that the roots of rt,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-θhiθρi+-1k+1Hαi+θρi,k=1,2,where(31)H=ρi-βiαi+ρiθ-αiρiθ.The roots of sτ,t=0 are τ3=ti+1,τ4=ti+1-2βihi1-θ/(βi+1-θρi). Thus the following three cases can be obtained.
Case 1.
For 0≤βi/ρi≤1,0<θ<θ∗, then (28) takes the following form: (32)ft-Pit≤12f3τ∫titi+1Rtt-τ+2dτ=12f3τGiτwith (33)Giτ=∫tit-rτ,tdτ+∫tτ4-sτ,tdτ+∫τ4ti+1sτ,tdτ.Hence (34)ft-Pit≤f3τζ1αi,βi,γi,θ,where (35)ζ1αi,βi,γi,θ=-hi3θ33+βihi3θ33Qiθ-2ρi+βi8hi3θ21-θ43ρi1-θ+βi3Qiθ+8βi2hi3θ21-θ23ρi1-θ+βi2Qiθ-16βihi3θ31-θ33ρi1-θ+βi3Qiθ+hi31-θθ23Qiθρi-2βi.
Case 2.
For 0≤βi/ρi≤1,θ∗<θ<1, then (28) takes the following form: (36)ft-Pit≤12f3τ∫titi+1Rtt-τ+2dτ=12f3τG2τwith(37)G2τ=∫tiτ2-rτ,tdτ+∫τ2trτ,tdτ+∫tti+1sτ,tdτ.Hence(38)ft-Pit≤f3τζ2αi,βi,γi,θ,where (39)ζ2αi,βi,γi,θ=2hi3θ3θρi-H33-2βihi3θ3G3θ33Qiθ-2ρi+βihi31-θθ2G3θ33Qiθ+2βihi31-θθ2G3θ3Qiθwith G3θ=1-θ+θθρi-H/αi+ρiθ.
Case 3.
For βi/ρi>1,0<θ<1, then (28) takes the following form: (40)ft-Pit≤12f3τ∫titi+1Rtt-τ+2dτ=12f3τ∫titrτ,tdτ+∫tti+1sτ,tdτ=f3τζ3αi,βi,γi,θ, where(41)ζ3αi,βi,γi,θ=hi3θ33-ρi+βihi31-θθ23Qiθ+βihi31-θθ2Qiθ-βihi3θ33Qiθ.
Theorem 8.
The error for the interpolating rational cubic spline interpolant defined by (1) in each subinterval Ii=ti,ti+1, when ft∈C3t0,tn, is given by(42)ft-Pit≤12f3τ∫titi+1Rtt-τ+2dτ=12f3τ∫titrτ,tdτ+∫tti+1sτ,tdτ=f3τci,with(43)ci=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θ21-θ333-2θ2,0≤θ≤12,ζ2αi,βi,γi,θ=4θ31-θ231+2θ2,12≤θ≤1,ζ3αi,βi,γi,θ=0,0≤θ≤1,and ci=1/96. This is standard error for cubic Hermite polynomial spline.
4. Discussions
From all numerical results presented in Section 3.1, it can be seen clearly that the proposed C2 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 C2 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 C2 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 C2 rational cubic spline is that when γi=0 we may obtain the new variant of C2 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 C2 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 ft∈C3t0,tn also has been derived in detail.
5. Conclusions
In this paper the new C2 rational cubic spline with three parameters has been introduced. It is an extension to the work of Karim and Pang [16]. To achieve C2 continuity at the join knots xi,i=1,2,…,n-1, the first derivative value, di, is calculated by solving systems of linear equation (tridiagonal) that is strictly positive and the solution is unique. Shape control of the new C2 rational cubic interpolation with numerical examples also was presented. Finally C2 rational cubic spline has been used for positivity preserving including a comparison with existing schemes. From the numerical results clearly our C2 rational cubic spline gives comparable results with existing schemes. Finally work in parametric shape preserving is underway by the authors.
Competing Interests
The authors declare that there are no competing interests regarding the publication of this paper.
Acknowledgments
Samsul Ariffin Abdul Karim would like to acknowledge Universiti Teknologi PETRONAS (UTP) for the financial support received in the form of a research grant: Short Term Internal Research Funding (STIRF) no. 0153AA-D91 including the Mathematica Software.
FritschF. N.CarlsonR. E.Monotone piecewise cubic interpolationDoughertyR. L.EdelmanA. S.HymanJ. M.Nonnegativity-, monotonicity-, or convexity-preserving cubic and quintic Hermite interpolationButtS.BrodlieK. W.Preserving positivity using piecewise cubic interpolationBrodlieK. W.ButtS.Preserving convexity using piecewise cubic interpolationSarfrazM.Visualization of positive and convex data by a rational cubic spline interpolationSarfrazM.ButtS.HussainM. Z.Visualization of shaped data by a rational cubic spline interpolationSarfrazM.HussainM. Z.NisarA.Positive data modeling using spline functionAbbasM.HussainM. Z.HussainM.Visualization of data subject to positive constraintHussainM. Z.SarfrazM.ShaikhT. S.Shape preserving rational cubic spline for positive and convex dataSarfrazM.HussainM. Z.ShaikhT. S.IqbalR.Data visualization using shape preserving C2 rational splineProceeding of 5th International Conference on Information VisualisationJuly 2011London, UK52853310.1109/IV.2011.91AbbasM.MajidA. A.AwangM. N. H.AliJ. M.Positivity-preserving C2 rational cubic spline interpolationDelbourgoR.Accurate C^{2} rational interpolants in tensionGregoryJ. A.Shape preserving spline interpolationDelbourgoR.GregoryJ. A.C2 rational quadratic spline interpolation to monotonic dataKarimS. A. A.PangK. V.Local control of the curves using rational cubic splineKarimS. A. A.PangK. V.Monotonicity-preserving using rational cubic spline interpolationKarimS. A. A.KongV. P.Shape preserving interpolation using rational cubic splineKarimS. A. A.KongV. P.Convexity-preserving using rational cubic spline interpolationTianM.ZhangY.ZhuJ.DuanQ.Convexity-preserving piecewise rational cubic interpolationLambertiP.ManniC.Shape-preserving C2 functional interpolation via parametric cubicsDuanQ.WangL.TwizellE. H.A new C2 rational interpolation based on function values and constrained control of the interpolant curvesBaoF.SunQ.DuanQ.Point control of the interpolating curve with a rational cubic splineFiorotJ.-C.TabkaJ.Shape-preserving C2 cubic polynomial interpolating splinesDubeM.TiwariP.Convexity preserving C2 rational quadratic trigonometric spline1479Proceedings of the International Conference of Numerical Analysis and Applied Mathematics (ICNAAM '12)September 201299599810.1063/1.47563112-s2.0-84883119660PanY.-J.WangG.-J.Convexity-preserving interpolation of trigonometric polynomial curves with a shape parameterIbraheemF.HussainM.HussainM. Z.BhattiA. A.Positive data visualization using trigonometric functionSarfrazM.HussainM. Z.ChaudaryF. S.Shape preserving cubic spline for data visualizationDelbourgoR.GregoryJ. A.The determination of derivative parameters for a monotonic rational quadratic interpolantSchmidtJ. W.HessW.Positivity of cubic polynomials on intervals and positive spline interpolationSchultzM. H.HussainM. Z.AliJ. M.Positivity preserving piecewise rational cubic interpolation