Pure and Appled Mathematcs Journal 5; 4(6): 69-74 Publshed onlne December, 5 (http://www.scencepublshnggroup.com/j/pamj) do:.648/j.pamj.546.8 ISSN: 36-979 (Prnt); ISSN: 36-98 (Onlne) Weghted Ffth Degree Polynomal Splne Vladmr Ivanovch Pnchukov Insttute of Computatonal Technologes, Sberan Dvson of Russan Academy of Sc., Novosbrsk, Russa Emal address: pnchv@ct.nsc.ru To cte ths artcle: Vladmr Ivanovch Pnchukov. Weghted Ffth Degree Polynomal Splne. Pure and Appled Mathematcs Journal. Vol. 4, No. 6, 5, pp. 69-74. do:.648/j.pamj.546.8 Abstract: Global ffth degree polynomal splne s developed. Ideas appled n the feld of hgh order WENO (Weghted Essentally non Oscllatng) methods for numercal solvng compressble flow equatons are used to construct nterpolaton whch has accuracy closed to accuracy of classcal cubc splne for smooth nterpolated functons, and whch reduces undesrable oscllatons often appearng n the case of data wth break ponts. Ffth degree polynomal splne s constructed n two steps. Thrd degree splne s developed n frst step by usage of addtonal stencls above three pont central stencl, dealt n classcal cubc splnes. The Procedure of weghts calculaton provdes choce of preferable stencls. Compensatng terms are ntroduced to left sde of governng equatons for calculaton of splne dervatve knot values. Ths splne may be dentcal to classcal cubc splne for good data. Dampng of oscllatons s acheved at the cost of reducng smoothness tll C. To restore C smoothness ffth degree terms are added to thrd degree polynomals n second step. These terms are chosen to provde contnuty of the splne second dervatve. Ffth degree polynomal splne s observed to produce lesser oscllatons, then classcal cubc splne appled to data wth break ponts. These splnes have nearly the same accuracy for smooth nterpolated functons and suffcently large knot numbers. Keywords: Polynomal Splne, Classcal Cubc Splne, Interpolaton, Undesrable Oscllatons. Introducton Ths paper s devoted to the development of polynomal pecewse splne. Pecewse nterpolaton schemes may be classfed as local (see, for example, [-5]), whch may be calculated n any subnterval ndependently of other subntervals, and global, whch calculaton nvolves solvng of the system of I or I*k equatons, I number of nterpolaton knots. Recent splne belongs to the second class, whch contans, for example, ratonal splnes [6, 7], dscrete hyperbolc tenson splnes [8, 9]. It s known that hgh accuracy nterpolatons are connected wth possble producng of undesrable oscllatons near ponts of nterpolated functon dscontnutes or ponts of dscontnutes of the functon frst dervatve. Smlarly, numercal modelng of compressble flows by hgh order methods may be connected wth producng of oscllatons near flow dscontnutes. Effcent algorthms are developed n ths feld, allowng to damp undesrable oscllatons. There are two man famles of hgh order methods, reducng oscllatons. Frst famly contans Total Varaton Dmnshng methods (started n []), whch nvolves delmtaton of some terms n dscrete equatons for modelng of compressble flows. Second famly contans Essentally Non-Oscllatory and Weghted Essentally Non-Oscllatory methods (see, for example, [, ]), dealng wth sets of numercal fluxes of the same order of approxmaton. Dscrete analoges of conservaton lows nvolve most smooth numercal fluxes or smooth combnatons of these fluxes. Ideas of algorthms of the frst famly are appled to constructng of monotonsty or postvty preservng polynomal splnes n [3, 4]. Paper [5] s devoted to the applcaton of algorthms of the second famly to constructng of global polynomal splnes, reducng undesrable oscllatons. Investgatons, started n [5], are contnued here. We use the weghted procedure for the calculaton of the rght sde term of governng equatons and ntroduce the compensatng term to the left sde of equatons. Below classcal cubc splne s represented n a form, convenent to next transformatons, and monotonsty or postvty preservng splne schemes are descrbed as examples of TVD algorthms applcatons. Next secton s devoted to representaton of weghted C cubc splne. Secton 4 s concerned wth ffth degree polynomal C splne. Results of the weghted splne applcaton to known test data are descrbed n secton 5.
7 Vladmr Ivanovch Pnchukov: Weghted Ffth Degree Polynomal Splne. Splnes Let {(x,u ), =,,,3,...,I} be the gven set of data ponts defned over the nterval [,a], where = =x <x <x <,...,< x I = a. Condtons s(x )=u, and, at nner knots <<I, s'(x )=s'(x -), s''(x )=s''(x -), are used. We deal here wth splne dervatve values s (x ) = v, I. Snce the frst dervatve s a pecewse second degree polynomal, ths functon may be wrtten n the subnterval [ x, x] as follows s (x)=v (- ) v c(- ), = =(x-x )/h, h = x - x, c any constant, whch may be defned after ntegratng of ths formulae. If to take nto account nterpolaton condtons s(x )=u, s(x )=u, next expresson may be receved: s(x)=u (-3 ξ ξ 3 )u (3 ξ - ξ 3 ) [v ( ξ - ξ ξ 3 )v ( ξ 3 - ξ )]h /. () Ths expresson guarantes contnuty of the splne frst dervatve. The splne second dervatve may be wrtten as follows s''(x)= (ξ -6)(u -u )/h / [v (6ξ -4)v (6ξ -)]/h /. If to use ths formulae and the smlar formulae for the neghborng subnterval [х,x dscontnuty jump s''(x ) may be receved: s''(x ) =s''(x )-s''(x -)= =6(u -u )/h / 6(u -u ], the second dervatve )/h / - -(v v )/h/ -(v v )/h /. () Next desgnatons are used below h =h / ξ ξ ξ ξ ξ / / h / /( h / h / ), δ / = = (u -u )/h /, Z / = δ / / h /. (3) The contnuty requrement for the splne second dervatve s''(x ) = leads to the equaton, relatng three consecutve values of the splne frst dervatve v, v, v : v /h 4v /h v /h = R, R = / / / / / / = R =3(δ /h δ /h ). (4) If to assume zero values of the splne second dervatve at nterval ends, next relatons may be receved v v =3δ, v v =3δ. (5) So, a closed lnearly ndependent system of equatons for calculatons of splne dervatve values v, I, s derved for nonunform knot spacng. Monotonsty preservng splne s constructed n [3, 4] by delmtng some terms n equatons (4). Next functon-delmtator s used: Delm(b,y)=max[-b, mn(b, y)], b>. (6) Here y an argument, whch should be lmted, b a parameter delmtator. Let us defne the dscrete functon Z not only n ponts x n ponts x : / I I I / =(x x )/ (see form. (3)), but also / Z = Delm[ Z, Z ]. (7) / / Next resultng equatons for splne frst dervatve values were suggested n [3, 4]: v p /h (3-p )v / h v p /h = R, R =3Delm[p ( Z Z ), (Z Z )], p = mn[, ( Z )/( Z Z )], where the dscrete functon Z s calculated by formulas (3),(7). It may be shown [3, 4], that these equatons produce monotonsty preservng splne. If to change defnton of parameters p : If Z Z then p = else p =mn[, ( Z )/( Z Z )], postvty preservng splne s resulted [4]. 3. Weghted Cubc Splne / / / / / / / / / / Algorthms of constructng of weghted essentally non oscllatng methods are very popular n Computatonal Flud Dynamcs. To apply deas of these algorthms n the feld of global polynomal splnes we should construct formulas, approxmatng rght sde R =3(Z Z ) of equaton (4) by usng stencls, whch dffer from the rght sde stencl (-,,), namely, addtonal stencls (-,-,) and (,,) are used here. In other words, the formulae for the (-,-,) stencl should deal wth u, u, u data values, consequently, ths formulae should deal only wth δ / dvded dfferences. To construct necessary formulas we need n defnton of the dscrete functon : / / / / 3/, δ
Pure and Appled Mathematcs Journal 5; 4(6): 69-74 7 =(δ - δ )/(x -x ), =,,I-, (8) / / / / x =(x x )/, =,,,I-. Addtonal approxmaton R (for the (-,-,) stencl) s wrtten as follow / R = R -3(x -x )( - )/h. (9) Next evaluaton may be derved from the formulae (9) 3 d u R R-3[(x/ -x / )h / ] /h 3 / d v = R -3[(x/ -x / )h / ] /h. () / Smlarly, we use for the (,,) stencl R = R -3(x -x )( - )/h, () R R -3[(x -x )h ] /h =R -3[(x -x )h ] /h. () If to summarze evaluatons () and (), we have R =W R W R W R = R W (R - R ) W (R - R ) R -(x -x ) k. k =3(W h /h W h /h ). (3) So, usng of weghted formulas produces second order term, whch may decrease accuracy of splne n the smooth ntervals. If to add compensatng term to left sde of equaton, we have v /h 4v / h v /h -K [(v -v )/ h -(v -v )/h ]=W R W R W R, where K =k κ, k s defned by form. (3), κ changeable coeffcent, whch s defned below. The last equaton may be rewrtten as follows: (-K )v /h (4K )v /h (-K )v / h = W R W R W R, (4) If to take nto account end condtons (5) and the defnton (3) for parameters h, t s easy to establsh that the coeffcent / / / / / / d u d v 3 / / / 3 / / / / / / / d v / / / / / / / / / / matrx of the system (5), (4) s dagonally domnant and thus nvertble. Therefore a unque soluton of ths system exsts. Accordng to WENO deas, parameters κ, W,W, W whch defne stencls of left and rght sdes of the governng equatons (4) should be calculated wth usage of smoothness checkng. Namely, the coeffcent κ s defned by the logcal formulae If then ( - ) >λ κ =mn(, /K ) else κ =, (5) where λ should be chosen n test calculatons. Stencl weghts are calculated n two steps, namely, by formulas (6)-(8) (frst step) and (9)-() (second step), fnal weghts are gven by formulas (). Calculatons of the second step base on the smoothness checkng smlar to the checkng dealt n the formulae (5). p =/, =,,I-, (6) p =, p =max(, / -b/ ), =,,I-, (7) p =max(,/ -b/ ), =,,I-, p =, (8) f ( - ) <λ or = w =p, (9) or (( - )/h / ) >(( - )/h / ) then f ( - ) <λ or =I- w = else w =p, () or (( - )/h / ) <(( - )/h / ) then w = else w =p, () W =w /d, W =w /d, W =w /d, () where d =w w w. Formulas (5)-() contan emprcal parameters λ,b, whch are chosen n test calculatons: λ=.3, b=.5. It s mportant to note, that accordng to formulas (7)-(8) coeffcents p, p are zero, f > /b, > /b. These condtons are fulflled for smooth nterpolated functons and suffcently large numbers of knots. Snce weghts W, W may be only less I
7 Vladmr Ivanovch Pnchukov: Weghted Ffth Degree Polynomal Splne then coeffcents p, p (see f. ()-()), addtonal stencls are excluded as the knot number ncreases. So, developed here splne transforms to classcal cubc splne for smooth nterpolated functons and suffcently large numbers of knots. 4. Ffth Degree Polynomal С Splne Snce the equaton (4), whch s equvalent to the contnuty condton for the splne second dervatve, s not satsfed for splnes developed above, we have С¹ nterpolaton. To ncrease the splne smoothness and to provde contnuty of the splne second dervatve, a technque wrtten n [4] s used here, namely, the ffth degree term s added to the cubc polynomal. Let next formulae s used nstead of the formulae (): S (x)=s(x) (- ) [ q - q (- )]r, (3) where s(x) s splne (4)-(). Ths expresson contans two famles of parameters q, I, and r, < I. Parameters q are chosen to provde contnuty of the splne second dervatve, parameters r are chosen to mnmze undesrable oscllatons. The formulae (3) leads to the expresson S''(x -)=s''(x -)q r /h. Smlarly, f to consder the subnterval [x, x ], next expresson may be derved ξ ξ ξ ξ / / / / S''(x )=s''(x )- q r /h. / / / So, we have receved splne, whch has the С² smoothness smlarly to classcal cubc splne. But recent splne decrease undesrable oscllatons. 5. Results and Dscusson To study accuracy of suggested here weghted ffth degree С² splne the polynomal functon s nterpolated u(x)=x³(-5x6x²), x, u, u ()=u ()=, (4) u ()=u ()=. Unform knot spacng s used. Table contans errors δ=max ( u(x)-s(x) ) of classcal and weghted splnes for x varous knot numbers I Table. Interpolaton errors for polynomal (4). Classcal splne Weghted splne I=4 8.35e-3 3.9e-. I=8 5.45e-4 5.8e-4 I=6 3.5e-5 3.5e-5 I=3.e-6.e-6 I=64.4e-6.4e-6 It may be seen that accuracy of suggested here weghted splne s approachng to accuracy of classcal cubc splne for large knot numbers. To show undesrable oscllatons decreasng we consder data wth break ponts. Fgs. a, b show classcal and ffth degree weghted splnes appled to step functon data: u(.)=.. u(.)=., u(.)=., u(4.)=.. u(5.)=., u(6.)=.. These data contan two neghborng break ponts x = and x =4. 3 4 If to subtract the prevous relaton from the last one, the second dervatve contnuty condton leads to the formulae S''(x )-S''(x -)= q =.5 s''(x ) /( r /h r /h ), / / / / where s''(x ) s gven by the expresson (). Ths formulae may be dealt only at nner knots, <<I. Zero values of parameters q are used at end knots = and =I. Tral calculatons show, that the choce Fg. a. Classcal cubc splne, step functon nterpolaton. r = Z h = u -u / / / prevents producng of undesrable oscllatons. Ths choce leads to formulas q =.5 s''(x ) / ( Z Z ), <<I, / / q =, q =. I Fg. b. Weghted ffth degree splne, step functon nterpolaton.
Pure and Appled Mathematcs Journal 5; 4(6): 69-74 73 It may be seen, that weghted splne s sgnfcantly better then the classcal cubc splne. More complcated cases are consdered below. Interpolants to data [8], reported n table, are presented n fgs. a, b. X U.... 3.. 5.. 6.. 8.. 9..5. 5.. 56. 4. 6. 5. 85. Table. Data [8]. consdered. Ths functon ncludes trangular, rectangular and parabolc regons (see fg.3). y =mn[(x-.)/., (.3-x)/.],. x.3, (5) y =,.4 x.6, (6) y =[-(x-.8) /.] /,.7 x 9. (7) Fg. 3. The composte functon. Fgs. 4a, 4b show classcal splne and weghted ffth degree splne appled to the composte functon. Weghted splne looks more pleasant. Fg. a. Classcal cubc splne, data [8]. Fg. 4a. Classcal cubc splne, the composte functon (see fg. 3). Fg. b. Weghted ffth degree splne, data [8]. Data [8] contan three consecutve break ponts, placed at rght sde of fgs. a, b. In ths case smooth stencls are absent for some break ponts and weghted splne does not look qut well. But ths splne s better, then classcal cubc splne, to our opnon. To study the weghted splne applcaton to data wthout sngle drecton of ncreasng or decreasng the composte functon u=y (x), x, defned by formulas (5)-(7), s Fg. 4b. Weghted ffth degree splne, the composte functon. Rado chemcal data (see table 3) nclude the lttle scale regon near the start of coordnate system, shown n addtonal fragments of fgs. 5a, 5b.
74 Vladmr Ivanovch Pnchukov: Weghted Ffth Degree Polynomal Splne Table 3. Rado chemcal data. X u 7.99. 8.9.7649e-5 8.9 4.37498e- 8.7.6983 9..46948..94374..998636 5..99996..999994 splne provdes sgnfcant decreasng of oscllatons, f data do not contan three or more consecutve break knots. If data contan consecutve three or more break knots, ths splne s better, then classcal cubc splne, at any rate. References [] S. A. A. Karm, Postvty preservng nterpolaton by usng GC Ratonal cubc splne, Appled Mathematcal Scences, V. 8, N. 4, 4, 53-65. [] F. Bao, J. Pan, Q. Sun, Q. Duan, A C ratonal nterpolaton for vsualzaton of shaped data, J. of Informaton & Computatonal Scences, :, 5, 85-84. [3] M. Abbas, A.A. Majd, M.N.H. Awang, J.M. Al, Constraned shape preservng ratonal b-cubc splne nterpolaton, World Appled Scences J., V., N. 6,, 79-8. [4] X. Han., Shape-preservng pecewse ratonal nterpolant wth quartc numerator and quadratc denomnator, Appled Mathematcs and Computaton, V. 5, 5, 58-74. [5] Q. Sun, F. Bao, Q. Duan, Shape-preservng Weghted Ratonal Cubc Interpolaton, J. of Computatonal Informaton Systems. 8:8,, 77-778. Fg. 5a. Classcal splne, rado chemcal data. [6] M.Shrvastava, J. Joseph, C ratonal cubc splne nvolvng tensor parameters. Proc. Indan Acad. Sc. (Math. Sc.), Vol., N. 3,, 35-34. [7] R. Delbourgo, J. A. Gregory, C ratonal quadratc splne nterpolaton to monotonc data. IMA J. Numer. Anal. Vol. 5, 983, 4-5. [8] H. Akma, A new method of nterpolaton and smooth curve fttng based on local procedures, J Assoc. Comput. Machnery. Vol. 7, 97, 589-6. [9] N. S. Sapds, P. D. Kakls, An algorthm for constructng convexty and monotoncty preservng splnes n tensons // Comput. Aded Geometrc Desgn. Vol. 5, 988, 7-37. [] A. A. Harten, A Hgh resoluton scheme for the computaton of weak solutons of hyperbolc conservaton laws J. Comput. Phys. Vol. 49, N. 3, 983, 357-393. Fg. 5b. Weghted ffth degree splne, rado chemcal data. Classcal and weghted splnes are smlar n the lttle scale regon near the start of coordnate system, weghted ffth degree splne looks more pleasant outsde ths regon. 6. Concluson We consder weghted ffth degree splne, whch reduces undesrable oscllatons for data wth break ponts. Ths property s acheved by usage of deas appled n the feld of hgh order WENO methods for numercal solvng compressble flow equatons. Numercal nvestgaton shows that accuracy of recent splne approaches to accuracy of classcal cubc splne for smooth nterpolated functons and for suffcently large knot numbers. Developed here weghted [] C.-W. Shu, S. Osher, Effcent mplementaton of Essentally non-oscllatory shock capturng schemes, J. of Computatonal Physcs, V. 77, 988, 439-47. [] X.-D. Lu, S. Osher, T. Cheng, Weghted Essentally non-oscllatory schemes, J. of Computatonal Physcs, V. 5, 994, -. [3] V. I. Pnchukov, Monotonc global cubc splne, J. of Comput. & Mathem. Phys., Vol. 4, N.,, -6. (Russan). [4] V. I. Pnchukov, Shape preservng thrd and ffth degrees polynomal splnes. Amercan J. of Appled Mathematcs. Vol., No. 5, 4, pp. 6-69. [5] V. I. Pnchukov, ENO and WENO Algorthms of Splne Interpolaton, Vychsltelnye Technolog, Vol. 4, N. 4, 9, -7. (Russan).