Abstract

This paper discusses the construction of new 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 , , and . The sufficient conditions for the positivity are derived on one parameter while the other two parameters and 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 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 continuity can be achieved by solving tridiagonal systems of linear equations for the unknown first derivatives , . Comparisons with existing schemes also have been done in detail. From all presented numerical results the new 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 is also investigated in detail.

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, , 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 -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 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 rational cubic spline with two free parameters. Another paper concerning rational spline can be found by Delbourgo [13], Gregory [14], and Delbourgo and Gregory [15]. Karim and Kong [1619] have proposed new 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 . 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 rational cubic spline for positivity, monotonicity, and convexity preserving and data constrained modeling. Under some circumstances our rational cubic spline will give new rational cubic spline based on rational cubic spline defined by Tian et al. [20]. Numerical comparison between 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 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 paper 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 [1719], M. Z. Hussain and M. Hussain [9], and Sarfraz [5] the degree of smoothness attained is .(ii)Hussain et al. [10] and Sarfraz et al. [11] discussed the positivity by using 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 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 continuity.(iii)When , we may obtain the new rational cubic spline with two parameters, an extension to the original rational cubic spline of Tian et al. [20]. Thus our 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 the 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 rational spline of Karim and Kong [1719] 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 -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. Section 2 introduces the new 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 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. Rational Cubic Spline Interpolant

This section will introduce 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 continuity while in work by Karim and Kong [18] it has continuity. We begin with the definition of rational cubic spline interpolant, given set of data points such that . Let , and , where . For , , the rational cubic spline interpolant with three parameters is defined as follows:The following conditions will assure that the rational cubic spline interpolant in (1) has continuity: where and denote the first- and second-order derivative with respect to , respectively. Meanwhile the notations and correspond to the right and left second derivatives values. Furthermore denotes the derivative value which is given at the knot , .

By using (2), the required rational cubic spline interpolant with three parameters defined by (1) has the unknowns , , and is given as follows: The parameters , are used to control the final shape of the interpolating curves. From work by Karim and Kong [19], the second-order derivative is given aswhereNow continuity, , will give Now (6) provides the following system of linear equations that can be used to compute the first derivative parameters, , such that withThe system of linear equations given by (7) is strictly tridiagonal and has a unique solution for the unknown derivative parameters , for all . The system in (7) gives linear equations for 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, and : By using (3), rational cubic spline interpolant in (1) can be reformulated and is given as follows: whereThe data-dependent sufficient conditions on parameters will be developed in order to preserve the positivity, data constrained, monotonicity, and convexity on the entire interval . The remaining parameters and 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 ( rational cubic spline interpolant). The rational cubic spline with three parameters defined by (1) is if there exist positive parameters , and , that satisfy (7).

The choice of the end point derivatives and depended on the original data which are chosen as follows.

Choice 1 (Geometric Mean Method (GMM)). Consider

Choice 2 (Arithmetic Mean Method (AMM)). ConsiderDelbourgo 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 and , respectively.

Some observation and shape control analysis of the new rational cubic spline interpolant defined by (10) are given as follows:(1)When , the rational interpolant in (10) reduces to the rational spline of the form cubic/quadratic by Tian et al. [20] and we may obtain rational cubic spline with two parameters, an extension to rational cubic spline originally proposed by Tian et al. [20]. Thus by rewriting condition in (7), we can obtain rational cubic of Tian et al. [20].(2)When , the rational cubic interpolant in (1) is just a standard cubic Hermite spline with continuity that may not be able to completely preserve the positivity of the data [18]:for (3)Furthermore the rational interpolant in (1) can be written as [18] (4)Obviously when , or , the rational interpolant in (10) converges to following straight line: Either the decrease of the parameters and or the increase of 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.

To show the difference between rational cubic spline with three parameters and rational cubic spline of Karim and Kong [1719], we choose for both cases. The main difference is that to generate rational interpolating curves the first derivative parameter , is calculated by using Arithmetic Mean Method (AMM); meanwhile to generate rational cubic spline with three parameters, the first derivative parameter , is calculated by solving (7) with suitable choices of the end point derivatives and .

Remark 2. If or , then . In this case the rational interpolant in (10) will be linear in the corresponding interval or region; that is,

Figure 2 shows the shape control using the rational cubic spline for the given data in Table 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 , , or . Furthermore decreases in the value of 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 rational cubic spline interpolation (shown as red color) is smoother than rational cubic spline interpolation (shown as black color). Thus the new rational cubic spline provides good alternative to the existing and rational cubic spline.

Remark 3. Since the constructed 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 rational cubic spline and 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 cubic spline interpolation.

3. Positivity Preserving Using Rational Cubic Spline Interpolation

In this section, the positivity preserving by using the proposed 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 while the remaining parameters and 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 . We begin by giving the definition of strictly positive data.

Given the strictly positive set of data , such that Now from (10), the rational cubic spline will preserve the positivity of the data if and only if and . Since for all and , the denominator . Thus if and only if The cubic polynomial can be written as follows [18]:where From Schmidt and Hess [30], with variable substitution , , , , can be rewritten as follows:where

Theorem 4. For strictly positive data defined in (18), rational cubic interpolant defined over the interval is positive if in each subinterval , the involving parameters , and satisfy the following sufficient conditions:

Remark 5. The sufficient condition for positivity preserving by using rational cubic interpolant is different from the sufficient condition for positivity preserving by using rational cubic interpolant of Karim and Kong [18]. To achieve continuity, the derivative parameters , must be calculated from condition given in (7); meanwhile to achieve continuity, the derivative parameters , are estimated by using standard approximation methods such as Arithmetic Mean Method (AMM).

Remark 6. The sufficient condition in (23) can be rewritten as

The following is an algorithm that can be used to generate positivity-preserving curves.

Algorithm 7 ( positivity preserving). Consider the following:(1)Input the data points , and (2)For , calculate the parameter using (24) with suitable choices of , and (3)For , calculate the value of derivative, , by solving (7) by using LU decomposition and so forth.(4)For , construct the piecewise positive rational interpolating curves defined by (10).

3.1. Numerical Demonstrations

In this section several numerical results for positivity preserving by using 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 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 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 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 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.

Error Analysis. In this section, the error analysis for the function to be interpolated is using our 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 . By using Peano Kernel Theorem [31] the error of interpolation in each subinterval is defined as where withwith .

The absolute error in each subinterval is given as follows:In order to enable us to derive the error analysis of rational cubic spline interpolation, we need to study the properties of the kernel functions and and evaluate the following definite integrals: To simplify the integrals in (29) we begin by finding the roots of ,  , and , respectively. It is easy to see that the roots of in are and , where . Meanwhile the roots of arewhereThe roots of are . Thus the following three cases can be obtained.

Case 1. For , then (28) takes the following form: with Hence where

Case 2. For , then (28) takes the following form: withHencewhere with .

Case 3. For , then (28) takes the following form: where

Theorem 8. The error for the interpolating rational cubic spline interpolant defined by (1) in each subinterval , when , is given bywith

Remark 9. When , and , the interpolation function defined by (1) is reduced to the standard cubic Hermite interpolation withand . 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 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 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 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 rational cubic spline is that when we may obtain the new variant of 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 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 also has been derived in detail.

5. Conclusions

In this paper the new rational cubic spline with three parameters has been introduced. It is an extension to the work of Karim and Pang [16]. To achieve continuity at the join knots , the first derivative value, , is calculated by solving systems of linear equation (tridiagonal) that is strictly positive and the solution is unique. Shape control of the new rational cubic interpolation with numerical examples also was presented. Finally rational cubic spline has been used for positivity preserving including a comparison with existing schemes. From the numerical results clearly our 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.