Weighted Fifth Degree Polynomial Spline

Global fifth degree polynomial spline is developed. Ideas applied in the field of high order WENO (Weighted Essentially non Oscillating) methods for numerical solving compressible flow equations are used to construct interpolation which has accuracy closed to accuracy of classical cubic spline for smooth interpolated functions, and which reduces undesirable oscillations often appearing in the case of data with break points. Fifth degree polynomial spline is constructed in two steps. Third degree spline is developed in first step by usage of additional stencils above three point central stencil, dealt in classical cubic splines. The Procedure of weights calculation provides choice of preferable stencils. Compensating terms are introduced to left side of governing equations for calculation of spline derivative knot values. This spline may be identical to classical cubic spline for “good” data. Damping of oscillations is achieved at the cost of reducing smoothness till C 1 . To restore C 2 smoothness fifth degree terms are added to third degree polynomials in second step. These terms are chosen to provide continuity of the spline second derivative. Fifth degree polynomial spline is observed to produce lesser oscillations, then classical cubic spline applied to data with break points. These splines have nearly the same accuracy for smooth interpolated functions and sufficiently large knot numbers.


Introduction
This paper is devoted to the development of polynomial piecewise spline. Piecewise interpolation schemes may be classified as local (see, for example, [1][2][3][4][5]), which may be calculated in any subinterval independently of other subintervals, and global, which calculation involves solving of the system of I or I*k equations, I -number of interpolation knots. Recent spline belongs to the second class, which contains, for example, rational splines [6,7], discrete hyperbolic tension splines [8,9]. It is known that high accuracy interpolations are connected with possible producing of undesirable oscillations near points of interpolated function discontinuities or points of discontinuities of the function first derivative.
Similarly, numerical modeling of compressible flows by high order methods may be connected with producing of oscillations near flow discontinuities. Efficient algorithms are developed in this field, allowing to damp undesirable oscillations. There are two main families of high order methods, reducing oscillations. First family contains Total Variation Diminishing methods (started in [10]), which involves delimitation of some terms in discrete equations for modeling of compressible flows. Second family contains Essentially Non-Oscillatory and Weighted Essentially Non-Oscillatory methods (see, for example, [11,12]), dealing with sets of numerical fluxes of the same order of approximation. Discrete analogies of conservation lows involve most "smooth" numerical fluxes or "smooth" combinations of these fluxes.
Ideas of algorithms of the first family are applied to constructing of monotonisity or positivity preserving polynomial splines in [13,14]. Paper [15] is devoted to the application of algorithms of the second family to constructing of global polynomial splines, reducing undesirable oscillations. Investigations, started in [15], are continued here. We use the weighted procedure for the calculation of the right side term of governing equations and introduce the compensating term to the left side of equations.
Below classical cubic spline is represented in a form, convenient to next transformations, and monotonisity or positivity preserving spline schemes are described as examples of TVD algorithms applications. Next section is devoted to representation of weighted C 1 cubic spline. Section 4 is concerned with fifth degree polynomial C 2 spline. Results of the weighted spline application to known test data are described in section 5.

Splines
Let {(x ,u ),i =0,1,2,3,...,I} be the given set of data points defined over the interval [0,a], where 0 = =x <x <x <,...,< x = a. Conditions s(x )=u , and, at inner knots 0<i<I, s'(x +0)=s'(x -0), s''(x +0)=s''(x -0), are used. We deal here with spline derivative values s'(x ) = v , 0 i I. Since the first derivative is a piecewise second degree polynomial, this function may be written in the subinterval as follows c -any constant, which may be defined after integrating of this formulae. If to take into account interpolation conditions s(x )=u , s(x )=u , next expression may be received: ( This expression guaranties continuity of the spline first derivative. The spline second derivative may be written as follows If to use this formulae and the similar formulae for the neighboring subinterval [х ,x ], the second derivative discontinuity jump s''(x ) may be received: Next designations are used below If to assume zero values of the spline second derivative at interval ends, next relations may be received 2v +v =3δ , 2v +v =3δ .
So, a closed linearly independent system of equations for calculations of spline derivative values v , 0 i I, is derived for nonuniform knot spacing.
Monotonisity preserving spline is constructed in [13,14] by delimiting some terms in equations (4). Next function-delimitator is used: Here y -an argument, which should be limited, b -a parameter-delimitator. Let us define the discrete function Z not only in points x =(x +x )/2 (see form. (3)), but also in points x : Next resulting equations for spline first derivative values were suggested in [13,14]: where the discrete function Z is calculated by formulas (3), (7). It may be shown [13,14], that these equations produce monotonisity preserving spline. If to change definition of parameters p : positivity preserving spline is resulted [14].

Weighted Cubic Spline
Algorithms of constructing of weighted essentially non oscillating methods are very popular in Computational Fluid Dynamics. To apply ideas of these algorithms in the field of global polynomial splines we should construct formulas, approximating right side R =3(Z +Z ) of equation (4) by using stencils, which differ from the right side stencil (i-1,i,i+1), namely, additional stencils (i-2,i-1,i) and (i,i+1,i+2) are used here. In other words, the formulae for the (i-2,i-1,i) stencil should deal with u , u , u data values, consequently, this formulae should deal only with δ , δ divided differences. To construct necessary formulas we need in definition of the discrete function ∆ : Additional approximation R (for the (i-2,i-1,i) stencil) is written as follow Next evaluation may be derived from the formulae (9) Similarly, we use for the (i,i+1,i+2) stencil If to summarize evaluations (10) and (12), we have R =W R + W R + W R = R + W (R -R ) So, using of weighted formulas produces second order term, which may decrease accuracy of spline in the "smooth" intervals. If to add compensating term to left side of equation, where K =k κ , k is defined by form. (13), 0≤ κ ≤1changeable coefficient, which is defined below. The last equation may be rewritten as follows: ( If to take into account end conditions (5) and the definition (3) for parameters h i , it is easy to establish that the coefficient matrix of the system (5), (14) is diagonally dominant and thus invertible. Therefore a unique solution of this system exists.
According to WENO ideas, parameters κ i , W i ,W where λ should be chosen in test calculations. Stencil weights are calculated in two steps, namely, by formulas (16)-(18) (first step) and (19)-(21) (second step), final weights are given by formulas (22). Calculations of the second step base on the "smoothness" checking similar to the checking dealt in the formulae (15).

Fifth Degree Polynomial С 2 Spline
Since the equation (4), which is equivalent to the continuity condition for the spline second derivative, is not satisfied for splines developed above, we have С¹ interpolation. To increase the spline smoothness and to provide continuity of the spline second derivative, a technique written in [14] is used here, namely, the fifth degree term is added to the cubic polynomial. Let next formulae is used instead of the formulae (1): where s(x) is spline (14) So, we have received spline, which has the С² smoothness similarly to classical cubic spline. But recent spline decrease undesirable oscillations.

Results and Discussion
To study accuracy of suggested here weighted fifth degree С² spline the polynomial function is interpolated Uniform knot spacing is used. Table 1 contains errors δ=max (|u(x)-S(x)|) of classical and weighted splines for various knot numbers I It may be seen that accuracy of suggested here weighted spline is approaching to accuracy of classical cubic spline for large knot numbers.
To show undesirable oscillations decreasing we consider data with break points.
It may be seen, that weighted spline is significantly better then the classical cubic spline. More complicated cases are considered below. Interpolants to data [8], reported in table 2, are presented in figs. 2a, 2b.  Fig. 2a. Classical cubic spline, data [8]. Fig. 2b. Weighted fifth degree spline, data [8].
Data [8] contain three consecutive break points, placed at right side of figs. 2a, 2b. In this case 'smooth' stencils are absent for some break points and weighted spline does not look quit well. But this spline is better, then classical cubic spline, to our opinion.
To study the weighted spline application to data without single direction of increasing or decreasing the composite function u=y (x), 0 x 1, defined by formulas (25)   Radio chemical data (see table 3) include the little scale region near the start of coordinate system, shown in additional fragments of figs. 5a, 5b.   Classical and weighted splines are similar in the little scale region near the start of coordinate system, weighted fifth degree spline looks more pleasant outside this region.

Conclusion
We consider weighted fifth degree spline, which reduces undesirable oscillations for data with break points. This property is achieved by usage of ideas applied in the field of high order WENO methods for numerical solving compressible flow equations. Numerical investigation shows that accuracy of recent spline approaches to accuracy of classical cubic spline for smooth interpolated functions and for sufficiently large knot numbers. Developed here weighted spline provides significant decreasing of oscillations, if data do not contain three or more consecutive break knots. If data contain consecutive three or more break knots, this spline is better, then classical cubic spline, at any rate.