Journal of Applied Mathematics

Volume 2016 (2016), Article ID 4875358, 14 pages

http://dx.doi.org/10.1155/2016/4875358

## Shape Preserving Interpolation Using Rational Cubic Spline

^{1}Fundamental and Applied Sciences Department, Universiti Teknologi PETRONAS, Bandar Seri Iskandar, 32610 Seri Iskandar, Perak Darul Ridzuan, Malaysia^{2}School of Mathematical Sciences, Universiti Sains Malaysia (USM), 11800 Minden, Penang, Malaysia

Received 18 January 2016; Revised 10 April 2016; Accepted 21 April 2016

Academic Editor: Francisco J. Marcellán

Copyright © 2016 Samsul Ariffin Abdul Karim and Kong Voon Pang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### 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 [16–19] 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 [17–19], 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 [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 -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.