 Research
 Open Access
Twelfth degree spline with application to quadrature
 P. O. Mohammed^{1}Email author and
 F. K. Hamasalh^{1}
 Received: 13 July 2016
 Accepted: 21 November 2016
 Published: 16 December 2016
Abstract
In this paper existence and uniqueness of twelfth degree spline is proved with application to quadrature. This formula is in the class of splines of degree 12 and continuity order \(C^{12}\) that matches the derivatives up to order 6 at the knots of a uniform partition. Some mistakes in the literature are pointed out and corrected. Numerical examples are given to illustrate the applicability and efficiency of the new method.
Keywords
 Interpolation
 Spline approximation
 Quadrature
Mathematics Subject Classification
 65D05
 65D07
 41A15
Background
In the last two decades, Clarleft et al. (1967) have constructed a direct cubic spline that fits the first derivatives at the knots together with the value of the function and its second derivative at the beginning of the interval. They used it for the solution quadrature formula.
El Tarazi and Karaballi (1990) have constructed five types of even degree splines (\(j=2k,\,\,k=1,2,3,4,5\)) that match the derivatives up to the order k at the knots of a uniform partition for each \(k=1,\,2,\,3,\,4\), and 5. These splines are also applied to quadrature.
Recently, Rathod et al. (2010) presented a formulation and study of an interpolatory cubic spline (named Subbotin cubic spline) to compute the integration over curved domains in the Cartesian two space and the integral approximations (quadrature).
In this work, we construct a twelfth degree spline which interpolates the derivatives up to the order 6 of a given function at the knots and its value at the beginning of the interval. We obtain a direct simple formula for the proposed spline. Error bounds for the function is derived in the sense of the Hermite interpolation. Also, a mistakes in the literature was corrected. Finally, numerical examples and comparison with other available methods are presented to illustrate the usefullness of proposed method.
Description of the spline (existence and uniqueness)
We construct here a class of interpolating splines of degree 12. Error estimates for this spline is also represented.
 1
\(s(x)\in C^{(6)}[0,1]\);
 2
s(x) is a polynomial of degree 12 in each subinterval \([x_i,x_{i+1}]\).
Theorem 1
Proof
Error bounds
In this section, error estimates for the above interpolatory twelfth spline is considered. Note that \(\Vert \cdot \Vert\) represents the \(L_{\infty }\) norm.
Theorem 2
Theorem 3
Proof
Algorithms
 Step 1 :

Note that the above formulation and analysis was done in [0, 1]. However, this does not constitute a serious restriction since the same techniques can be carried out for the general interval [a, b]. This is achieved from [a, b] to [0, 1] using the linear transformation$$\begin{aligned} x&=\frac{1}{ba}t\frac{a}{ba} \end{aligned}$$(7)
 Step 2 :

Use (3) to compute \(s_{i}\), \((i=0(1)n)\).
 Step 3 :

Use (2) to compute s(x) at n equally spaced points in \([x_{i},x_{i+1}],\;(i=1(1)n)\).
Illustrations
In this section, we illustrate the numerical technique discussed in the previous section by the following problems, in order to illustrate the comparative performance of the proposed spline method over other existing spline methods. All computations are performed using MATLAB 12b.
Example 1
The numerical solution and exact solution of Example 1
x  Exact solution  Approximation solution  Absolute error 

0.0  0  0  0 
0.1  0.182321556793955  0.182321556793934  2.073341498487480e−014 
0.2  0.336472236621213  0.336472236621190  2.303712776097200e−014 
0.3  0.470003629245736  0.470003629245712  2.353672812205332e−014 
0.4  0.587786664902119  0.587786664902095  2.364775042451583e−014 
0.5  0.693147180559945  0.693147180559922  2.364775042451583e−014 
0.6  0.788457360364270  0.788457360364247  2.375877272697835e−014 
0.7  0.875468737353900  0.875468737353876  2.353672812205332e−014 
0.8  0.955511445027436  0.955511445027413  2.375877272697835e−014 
0.9  1.029619417181158  1.029619417181135  2.353672812205332e−014 
1.0  1.098612288668110  1.098612288668086  2.353672812205332e−014 
Maximum absolute errors in solution Example 1
Numerical results for Example 1
x  Cubic Subbotin spline (Rathod et al. 2010)  Natural spline  Our spline (degree 12)  Exact 

1.08  0.03922071396027  0.03922071396027  0.039220713153281  0.039220713153281 
1.16  0.07696104319944  0.07695999495151  0.076961041136128  0.076961041136128 
1.24  0.11332868821323  0.11332791689560  0.113328685307003  0.113328685307003 
1.32  0.14842000880542  0.14841915996469  0.148420005118273  0.148420005118273 
1.40  0.18232156111573  0.18232073025801  0.182321556793955  0.182321556793955 
1.48  0.21511138448704  0.21511054644682  0.215111379616945  0.215111379616945 
1.56  0.24686008326688  0.24685924513945  0.246860077931526  0.246860077931526 
1.64  0.27763174233409  0.27763090250854  0.277631736598280  0.277631736598280 
1.72  0.30748470582867  0.30748386497839  0.307484699747961  0.307484699747961 
1.80  0.33647224300070  0.33647140114729  0.336472236621213  0.336472236621213 
1.88  0.36464312022710  0.36464227753464  0.364643113587909  0.364643113587909 
1.96  0.39204209464187  0.39204125120987  0.392042087776024  0.392042087776024 
2.04  0.41871034192254  0.41870949784609  0.418710334858185  0.418710334858185 
2.12  0.44468582850026  0.44468498385764  0.444685821261446  0.444685821261446 
2.20  0.47000363663837  0.47000279149742  0.470003629245736  0.470003629245736 
2.28  0.49469624936477  0.49469540378362  0.494696241836107  0.494696241836107 
2.36  0.51879380106450  0.51879295509338  0.518793793415168  0.518793793415168 
2.44  0.54232429858202  0.54232345226443  0.542324290825362  0.542324290825362 
2.52  0.56531381690245  0.56531297027618  0.565313809050060  0.565313809050060 
2.60  0.58778667284010  0.58778582593813  0.587786664902119  0.587786664902119 
2.68  0.60976557963560  0.60976473248676  0.609765571620894  0.609765571620894 
2.76  0.63127178492549  0.63127093755506  0.631271776841858  0.631271776841858 
2.84  0.65232519418539  0.65232434661562  0.652325186039690  0.652325186039690 
2.92  0.67294448144414  0.67294363369464  0.672944473242426  0.672944473242426 
3.00  0.69314718881230  0.69314634090043  0.693147180559945  0.693147180559945 
3.08  0.71294981615437  0.71294896809550  0.712949807856125  0.712949807856125 
3.16  0.73236790205313  0.73236705386091  0.732367893713227  0.732367893713227 
3.24  0.75141609706171  0.75141524874832  0.751416088683921  0.751416088683921 
3.32  0.77010823010838  0.77010738168467  0.770108221696074  0.770108221696074 
3.40  0.78845736880808  0.78845652028376  0.788457360364270  0.788457360364270 
3.48  0.80647587433955  0.80647502572333  0.806475865866949  0.806475865866949 
3.56  0.82417545146531  0.82417460276501  0.824175442966349  0.824175442966349 
3.64  0.84156719420135  0.84156634542400  0.841567185678219  0.841567185678219 
3.72  0.85866162758285  0.85866077873478  0.858661619037519  0.858661619037519 
3.80  0.87546874591965  0.87546789700658  0.875468737353900  0.875468737353900 
3.88  0.89199804788966  0.89199719891678  0.891998039305110  0.891998039305110 
3.96  0.90825856877877  0.90825771975076  0.908258560176891  0.908258560176891 
4.04  0.92425891014122  0.92425806106235  0.924258901523332  0.924258901523332 
4.12  0.94000726712415  0.94000641799821  0.940007258491471  0.940007258491471 
4.20  0.95551145367381  0.95551060450466  0.955511445027437  0.955511445027436 
4.28  0.97077892581729  0.97077807660683  0.970778917158225  0.970778917158225 
4.36  0.98581680319361  0.98581595394963  0.985816794522765  0.985816794522765 
4.44  1.00063188898968  1.00063103969670  1.000631880307906  1.000631880307906 
4.52  1.01523068842100  1.01522983914930  1.015230679729059  1.015230679729059 
4.60  1.02961942588257  1.02961857638119  1.029619417181158  1.029619417181158 
4.68  1.04380406088334  1.04380321209931  1.043804052173115  1.043804052173115 
4.76  1.05779030286630  1.05778945127489  1.057790294147855  1.057790294147855 
4.84  1.07158362500631  1.07158278377077  1.071583616280190  1.071583616280190 
4.92  1.08518927706926  1.08518839707176  1.085189268335969  1.085189268335969 
5.00  1.09861229740415  1.09861156196633  1.098612288668110  1.098612288668110 
Numerical results for Example 1
x  Clamped spline  Not a knot spline  Our spline (degree 12)  Exact 

1.08  0.03922071396027  0.03922071396027  0.039220713153281  0.039220713153281 
1.16  0.07696103950333  0.07696102915780  0.076961041136128  0.076961041136128 
1.24  0.11332868156060  0.11332867398715  0.113328685307003  0.113328685307003 
1.32  0.14841999962514  0.14841999130891  0.148420005118273  0.148420005118273 
1.40  0.18232154982349  0.18232154170628  0.182321556793955  0.182321556793955 
1.48  0.21511137139673  0.21511136322620  0.215111379616945  0.215111379616945 
1.56  0.24686006864661  0.24686006049037  0.246860077931526  0.246860077931526 
1.64  0.27763172640228  0.27763171824221  0.277631736598280  0.277631736598280 
1.72  0.30748468876854  0.30748468060950  0.307484699747961  0.307484699747961 
1.80  0.33647222496520  0.33647221680588  0.336472236621213  0.336472236621213 
1.88  0.36464310134512  0.36464309318587  0.364643113587909  0.364643113587909 
1.96  0.39204207502234  0.39204206686307  0.392042087776024  0.392042087776024 
2.04  0.41871032165802  0.41871031349876  0.418710334858185  0.418710334858185 
2.12  0.44468580766972  0.44468579951046  0.444685821261446  0.444685821261446 
2.20  0.47000361530946  0.47000360715019  0.470003629245736  0.470003629245736 
2.28  0.49469622759567  0.49469621943641  0.494696241836107  0.494696241836107 
2.36  0.51879377890542  0.51879377074616  0.518793793415168  0.518793793415168 
2.44  0.54232427607647  0.54232426791721  0.542324290825362  0.542324290825362 
2.52  0.56531379408823  0.56531378592897  0.565313809050060  0.565313809050060 
2.60  0.58778664975018  0.58778664159092  0.587786664902119  0.587786664902119 
2.68  0.60976555629880  0.60976554813954  0.609765571620894  0.609765571620894 
2.76  0.63127176136711  0.63127175320785  0.631271776841858  0.631271776841858 
2.84  0.65232517042767  0.65232516226841  0.652325186039690  0.652325186039690 
2.92  0.67294445750669  0.67294444934743  0.672944473242426  0.672944473242426 
3.00  0.69314716471248  0.69314715655322  0.693147180559945  0.693147180559945 
3.08  0.71294979190754  0.71294978374828  0.712949807856125  0.712949807856125 
3.16  0.73236787767296  0.73236786951370  0.732367893713227  0.732367893713227 
3.24  0.75141607256037  0.75141606440110  0.751416088683921  0.751416088683921 
3.32  0.77010820549672  0.77010819733746  0.770108221696074  0.770108221696074 
3.40  0.78845734409581  0.78845733593655  0.788457360364270  0.788457360364270 
3.48  0.80647584953538  0.80647584137612  0.806475865866949  0.806475865866949 
3.56  0.82417542657706  0.82417541841780  0.824175442966349  0.824175442966349 
3.64  0.84156716923605  0.84156716107678  0.841567185678219  0.841567185678219 
3.72  0.85866160254683  0.85866159438757  0.858661619037519  0.858661619037519 
3.80  0.87546872081863  0.87546871265937  0.875468737353900  0.875468737353900 
3.88  0.89199802272882  0.89199801456956  0.891998039305110  0.891998039305110 
3.96  0.90825854356281  0.90825853540355  0.908258560176891  0.908258560176891 
4.04  0.92425888487438  0.92425887671512  0.924258901523332  0.924258901523332 
4.12  0.94000724181031  0.94000723365105  0.940007258491471  0.940007258491471 
4.20  0.95551142831649  0.95551142015722  0.955511445027437  0.955511445027436 
4.28  0.97077890041969  0.97077889226042  0.970778917158225  0.970778917158225 
4.36  0.98581677775865  0.98581676959939  0.985816794522765  0.985816794522765 
4.44  1.00063186352005  1.00063185536077  1.000631880307906  1.000631880307906 
4.52  1.01523066291915  1.01523065475995  1.015230679729059  1.015230679729059 
4.60  1.02961940035073  1.02961939219125  1.029619417181158  1.029619417181158 
4.68  1.04380403532359  1.04380402716516  1.043804052173115  1.043804052173115 
4.76  1.05779027728051  1.05779026911814  1.057790294147855  1.057790294147855 
4.84  1.07158359939627  1.07158359124860  1.071583616280190  1.071583616280190 
4.92  1.08518925143643  1.08518924323388  1.085189268335969  1.085189268335969 
5.00  1.09861227175446  1.09861226375673  1.098612288668110  1.098612288668110 
Example 2
The numerical solution and exact solution of Example 2
u  Exact solution  Approximation solution  Absolute error 

0.0  2  2  0 
0.1  2.464100000000001  2.464100000000000  4.440892098500626E−16 
0.2  3.073600000000000  3.073600000000000  4.440892098500626E−16 
0.3  3.856100000000001  3.856100000000001  0 
0.4  4.841599999999999  4.841600000000001  1.776356839400251E−15 
0.5  6.062500000000000  6.062500000000000  0 
0.6  7.553600000000001  7.553600000000000  8.881784197001252E−16 
0.7  9.352099999999998  9.352100000000000  1.776356839400251E−15 
0.8  11.497600000000002  11.497600000000000  1.776356839400251E−15 
0.9  14.032099999999998  14.032100000000000  1.776356839400251E−15 
1.0  17  17  0 
The maximum absolute errors for Example 2
Step size h  Our method  Method in Anwar and ElTarazi (1989) 

0.1  0  3.3e−005 
0.05  0  2.1e−006 
0.025  0  1.3e−007 
0.02  0  5.3e−008 
0.0125  3.5527e−015  8.1e−009 
0.01  0  3.3e−009 
Example 3
Numerical results for Example 3
x  Cubic Subbotin spline (Rathod et al. 2010)  Our spline (degree 12)  Exact 

−0.96  0.00159996602042  0.001599965867977  0.001599965867977 
−0.92  0.00333302534289  0.003333024742788  0.003333024742788 
−0.88  0.00521620933478  0.005216208258150  0.005216208258151 
−0.84  0.00726952592022  0.007269524203804  0.007269524203804 
−0.80  0.00951662318369  0.009516620655397  0.009516620655397 
−0.76  0.01198563460978  0.011985631024242  0.011985631024242 
−0.72  0.01471026306531  0.014710258097708  0.014710258097708 
−0.68  0.01773118316554  0.017731176373487  0.017731176373487 
−0.64  0.02109787092452  0.021097861705018  0.021097861705018 
−0.60  0.02487101138281  0.024870998909352  0.024870998909352 
−0.56  0.02912569297475  0.029125676114165  0.029125676114165 
−0.52  0.03395567758607  0.033955654793668  0.033955654793668 
−0.48  0.03947914276296  0.039479111969976  0.039479111969976 
−0.44  0.04584642810741  0.045846386655399  0.045846386655399 
−0.40  0.05325046504333  0.053250409830185  0.053250409830185 
−0.36  0.06194066062908  0.061940588908491  0.061940588908491 
−0.32  0.07224083917045  0.072240751098736  0.072240751098736 
−0.28  0.08457087983609  0.084570785226588  0.084570785226588 
−0.24  0.09946860939441  0.099468543269364  0.099468543269364 
−0.20  0.11760046918276  0.117600520709514  0.117600520709514 
−0.16  0.13973162302703  0.139731964944293  0.139731964944293 
−0.12  0.16659542193349  0.166596253334887  0.166596253334886 
−0.08  0.19857766701988  0.198578877966528  0.198578877966530 
−0.04  0.23520031780477  0.235201041419030  0.235201041419027 
0.00  0.27468081092706  0.274680153389003  0.274680153389003 
0.04  0.31416062591739  0.314159265358976  0.314159265358979 
0.08  0.35078230627314  0.350781428811479  0.350781428811476 
0.12  0.38276433473857  0.382764053443120  0.382764053443120 
0.16  0.40962833358333  0.409628341833713  0.409628341833714 
0.20  0.43175968738734  0.431759786068493  0.431759786068493 
0.24  0.44989165576688  0.449891763508642  0.449891763508642 
0.28  0.46478942923129  0.464789521551418  0.464789521551418 
0.32  0.47711948282318  0.477119555679270  0.477119555679270 
0.36  0.48741966211928  0.487419717869515  0.487419717869515 
0.40  0.49610985468976  0.496109896947821  0.496109896947821 
0.44  0.50351388804248  0.503513920122607  0.503513920122607 
0.48  0.50988117027174  0.509881194808030  0.509881194808030 
0.52  0.51540463300912  0.515404651984338  0.515404651984339 
0.54  0.52023461579352  0.520234630663842  0.520234630663842 
0.60  0.52448929604318  0.524489307868654  0.524489307868654 
0.64  0.52826243552178  0.528262445072988  0.528262445072988 
0.68  0.53162912256560  0.531629130404519  0.531629130404519 
0.72  0.53465004214157  0.534650048680298  0.534650048680298 
0.76  0.53737467021086  0.537374675753765  0.537374675753765 
0.80  0.53984368134898  0.539843686122609  0.539843686122610 
0.84  0.54209077839986  0.542090782574202  0.542090782574202 
0.88  0.54414409481617  0.544144098519856  0.544144098519856 
0.92  0.54602727870406  0.546027282035218  0.546027282035218 
0.96  0.54776033787596  0.547760340910029  0.547760340910029 
1.00  0.54936030383282  0.549360306778006  0.549360306778006 
Example 4
Numerical results for Example 4
x  Cubic Subbotin spline (Rathod et al. 2010)  Our spline (degree 12)  Exact 

0.08  0.03188137343786  0.03188137201399  0.03188137201399 
0.16  0.06355946719297  0.06355946289143  0.06355946289143 
0.24  0.09483487811231  0.09483487169780  0.09483487169780 
0.32  0.12551584316831  0.12551583472332  0.12551583472332 
0.40  0.15542175168553  0.15542174161032  0.15542174161032 
0.48  0.18438631483954  0.18438630348378  0.18438630348378 
0.56  0.21226029337979  0.21226028115097  0.21226028115097 
0.64  0.23891371300311  0.23891370030714  0.23891370030714 
0.72  0.26423751498017  0.26423750222075  0.26423750222075 
0.80  0.28814461385800  0.28814460141660  0.28814460141660 
0.88  0.31057035699849  0.31057034522329  0.31057034522329 
0.96  0.33147240333869  0.33147239253316  0.33147239253316 
1.04  0.35083005925386  0.35083004966900  0.35083004966902 
1.12  0.36864312712815  0.36864311895727  0.36864311895727 
1.20  0.38493033640194  0.38493032977830  0.38493032977829 
1.28  0.39972743704822  0.39972743204556  0.39972743204556 
1.36  0.41308504141739  0.41308503805292  0.41308503805292 
1.44  0.42506630222622  0.42506630046567  0.42506630046567 
1.52  0.43574451241669  0.43574451218106  0.43574451218106 
1.60  0.44520070712697  0.44520070830044  0.44520070830044 
1.68  0.45352133969787  0.45352134213630  0.45352134213628 
1.76  0.46079609317294  0.46079609671252  0.46079609671252 
1.84  0.46711587687507  0.46711588134084  0.46711588134084 
1.92  0.47257104508264  0.47257105029616  0.47257105029616 
2.00  0.47724986226558  0.47724986805180  0.47724986805182 
2.08  0.48123722737203  0.48123723356506  0.48123723356506 
2.16  0.48461365876857  0.48461366521607  0.48461366521607 
2.24  0.48745453199754  0.48745453856405  0.48745453856405 
2.32  0.48982955476235  0.48982956133128  0.48982956133128 
2.40  0.49180245760085  0.49180246407540  0.49180246407540 
2.48  0.49343087456130  0.49343088086445  0.49343088086445 
2.56  0.49476638576280  0.49476639183644  0.49476639183644 
2.64  0.49585469283547  0.49585469863896  0.49585469863896 
2.72  0.49673589867582  0.49673590418410  0.49673590418411 
2.80  0.49744486446812  0.49744486966957  0.49744486966957 
2.88  0.49801161925099  0.49801162414511  0.49801162414511 
2.96  0.49909574075267  0.49846180478826  0.49846180478826 
3.04  0.49931285825549  0.49881710925690  0.49881710925690 
3.12  0.49948096097656  0.49909574480018  0.49909574480018 
3.20  0.49961028423860  0.49931286206208  0.49931286206208 
3.28  0.49970913967489  0.49948096456679  0.49948096456679 
3.36  0.49978422351271  0.49961028763743  0.49961028763742 
3.44  0.49984088844420  0.49970914290671  0.49970914290671 
3.52  0.49988338016042  0.49978422660071  0.49978422660071 
3.60  0.49991504054429  0.49984089140984  0.49984089140984 
3.68  0.49993848013798  0.49988338302318  0.49988338302318 
3.76  0.49993848013798  0.49991504332150  0.49991504332150 
3.84  0.49993848013798  0.49993848284482  0.49993848284482 
3.92  0.49995572286615  0.49995572551569  0.49995572551569 
4.00  0.49996832612598  0.49996832875817  0.49996832875817 
Conclusion
Declarations
Authors’ contributions
POM is one of the authors of the original idea, mathematical background and all numerical simulations. He proved the Existence and Uniqueness of the proposed method and presented the first two examples. FKH made substantial contributions to the design and execution of this study and made critical revisions to the manuscript. He also presented and solved the last two examples. POM and FKH both provided the guidance and reviewed the manuscript. Both authors read and approved the final manuscript.
Acknowledgements
The work was supported by the University Of Human Development (UHD). The authors would like to thank the referees for their useful and constructive comments.
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Anwar M, ElTarazi M (1989) Direct cubic spline with application to quadrature. Commun Appl Numer Methods 5:237–246MathSciNetView ArticleMATHGoogle Scholar
 Birkhoff G, Priver A (1967) Hermite interpolation errors for derivatives. J Math Phys 46:440–447MathSciNetView ArticleMATHGoogle Scholar
 Clarleft P, Schultz M, Varga R (1967) Numerical methods of highorder accuracy. Numer Math 9:394–430MathSciNetView ArticleGoogle Scholar
 El Tarazi M, Karaballi A (1990) On evendegree splines with application to quadrature. J Approx Theory 60:157–167MathSciNetView ArticleMATHGoogle Scholar
 Phythian J, Williams R (1986) Direct cubic spline approximation to integrals. Int J Numer Methods Eng 23:305–315MathSciNetView ArticleMATHGoogle Scholar
 Rathod HT, Shrivalli HY, Nagarajac KV (2010) On a new cubic spline interpolation with application to quadrature. Int J Math Anal 4:1387–1415MathSciNetMATHGoogle Scholar
 Varma A, Howell G (1983) Best error bounds for derivatives in two point Birkhoff interpolation problems. J Approx Theory 38:258–268MathSciNetView ArticleMATHGoogle Scholar