On construction of a new interpolation tool: cubic q -spline
aa r X i v : . [ m a t h . NA ] N ov ON CONSTRUCTION OF A NEW INTERPOLATION TOOL:CUBIC q -SPLINE ORLI HERSCOVICI
Abstract.
This work presents a new interpolation tool, namely, cubic q -spline. Our new analogue generalizes a well known classical cubic spline. Thisanalogue, based on the Jackson q -derivative, replaces an interpolating piece-wise cubic polynomial function by q -polynomials of degree three at most. Theparameter q provides a solution flexibility. INTRODUCTION
The interpolation problem of an unknown function f ( x ) when only the valuesof f ( x i ) at some point x i are given arises in different areas. One of widely usedmethods is a spline interpolation, and, particularly, cubic spline interpolation. Thatmeans that the function f ( x ) is interpolated between two adjacent points x i and x i +1 by a polynomial of degree three at most. Such interpolation is very suitablefor smooth functions which do not have oscillating behaviour (cf. [1]). Anotheradvantage of the cubic polynomial interpolation is that it leads to a system of lin-ear equations which is described by a tridiagonal matrix. This linear system has aunique solution which can be fast obtained. A generalization of cubic spline inter-polation was done by Marsden (see [2]). He chose a q -representation for knots andnormalized B -splines as interpolating functions. B -splines are the generalization ofthe Bezier curves which are built with the help of Bernstein polynomials and theyplay an important role in the theory of polynomial interpolation. Their q -analogueswere defined and studied in [3, 4]. For further information and other details relatedto q-analogues of Bernstein polynomials, Bezier curves and splines, see the recentworks [5, 6, 7, 8, 9, 10]. Another q -generalization of polynomial interpolation wasstudied in [11]. Despite the popularity of B -spline, new generalizations of splinecontinue to appear. Some of them concerns about preserving of convexity [12],some of them about smoothness of interpolation [13], and others about degrees offreedom [14]. Classical cubic spline already proved itself in data and curve fittingproblems. Our new q -generalization gives it a new interesting twist. The matrixdescribing the linear system is tridiagonal like in the classic case, and a solution ofthis linear system can be obtained by simple recursive algorithm (see for example[15]). The q -parameter provides a flexibility of the solution.We start from a short review of definitions coming from the quantum calculus(cf. [16]). The q -derivative is given by D q f ( x ) = f ( qx ) − f ( x ) qx − x . For any complex number c , its q -analogue is defined as [ c ] q = q c − q − . For natural n ,a q -factorial is defined as [ n ] q ! = Q nk =1 [ k ] q , with [0] q ! = 1. The q -analogue of the polynomial is ( x − c ) nq = Q nk =1 ( x − cq k − ) by assuming asusually that ( x − c ) q = 1. It is easy to show that D q ( x − c ) nq = [ n ] q ( x − c ) n − q . Wewill denote by D kq the k -th q -derivative. The Jackson q -integral of f ( x ) is definedas (cf. [16, 17]) Z f ( x ) d q x = (1 − q ) x ∞ X j =0 q j f ( q j x ) , and D q R f ( x ) d q x = f ( x ). Note that q is usually considered to be 0 < q < q -spline.2. BUILDING OF A q -ANALOGUE OF CUBIC SPLINE Let a function f ( x ) is given by its values f ( x i ) = f i , 0 ≤ i ≤ n , at n + 1 nodes a = x < x < . . . < x n = b . We define the cubic q -spline function S ( x ; q ) as afunction of a variable x with parameter q as following:(1) S ( x ; q ) = S ( x ; q ) x ≤ x ≤ x ,S ( x ; q ) x < x ≤ x ,. . . . . .S n ( x ; q ) x n − < x ≤ x n , where each S i ( x ; q ), 1 ≤ i ≤ n , is a q -polynomial in variable x of degree at mostthree, and S ( x ; q ), D q S ( x ; q ), D q S ( x ; q ) are continuous on [ a, b ]. To provide theseproperties we demand(2) (cid:26) S i ( x i − ; q ) = f ( x i − ) , i = 1 , . . . , n,S i ( x i ; q ) = f ( x i ) , i = 1 , . . . , n,D q S i ( x i ; q ) = D q S i +1 ( x i ; q ) , i = 1 , . . . , n − , (3) D q S i ( x i ; q ) = D q S i +1 ( x i ; q ) , i = 1 , . . . , n − . (4)The boundary conditions for the clamped cubic q -spline are(5) (cid:26) D q S ( x ; q ) = D q f ( x ) ,D q S n ( x n ; q ) = D q f ( x n ) . Let us denote by µ i ( q ), i = 0 , . . . , n the value of the second q -derivative of thespline S ( x ; q ) at the node x i , that is µ i ( q ) = D q S ( x i ; q ). Since the spline S ( x ; q ) is apolynomial of degree at most three, its second derivative is a polynomial of degreeat most one. Therefore it can be written as D q S i ( x ; q ) = µ i − ( q ) x i − xh i + µ i ( q ) x − x i − h i , where h i = x i − x i − and x i − ≤ x ≤ x i for 1 ≤ i ≤ n . By performing q -integrationwe obtain(6) D q S i ( x ; q ) = Z D q S i ( x ; q ) d q x = µ i ( q )[2] q h i ( x − x i − ) q − µ i − ( q )[2] q h i ( x − x i ) q + A i ( q ) . Let us denote by f [ x i − , x i ] = f ( x i ) − f ( x i − ) x i − x i − the first order divided difference of afunction f ( x ) at nodes x i − , x i . By integrating (6), we obtain(7) S i ( x ; q ) = Z D q S i ( x ; q ) d q x = µ i ( q )[3] q ! h i ( x − x i − ) q − µ i − ( q )[3] q ! h i ( x − x i ) q + A i ( q )( x − x i − )+ B i ( q ) , N CONSTRUCTION OF A NEW INTERPOLATION TOOL: CUBIC q -SPLINE 3 where A i ( q ) and B i ( q ) depend on parameter q only and can be found by substituting x = x i and x = x i − in (7) respectively and using the conditions (2) as following B i ( q ) = f ( x i − ) + µ i − ( q )[3] q ! h i ( x i − − x i ) q , (8) A i ( q ) = f ( x i ) − f ( x i − ) h i − µ i ( q )[3] q ! h i ( x i − x i − ) q − µ i − ( q )[3] q ! h i ( x i − − x i ) q . (9)By substituting the detailed expressions (8–9) for functions A i ( q ) and B i ( q ), weobtain the i th spline function as following S i ( x ; q ) = µ i ( q )[3] q ! h i ( x − x i − ) q − µ i − ( q )[3] q ! h i ( x − x i ) q + (cid:18) f [ x i − , x i ] − µ i ( q )[3] q ! h i ( x i − x i − ) q − µ i − ( q )[3] q ! h i ( x i − − x i ) q (cid:19) ( x − x i − )(10) + f ( x i − ) + µ i − ( q )[3] q ! h i ( x i − − x i ) q . In order to obtain the unknown moments µ i ( q ), i = 0 , . . . , n we use the conditions(3) for the first derivative of the q -spline (6). Hence, for i = 1 , . . . , n −
1, we have µ i ( q )[2] q h i ( x i − x i − ) q + f [ x i − , x i ] − µ i ( q )[3] q ! h i ( x i − x i − ) q − µ i − ( q )[3] q ! h i ( x i − − x i ) q = − µ i ( q )[2] q h i +1 ( x i − x i +1 ) q + f [ x i , x i +1 ] − µ i +1 ( q )[3] q ! h i +1 ( x i +1 − x i ) q − µ i ( q )[3] q ! h i +1 ( x i − x i +1 ) q . (11)Moreover, from the boundary conditions (5) for the clamped q -spline we obtain D q S ( x ; q ) = − µ ( q )[2] q h ( x − x ) q + f [ x , x ] − µ ( q )[3] q ! h ( x − x ) q − µ ( q )[3] q ! h ( x − x ) q = D q f ( x ) , (12) D q S n ( x n ; q ) = µ n ( q )[2] q h n ( x n − x n − ) q + f [ x n − , x n ] − µ n ( q )[3] q ! h n ( x n − x n − ) q − µ n − ( q )[3] q ! h n ( x n − − x n ) q = D q f ( x n ) . (13)The equations (11–13) form a system of ( n + 1) linear equations with respectto the moments µ i ( q ) that can be written shortly as Aµ = b . With the notation H i ( q ) = ( qx i − x i − )( x i − qx i − ) x i − x i − , we have(14) A = [2] q H ( q ) ( x − qx ) q x − x . . . ( x − qx ) x − x [2] q ( H ( q ) + H ( q )) ( x − qx ) q x − x . . . . . . . . . . . . . . . . . . . . . ( x n − − qx n ) q x n − x n − [2] q H n ( q ) , ORLI HERSCOVICI (15) b = [3] q ! f [ x , x ] − D q f ( x ) f [ x , x ] − f [ x , x ]... f [ x n − , x n ] − f [ x n − , x n − ] D q f ( x n ) − f [ x n − , x n ] , µ = µ ( q )... µ n ( q ) . The unknown moments µ = µ ( q ) (15) are the solution of the matrix equation Aµ = b , where A is given by (14) and b is given by (15). In view of the fact that A is a tridiagonal matrix, the method proposed in [15] may be used for evaluatingthe moments µ i ( q ), i = 0 .., n .The moments µ i ( q ), i = 0 , . . . , n are the solution of the matrix equation Aµ = b ,therefore they are the unique functions of parameter q . Thus we can state thefollowing result. Theorem 1.
Let the piecewise function S ( x ; q ) be defined by (1) and (10), where µ = µ ( q ) is a unique solution of the matrix equation Aµ = b , with A given by (14)and b given by (15). Then S ( x ; q ) is a q -analogue of the cubic spline interpolationof a function f ( x ) . Example 2.
Let us consider a q -spline interpolation of a function f ( x ) = x onthe interval x ∈ [ − , at the knots x = − , x = 0 , x = 1 . We assume thatthe values of the function itself and its first derivation at the knots are given. Theclassical cubic spline solution is given in Example 1 on page 824–825 of [18]. Byusing the above proposed method, one can obtain the cubic q -spline solution: S ( x ; q ) = ( q − q − q − q + q x + q − q − q − q + q x , − ≤ x ≤ , − q − q − q − q + q x + q − q − q − q + q x , ≤ x ≤ . It is easy to obtain the classical cubic spline solution corresponding to q → . Onecan see that there exist a slight oscillation of the spline regarding to the originalfunction. Decreasing the parameter q leads to more intensive oscillation. However, increasing the parameter q overcomes the oscillation effect and interpolates theoriginal function with significant improvement. Figure 1.
Interpolation of f ( x ) = x by cubic q -spline. N CONSTRUCTION OF A NEW INTERPOLATION TOOL: CUBIC q -SPLINE 5 ACKNOWLEDGMENTS
This research was supported by the Ministry of Science and Technology, Israel.The author thanks to the anonymous referees for their advices.
References [1] K. Atkinson,
An introduction to numerical analysis , Wiley, 2nd ed., 1989.[2] M.J. Marsden, Spline interpolation at knot averages on a two-sided geometricmesh,
Math. Comput. , (157), 113–126 (1982).[3] G. Budak¸ci, C¸ . Disib¨uy¨uk, R. Goldman, and H. Oru¸c, Extending fundamen-tal formulas from classical B-splines to quantum B-splines, J. Comput. Appl.Math. , , 17–33 (2015).[4] P. Simeonov and R. Goldman, Quantum B-splines, BIT Numer. Math. , (1),193–223 (2013).[5] R. Goldman, P. Simeonov, and Y. Simsek, Generating functions for the q -Bernstein bases, SIAM J. Discrete Math. (3), 1009–1025 (2014).[6] R. Goldman and P. Simeonov, Quantum Bernstein bases and quantum Beziercurves, J. Comput. Appl. Math. , 284–303 (2015).[7] R. Goldman and P. Simeonov, Generalized quantum splines,
Comp. AidedGeom. Design , 29–54 (2016).[8] H. Oru¸c and G.M. Phillips, q -Bernstein polynomials and Bezier curves, J.Comput. Appl. Math. (1), 1–12 (2003).[9] S. Ostrovska, q -Bernstein polynomials and their iterates, J. Approx. Theory (2), 232–255 (2003).[10] P. Simeonov, V. Zafiris, and R. Goldman, q -blossoming: a new approach toalgorithms and identities for q -Bernstein bases and q -Bezier curves, J. Approx.Theory (1), 77–104 (2012).[11] Y. Simsek, Interpolation function of generalized q -Bernstein-type basis poly-nomials and applications, in: Proceedings of the 7th International Conferenceon Curves and Surfaces , 647–662 (2012).[12] X. Han, Convexity-preserving approximation by univariate cubic splines,
J.Comput. Appl. Math. , , 196–206 (2015).[13] K. Segeth, Some splines produced by smooth interpolation, Appl. Math. Com-put. , , 387–394 (2018).[14] P.O. Mohammed and F.K. Hamasalh, Twelfth degree spline with applicationto quadrature, SpringerPlus , :2096 (2016).[15] E. Kili¸c, Explicit formula for the inverse of a tridiagonal matrix by backwardcontinued fractions, Appl. Math. Comput. , (1), 345–357 (2008).[16] V. Kac and P. Cheung, Quantum calculus , Springer-Verlag, 2002.[17] F.H. Jackson, On q -definite integrals, Q. J. Pure Appl. Math. , 193–203(1910).[18] E. Kreyszig, Advanced engineering mathematics , Willey, 10th ed., 2011.
O. Herscovici, Department of Mathematics, University of Haifa, 3498838 Haifa, Is-raelDepartment of Mathematics, ORT Braude College, 2161002 Karmiel, Israel
E-mail address ::