1 Introduction

The applications of boundary value problems (BVPs) are almost unlimited, and they play an important role in all the branches of science, engineering, and technology. They are applied to model many systems in several fields of science and engineering. In recent years, there has been significant advancement in solving problems related to a system of linear and nonlinear partial and ordinary differential equations concerning boundary conditions (BC). Two point nonlinear BVPs often cannot be solved by analytical techniques. With cumulative interest in finding solutions to linear/nonlinear BVPs has come an increasing requirement for solution techniques. In the present paper, we will study the algebraic results of the following linear 6th order BVP:

$$ \begin{aligned}[b]& w^{(6)} ( z ) + a_{1}(z) w^{(5)} (z) + a_{2}(z) w^{(4)} (z) + a_{3}(z) w^{(3)}( z) \\ &\quad + a_{4}(z) w^{(2)} (z) + a_{5}(z) w^{(1)} (z) + a_{6}(z) w(z) = f(z),\quad z \in [ a, b ] \end{aligned} $$
(1)

with boundary conditions

$$ w^{(m)} ( a ) = \alpha_{m},\qquad w^{(m)} ( b ) = \beta_{m},\quad m = 0, 1, 2, $$
(2)

where \(\alpha_{0}\), \(\alpha_{1}\), \(\alpha_{2}\) and \(\beta_{0}\), \(\beta_{1}\), \(\beta_{2}\) are given real constants, (\(a_{i}(z)\); \(i = 1, 2,\ldots, 6\)), and f is continuous on the given interval \([a, b]\).

A variety of numerical methods [1, 2, 4, 5, 8, 9, 11, 12, 16, 31] have been presented to solve BVPs problem, e.g., global phase-integral methods, shooting methods, sinc-Galerkin methods, splines methods, finite difference methods, finite element methods, variational iteration, the collocation methods, and other numerical techniques.

In [23], a variation of parameter technique was used for solving sixth order boundary value problems. Perturbation method for nonlinear engineering problems was specified in [24]. Homotopy perturbation technique for solving linear and nonlinear sixth order boundary value problems was described in [25]. In [26], algebraic results of 6th order BVPs were originated by applying non-polynomial spline method. Neural networks mimic the learning procedure of the human brain in order to excerpt designs from ancient data as defined in [27]. These networks are rehabilitated into 6th order boundary value problems and then resolved by diverse approaches for precise and estimated results. Numerical methods for sixth order boundary value problems were discussed in [32]. In [33], the authors established a family of algebraic procedures for the solutions of 6th order boundary value problems with application to Benard layer eigenvalue problems. Numerical solutions of fifth and sixth order nonlinear boundary value problems by Daftardar–Jafari method were found in [34]. Wazwaz in [35] used decomposition and modified domain decomposition approaches to examine the solution of 6th order boundary value problems.

Discrete methods, e.g., Adomian decomposition, shooting, homotopy-perturbation, finite differences, and variational-iterative technique, only obtained the discrete approximate values of dependent variable \(y(x)\). We require further data processing procedures to acquire exact fitted curve to data. For the case of spline approximation or interpolation approaches the dependent variable \(y(x)\) is supposed to be piecewise polynomial which involves at least piecewise higher order derivatives of the function \(f(x, y, y')\). To overcome these shortcomings, several researchers [3, 6, 7, 10, 13,14,15, 17,18,19,20,21,22, 28,29,30] introduced the spline/subdivision based methods for the solution of BVPs. However, the higher order problems have not been solved by spline/subdivision techniques. This motivates us to solve 6th order boundary value problems by spline. This paper does not only introduce a numerical approximation based on cubic B-spline for the solution of linear 6th order BVPs, but it also describes the estimated derivatives of 1st order to 6th order of the analytic solution at the same time. This novel technique has lesser computational cost than numerous other techniques and is second order convergent.

2 Materials and methods

In this section the fundamentals of cubic B-spline and its application on sixth order BVP are discussed in detail. When we contrasted the cubic B-spline method with the other methods, we came to know that our results are well accepted. Moreover, this method is second order convergent and has comparatively lesser computational cost. Furthermore, solving with cubic B-spline method, we also can acquire the estimated derivative values of \({w} ( z )\), \({w}'(z)\), \({w}''(z)\), \({w}^{(3)} ( z )\), \({w}^{(4)} ( z )\), \({w}^{(5)}(z)\), and \(w^{(6)} ( z )\) at the knots, which is the main advantage of the cubic B-spline method, as other methods are unable to obtain these values. In the current paper, we will use cubic B-spline to resolve 6th order BVP.

2.1 Fundamentals of cubic B-splines

The assumed choice of independent variable is \([a, b]\). For an interval \(\varOmega = [a, b]\), we divide it into n subintervals \(\varOmega _{i} = [z _{i}, z_{i+1}]\) (\(i =0, 1,\ldots , n -1\)) by the equidistant knots, and for this range we select equidistant points assumed by

$$\varOmega = \{ a = z_{0}, z_{1}, z_{2},\ldots, z_{n} = b \}, $$

i.e.,

$${z}_{i} = a + ih\quad (i = 0,1,2,\ldots,n), \text{where } h = \frac{b - a}{n}. $$

Let us describe \(S_{3} ( \varOmega ) = \{ p' ( t ) \in C^{2} [ a,b ] \}\) such that \(p' ( t )\) decreases to cubic polynomial on separately sub-interval \(( z_{i}, {z}_{i + 1} )\). The basis function is defined as

$$\begin{gathered}B_{ - 1} (z) = \frac{1}{6h^{3}} \textstyle\begin{cases} (z_{1} - z)^{3} & \text{if }{z} \in [z_{0}, z_{1}], \\ 0 & \text{otherwise}, \end{cases}\displaystyle \\ B_{0} (z) = \frac{1}{6h^{3}}\textstyle\begin{cases} h^{3} + 3h^{2}(z_{1} - z) + 3h (z_{1} - z)^{2} - 3(z_{1} - z)^{3} & \text{if }{z} \in [z_{0},z_{1}] ,\\ (z_{2} - z)^{3} & \text{if }{z} \in [z_{1},z_{2}], \\ 0 & \text{otherwise}, \end{cases}\displaystyle \\ B_{1} (z) = \frac{1}{6h^{3}} \textstyle\begin{cases} h^{3} + 3h^{2}(z - z_{0}) + 3h (z - z_{0})^{2} - 3(z - z_{0})^{3} & \text{if }{z} \in [z_{0}, z_{1}], \\ h^{3} + 3h^{2} (z_{2} - z) + 3h (z_{2} - z)^{2} - 3(z_{2} - z)^{3} & \text{if }{z} \in [z_{1}, z_{2}] ,\\ (z_{3} - z)^{3} & \text{if }{z} \in [z_{2}, {z}_{3}] , \\ 0 & \text{otherwise}, \end{cases}\displaystyle \\ B_{i} (z) = \frac{1}{6h^{3}} \textstyle\begin{cases} (z - z_{i -2})^{3}& \text{if }{z} \in [z_{i - 2}, z_{i - 1}] , \\ h^{3} + 3h^{2} (z - z_{i - 1}) + 3h (z - z_{i - 1})^{2} - 3(z - z_{i - 1})^{3} &\text{if }{z} \in [z_{i - 1}, z_{i}], \\ h^{3} + 3h^{2} (z_{i + 1} - z) + 3h (z_{i + 1} - z)^{2} - 3(z_{i + 1} - z)^{3} & \text{if }{z} \in [z_{i}, z_{i + 1}], \\ (z_{i + 2} - z)^{3} & \text{if }z \in [z_{i + 1}, z_{i + 2}],\\ 0 & \text{otherwise}, \end{cases}\displaystyle \end{gathered} $$

for \(i = 2, 3, 4,\ldots, n - 2\). Since to each \(B_{i} ( {z} )\) is similarly a piecewise cubic with knots at Ω, collectively \(B_{i} ( z ) \in S_{3}(\varOmega )\). Let \(\varPsi = \{ B_{ - 1},B_{0},B_{1},\ldots,B_{n + 1}\}\) and let \(B_{3}(\varOmega ) = \operatorname{span} \varPsi\). The functions in Ψ are linearly independent on \([a, b]\), thus \(B_{3} ( \varOmega )\) is \((n + 3)\)-dimensional and \(B_{3} ( \varOmega ) = S_{3} ( \varOmega )\). Let \(s ( z )\) be the cubic B-spline interpolating function at the nodal points and \(s ( z ) \in B_{3} ( \varOmega )\). Then \(s ( z )\) can be written as

$$s ( z ) = \sum_{i = - 1}^{n + 1} l_{i}B_{i} ( z ). $$

The values of \(B_{i} ( z )\), \(B_{i}^{\prime} ( z )\), and \(B_{i}^{\prime\prime} ( z )\) at the knots are listed in Table 1.

Table 1 Values of \(B_{i} ( z )\), \(B_{i}^{\prime} ( z )\), and \(B_{i}^{\prime\prime} ( z )\) at the knots

Consequently, now for an assumed function \(w ( z )\) there happened to be a distinctive cubic B-spline \(s ( z ) = \sum_{i = - 1}^{n + 1} l_{i}B_{i} ( z )\) satisfying the interpolating conditions:

$$s ( z_{i} ) = w ( z_{i} )\quad (i = 0, 1,\ldots, n), \qquad s ( a ) = w ( a ),\qquad s ( b ) = w ( b ), $$

and \(s' ( a ) = w' ( a )\), \(s' ( b ) = w' ( b )\). Let \(m_{i} = s' ( z_{i} )\) and \(M_{i} = s^{\prime\prime} ( z_{i} )\), then from [15] we have

$$\begin{aligned}& m_{i} = s'(z_{i}) = w''(z_{i}) - \frac{1}{180}h^{4}w^{(5)}(z_{i}) + O \bigl(h^{6}\bigr), \end{aligned}$$
(3)
$$\begin{aligned}& M_{i} = s''(z_{i}) = w''(z_{i}) - \frac{1}{12}h^{2}w^{(4)}(z_{i}) + \frac{1}{360}h^{4}w^{(6)}(z_{i}) + O \bigl(h^{6}\bigr), \end{aligned}$$
(4)

\(M_{i}\) can be used to calculate the numerical difference formulas for \(w^{(3)} ( z_{i} )\), \({w}^{(4)}(z_{i})\) where \(i = 1, 2,\ldots, n - 1\) and \(w^{(5)}(z_{i})\), \({w}^{(6)}(z_{i})\) where \(i = 2, 3,\ldots, n - 2\) as follows, wherever the errors are acquired by the Taylor series expansion

$$ \frac{M_{i + 1} - M_{i - 1}}{2h} = \frac{s^{(3)}(z_{i -} ) + s^{(3)}(z_{i +} )}{2} = w^{(3)}(z_{i}) + \frac{1}{12}h^{2}w^{(5)}(z_{i}) + O \bigl(h^{4}\bigr). $$
(5)

From [9] and [15] we have

$$\begin{aligned}& \frac{M_{i + 1} - 2M_{i} + M_{i - 1}}{h^{2}} = \frac{s^{(3)}(z_{i -} ) - s^{(3)}(z_{i +} )}{h} = w^{(4)}(z_{i}) - \frac{1}{720}h^{4}w^{(8)}(z_{i}) + O \bigl(h^{6}\bigr), \end{aligned}$$
(6)
$$\begin{aligned}& \frac{M_{i + 2} - 2M_{i + 1} + 2M_{i - 1} - M_{i - 2}}{2h^{3}} = w^{(5)}(z_{i}) + O\bigl(h^{2} \bigr). \end{aligned}$$
(7)

Since \(s ( z' ) = \sum_{i = - 1}^{n + 1} l_{i}B_{i} ( z' )\), by means of Table 1 and beyond equations, we get estimate values of \({w} ( z )\), \({w}'(z)\), \({w}''(z)\), \({w}^{(3)} ( z )\), \({w}^{(4)} ( z )\), \({w}^{(5)}(z)\), and \(w^{(6)} ( z )\) as

$$ \left . \textstyle\begin{array}{l} w (z_{i}) = s (z_{i}) = \frac{l_{i - 1} + 4l_{i} + l_{i + 1}}{6},\\ w'' (z) = s'' (z_{i}) = \frac{l_{i + 1} - 2l_{i} + l_{i - 1}}{h^{2}},\\ w^{(3)} (z) = s^{(3)} (z_{i}) = \frac{l_{i + 2} - 2l_{i + 1} + 2l_{i - 1} - l_{i - 2}}{2h^{3}},\\ w^{(4)} (z) = s^{(4)} (z_{i}) = \frac{l_{i + 2} - 4l_{i + 1} + 6l_{i} - 4l_{i - 1} + l_{i - 2}}{h^{4}},\\ w^{(5)} (z) = s^{(5)} (z_{i}) = \frac{l_{i + 3} - 4l_{i + 2} + 5l_{i + 1} + 5l_{i - 1} + 4l_{i - 2} - l_{i - 3}}{2h^{5}} , \end{array}\displaystyle \right \} $$
(8)

and following the above, we have the Taylor series expansion for \(w^{(6)} ( z )\) at the selected collocation points with central difference as follows:

$$ w_{i}^{(6)}(z_{i}) = \frac{(w_{i + 1}^{(4)}(z_{i}) - 2w_{i}^{(4)}(z_{i}) + w_{i - 1}^{(4)}(z_{i}))}{h^{2}} + O \bigl(h^{2}\bigr). $$
(9)

Using Eq. (6), we can have

$$\begin{gathered} \frac{M_{i} - 2M_{i - 1} + M_{i - 2}}{h^{2}} = \frac{s^{(3)}(z_{(i - 1) -} ) - s^{(3)}(z_{(i - 1) +} )}{h} = w^{(4)}(z_{i - 1}) - \frac{1}{720}h^{4}w^{(8)}(z_{i - 1}) + O \bigl(h^{6}\bigr), \\ \frac{M_{i + 2} - 2M_{i + 1} + M_{i}}{h^{2}} = \frac{s^{(3)}(z_{(i + 1) -} ) - s^{(3)}(z_{(i + 1) +} )}{h} = w^{(4)}(z_{i + 1}) - \frac{1}{720}h^{4}w^{(8)}(z_{i + 1}) + O \bigl(h^{6}\bigr).\end{gathered} $$

Using the above two equations and Eq. (6) in Eq. (9), we have

$$ \begin{gathered} w_{i}^{(6)}(z_{i}) = \frac{1}{h^{2}}\biggl(\frac{M_{i + 2} - 2M_{i + 1} + M_{i}}{h^{2}} - 2\frac{M_{i + 1} - 2M_{i} + M_{i - 1}}{h^{2}} + \frac{M_{i} - 2M_{i - 1} + M_{i - 2}}{h^{2}}\biggr) \\ \phantom{w_{i}^{(6)}(z_{i}) =}+ O\bigl(h^{2}\bigr), \\ w_{i}^{(6)}(z_{i}) = \frac{1}{h^{4}} \bigl(M_{i + 2} - 2M_{i + 1} + M_{i} - 2(M_{i + 1} - 2M_{i} + M_{i - 1}) + M_{i} - 2M_{i - 1} + M_{i - 2}\bigr) \\ \phantom{w_{i}^{(6)}(z_{i}) = }+ O\bigl(h^{2}\bigr), \\ w_{i}^{(6)}(z_{i}) = \frac{1}{h^{4}}(M_{i + 2} - 2M_{i + 1} + M_{i} - 2M_{i + 1} + 4M_{i} - 2M_{i - 1} + M_{i} - 2M_{i - 1} + M_{i - 2})\\ \phantom{w_{i}^{(6)}(z_{i}) =} + O \bigl(h^{2}\bigr), \\ w^{(6)}(z_{i}) = \frac{M_{i + 2} - 4M_{i + 1} + 6 M_{i} - 4M_{i - 1} + M_{i - 2}}{h^{4}} + O\bigl(h^{2} \bigr).\end{gathered} $$

As \(M_{i} = \frac{l_{i + 1} - 2l_{i} + l_{i - 1}}{h^{2}}\), so we can conclude

$$\begin{gathered} M_{i - 2} = \frac{l_{i - 1} - 2l_{i - 2} + l_{i - 3}}{h^{2}},\qquad M_{i - 1} = \frac{l_{i} - 2l_{i - 1} + l_{i - 2}}{h^{2}}, \\ M_{i + 1} = \frac{l_{i + 2} - 2l_{i + 1} + l_{i}}{h^{2}},\qquad M_{i + 2} = \frac{l_{i + 3} - 2l_{i + 2} + l_{i + 1}}{h^{2}}.\end{gathered} $$

Using the above equations, we have

$$\begin{gathered} \frac{1}{h^{4}}\biggl[\frac{l_{i + 3} - 2l_{i + 2} + l_{i + 1}}{h^{2}} - 4 \biggl(\frac{l_{i + 2} - 2l_{i + 1} + l_{i}}{h^{2}}\biggr) + 6 \biggl(\frac{l_{i + 1} - 2l_{i} + l_{i - 1}}{h^{2}}\biggr) \\ \quad{}- 4\biggl( \frac{l_{i} - 2l_{i - 1} + l_{i - 2}}{h^{2}}\biggr)+ \biggl(\frac{l_{i - 1} - 2l_{i - 2} + l_{i - 3}}{h^{2}}\biggr)\biggr] = w^{(6)}(z_{i}) + O\bigl(h^{2}\bigr). \end{gathered} $$

Simplifying

$$\begin{gathered}\frac{1}{h^{6}}(l_{i + 3} - 2l_{i + 2} + l_{i + 1} - 4l_{i + 2} + 8l_{i + 1} - 4l_{i} + 6 l_{i + 1} - 12l_{i} + 6l_{i - 1} - 4l_{i} + 8l_{i - 1} - 4l_{i - 2} \\ \quad{}+ l_{i - 1} - 2l_{i - 2} + l_{i - 3}) = w^{(6)}(z_{i}) + O\bigl(h^{2}\bigr). \end{gathered} $$

Neglecting the error order, we have

$$ w^{(6)} (z_{i}) = s^{(6)} (z_{i}) = \frac{l_{i + 3} - 6l_{i + 2} + 15l_{i + 1} - 20l_{i} + 15l_{i - 1} - 6l_{i - 2} + l_{i - 3}}{h^{6}}. $$
(10)

2.2 Cubic B-spline solutions of sixth order BVP

Let \(w(z) = s ( z ) = \sum_{i = - 1}^{n + 1} l_{i}B_{i} ( z )\) be the approximate solution of sixth order BVP

$$\begin{gathered} w^{(6)} ( z ) + a_{1}(z) w^{(5)} (z) + a_{2}(z) w^{(4)} (z) + a_{3}(z) w^{(3)}( z) \\ \quad{} + a_{4}(z) w^{(2)} (z) + a_{5}(z) w^{(1)} (z) + a_{6}(z) w(z) = f(z),\quad z \in [ a, b ] \end{gathered} $$

with boundary conditions

$$w^{(m)} ( a ) = \alpha_{m},\qquad w^{(m)} ( b ) = \beta_{m},\quad m = 0, 1, 2, $$

where \(\alpha_{0}\), \(\alpha_{1}\), \(\alpha_{2}\) and \(\beta_{0}\), \(\beta_{1}\), \(\beta_{2}\) are given real constants (\(a_{i}(z)\); \(i = 1, 2,\ldots, 6\)) and f is continuous on the given interval \([a, b]\).

$$ \begin{aligned}[b] &w^{(6)} ( z_{i} ) + a_{1}(z_{i}) w^{(5)} (z_{i}) + a_{2}(z_{i}) w^{(4)} (z_{i}) + a_{3}(z_{i}) w^{(3)} (z_{i}) \\ &\quad+ a_{4}(z_{i}) w^{(2)} (z_{i}) + a_{5}(z_{i}) w^{(1)} (z_{i}) + a_{6}(z_{i}) w(z_{i}) = f(z_{i}), \quad z \in [ a, b ].\end{aligned} $$
(11)

Using Eqs. (8) and (10) in Eq. (11), we have

$$\begin{gathered} \frac{l_{i + 3} - 6l_{i + 2} + 15l_{i + 1} - 20l_{i} + 15l_{i - 1} - 6l_{i - 2} + l_{i - 3}}{h^{6}} \\ \qquad{}+ a_{1}(z_{i}) \frac{l_{i + 3} - 4l_{i + 2} + 5l_{i + 1} + 5l_{i - 1} + 4l_{i - 2} - l_{i - 3}}{2h^{5}} \\ \qquad{}+ a_{2}(z_{i}) \frac{l_{i + 2} - 4l_{i + 1} + 6l_{i} - 4l_{i - 1} + l_{i - 2}}{h^{4}}+ a_{3}(z_{i}) \frac{l_{i + 2} - 2l_{i + 1} + 2l_{i - 1} - l_{i - 2}}{2h^{3}}\\ \qquad{} + a_{4}(z_{i})\frac{l_{i + 1} - 2l_{i} + l_{i - 1}}{h^{2}} + a_{5}(z_{i}) \frac{l_{i + 1} - l_{i - 1}}{2h}+ a_{6}(z_{i}) \frac{l_{i - 1} + 4l_{i} + l_{i + 1}}{6}\\ \quad = f_{i}(z_{i}), \quad z \in [ a, b ]. \end{gathered} $$

Simplifying

$$ \begin{aligned}[b] &6(l_{i + 3} - 6l_{i + 2} + 15l_{i + 1} - 20l_{i} + 15l_{i - 1} - 6l_{i - 2} + l_{i - 3} ) + 3h a_{1}(z_{i}) (l_{i + 3} - 4l_{i + 2} + 5l_{i + 1} \\ &\qquad+ 5l_{i - 1} + 4l_{i - 2} - l_{i - 3}) + 6h^{2}a_{2}(z_{i}) (l_{i + 2} - 4l_{i + 1} + 6l_{i} - 4l_{i - 1} + l_{i - 2}) \\ &\qquad+ 3 h^{3}a_{3}(z_{i}) (l_{i + 2} - 2l_{i + 1} + 2l_{i - 1} - l_{i - 2} ) + 6h^{4}a_{4}(z_{i}) (l_{i + 1} - 2l_{i} + l_{i - 1} ) \\ &\qquad+ 3h^{5}a_{5}(z_{i}) (l_{i + 1} - l_{i - 1})+ h^{6}a_{6}(z_{i}) (l_{i - 1} + 4l_{i} + l_{i + 1}) \\&\quad= 6h^{6}f_{i}(z_{i}), \quad z \in [ a, b ]. \end{aligned} $$
(12)

By solving Eq. (12) we will have a linear system of \((n - 3)\) linear equations \(( i = 2, 3,\ldots, n - 2 )\) with \((n + 3)\) unknowns \(l_{i}\), where \(i = - 1,0,1,\ldots,n + 1 \), so six more equations are desirable. By the boundary conditions at \(z = a\), we get

$$ \begin{gathered} w ( a ) = \alpha_{0}\quad \Rightarrow \quad l_{ -1} + 4l_{0} + l_{1} = 6 \alpha_{0}, \\ {w}' ( a ) = \alpha_{1} \quad\Rightarrow\quad - l_{ -1} + l_{1} = 2\alpha_{1}h, \\ w'' ( a ) = \alpha_{2} \quad\Rightarrow\quad l_{ -1} - 2l_{0} + l_{1} = \alpha_{2}h^{2}. \end{gathered} $$
(13)

Similarly, for \(z = b\),

$$ \begin{gathered} w ( b ) = \beta_{0} \quad\Rightarrow\quad l_{n -1} + 4l_{n} + l_{n + 1} = 6\beta_{0}, \\ w' ( b ) = \beta_{1} \quad\Rightarrow\quad - l_{n -1} + l_{n + 1} = 2\beta_{1}h, \\ w'' ( b ) = \beta_{2} \quad\Rightarrow\quad l_{n -1} - 2l_{n} + l_{n + 1} = \beta_{2}h^{2}. \end{gathered} $$
(14)

The approximate solution \(w(z) = s ( z ) = \sum_{i = - 1}^{n + 1} l_{i}B_{i} ( z )\) is attained by resolving the above system of \((n+3)\) linear equations in \((n+3)\) unknowns using the above set of Eqs. (12)–(14).

3 Results and discussion

In the numerical section, we have solved four examples to show the efficiency of cubic B-spline method. Obviously, the results of our method are very encouraging because this method signifies the fastest convergence as well as an incredibly low error.

Problem 1

$$w^{(6)}(z) - w(z) = - 6e^{z}, \quad0 \le {z} \le 1, $$

subject to

$$\begin{gathered} w ( 0 ) = 1,\qquad w ( 1 ) = 0,\qquad w^{\prime} ( 0 ) = 0,\quad\quad w^{\prime}( 1 ) = - e, \\ w^{\prime\prime} ( 0 ) = - 1,\qquad w^{\prime\prime} ( 1 ) = - 2e. \end{gathered}$$

The precise solution is \(w ( z ) = (1 - z) e^{z}\). Algebraic outcomes for this problem are presented in Table 2 for \(h= \frac{1}{10}\) and Table 3 for \(h= \frac{1}{5}\) respectively. The graphical comparison of absolute errors at \(h= \frac{1}{10}\) and \(h= \frac{1}{5}\) is demonstrated in Figs. 1 and 2 respectively.

Figure 1
figure 1

Comparison of our method and [24] and [30] for Problem 1

Figure 2
figure 2

Comparison of our method and [1] for Problem 1

Table 2 Algebraic outcomes for Problem 1 at \(h=\frac{1}{10}\)
Table 3 Algebraic outcomes for Problem 1 at \(h=\frac{1}{5}\)

At \(h= \frac{1}{10}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=10\) we will have seven equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have thirteen equations and thirteen unknowns. The values of thirteen unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 11 \) are

$$\begin{gathered} l _{-1} = 0.330000000000000,\qquad l_{0} = 1.001666666666667, \\ l_{1} = 0.996666666666667,\qquad l_{2} = 0.979513602244758,\\ l_{3} = 0.947721275080079,\qquad l_{4} = 0.898417972748468, \\ l_{5} = 0.828287737175295,\qquad l_{6} = 0.733504478738225,\\ l_{7} = 0.609658034368616,\qquad l_{8} = 0.451671157504189,\\ l_{9} = 0.253706303989511,\qquad l_{10} = 0.009060939428197, \\ l_{11} = -0.289950061702298.\end{gathered} $$

At \(h= \frac{1}{5}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n = 5\) we will have two equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have eight equations and eight unknowns. The values of eight unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 6 \) are

$$\begin{gathered} l _{-1} = 0.986666666666667,\qquad l_{0} = 1.001666666666667,\\ l_{1} = 0.986666666666667,\qquad l_{2} = 0.908268286018834,\\ l_{3} = 0.747263518996417,\qquad l_{4} = 0.471168850266235, \\ l_{5} = 0.036243757712787,\qquad l_{6} = -0.616143881117384. \end{gathered} $$

The results of [9] for Problem 1 is demonstrated as follows in Table 4, and obviously our results are encouraging.

Table 4 The results of Problem 1 from [9]

Solving with cubic B-spline method, we also can acquire the estimated derivative at the knots, which is described in Table 5, which is the main advantage of cubic B-spline method, as other methods are unable to obtain these values.

Table 5 Estimated derivative at the knots for Problem 1

Problem 2

$$w^{(6)} (z) + z w (z) = - \bigl( 24 + 11z + ({z})^{3} \bigr) e^{z},\quad 0 \le {z} \le 1, $$

subject to

$$\begin{gathered} w ( 0 ) = 0,\quad\quad w ( 1 ) = 0, \qquad w^{\prime} ( 0 ) = 1,\qquad w^{\prime} ( 1 ) = - e, \\ w^{\prime\prime} ( 0 ) = 0,\qquad w^{\prime\prime} ( 1 ) = - 4e.\end{gathered} $$

The exact solution is \(w ( z ) = {z} (1 - z) e^{z}\). Algebraic outcomes for this problem are presented in Table 6 for \(h= \frac{1}{10}\) and Table 7 for \(h= \frac{1}{5}\) respectively. The graphical comparison of absolute errors at \(h= \frac{1}{10}\) and \(h= \frac{1}{5}\) is demonstrated in Fig. 3.

Figure 3
figure 3

Comparison of exact and cubic-B solution for Problem 2

Table 6 Algebraic outcomes for Problem 2 at \(h=\frac{1}{10}\)
Table 7 Algebraic outcomes for Problem 2 at \(h=\frac{1}{5}\)

At \(h= \frac{1}{10}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=10\) we will have seven equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have thirteen equations and thirteen unknowns. The values of thirteen unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 11 \) are

$$\begin{aligned}& l _{-1} = -0.100000000000,\qquad l_{0} = 0,\qquad l_{1} = 0.100000000000,\\& l_{2} = 0.196563506057683,\qquad l_{3} = 0.285339812568966,\\& l_{4} = 0.360854884390805,\qquad l_{5} = 0.416270189387388,\\& l_{6} = 0.443104558445803,\qquad l_{7} = 0.430913439191555,\\& l_{8} = 0.366919100583079,\qquad l_{9} = 0.235584425133117,\\& l_{10} = 0.018121878856394,\qquad l_{11} = -0.308071940558692. \end{aligned}$$

At \(h= \frac{1}{5}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=5\) we will have two equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have eight equations and eight unknowns. The values of eight unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 6 \) are

$$\begin{gathered} l = -0.2000000002806,\qquad l_{0} = -0.0000000002242,\\ l_{1} = 0.2000000015886,\qquad l_{2} = 0.3689521916188,\\ l_{3} = 0.4597278365167,\qquad l_{4} = 0.3986813363644, \\ l_{5} = 0.0724875152029,\qquad l_{6} = -0.6886313967683. \end{gathered} $$

The maximum absolute errors corresponding to Problem 2 in [30] are demonstrated in Table 8, and obviously our results are encouraging.

Table 8 The maximum absolute errors of Problem 2 from [30]

Solving with cubic B-spline method, we also can acquire the estimated derivative at the knots, which is described in Table 9, which is the main advantage of cubic B-spline method, as other methods are unable to obtain these values.

Table 9 Estimated derivative at the knots for Problem 2

Problem 3

$$w^{(6)} (z) + e^{ - z} w (z) = - 720 + \bigl(z - (z)^{2}\bigr)^{3} e^{ - z},\quad 0 \le z \le 1, $$

subject to

$$w ( 0 ) = 0,\qquad w ( 1 ) = 0, \qquad w^{\prime} ( 0 ) = 0,\qquad w^{\prime} ( 1 ) = 0, \qquad w^{\prime\prime} ( 0 ) = 0,\qquad w^{\prime\prime} ( 1 ) = 0. $$

The exact solution is \(w ( z ) = (z)^{3} (1 - z)^{3}\). Algebraic outcomes for this problem are presented in Table 10 for \(h= \frac{1}{10}\) and Table 11 for \(h= \frac{1}{5}\) respectively. The graphical comparison of absolute errors at \(h= \frac{1}{10}\) and \(h= \frac{1}{5}\) is demonstrated in Fig. 4.

Figure 4
figure 4

Comparison of exact and cubic-B solution for Problem 3

Table 10 Algebraic outcomes for Problem 3 at \(h=\frac{1}{10}\)
Table 11 Algebraic outcomes for Problem 3 at \(h=\frac{1}{5}\)

At \(h= \frac{1}{10}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=10\) we will have seven equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have thirteen equations and thirteen unknowns. The values of thirteen unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 11 \) are

$$\begin{gathered} l _{-1} = 0,\qquad l_{0} = 0,\qquad l_{1} = 0,\qquad l_{2} = 0.003023996050353,\\ l_{3} = 0.008063989424737,\qquad l_{4} = 0.012599983512128,\\ l_{5} = 0.014399981311357,\qquad l_{6} = 0.012599983874666, \\ l_{7} = 0.008063989877409, \qquad l_{8} = 0.003023996294690,\\ l_{9} = 0,\quad\quad l_{10} = 0,\qquad l_{11} = 0.\end{gathered} $$

At \(h= \frac{1}{5}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=5\) we will have two equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have eight equations and eight unknowns. The values of eight unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 6 \) are

$$\begin{gathered} l _{-1} = 0,\qquad l_{0} = 0,\qquad l_{1} = 0,\qquad l_{2} = 0.009215951379013, \\ l_{3} = 0.009215952744138,\qquad l_{4} = 0,\qquad l_{5} = 0,\qquad l_{6} = 0.\end{gathered} $$

The results of [9] for Problem 3 are demonstrated in Table 12 and obviously our results are encouraging.

Table 12 The maximum absolute errors of Problem 3 from [9]

Solving with Cubic B-spline method, we also can acquire the estimated derivative at the knots, which is described in Table 13, which is the main advantage of cubic B-spline method, as other methods are unable to obtain these values.

Table 13 Estimated derivative at the knots for Problem 3

Problem 4

$$w^{(6)}(z) = \operatorname{Cos}(z) - \operatorname{Sin}(z),\quad 0 \le z \le 1, $$

subject to

$$\begin{gathered} w ( 0 ) = 1,\qquad w ( 1 ) = \operatorname{Cos} (1) + \operatorname{Sin} (1), \qquad w^{\prime} ( 0 ) = 1,\qquad w^{\prime} ( 1 ) = \operatorname{Cos} (1) - \operatorname{Sin} (1), \\ w^{\prime\prime} ( 0 ) = - 1,\quad\quad w^{\prime\prime} ( 1 ) = - \operatorname{Cos} (1) - \operatorname{Sin} (1).\end{gathered} $$

The precise solution is \(w ( z ) = \operatorname{Cos} (z) + \operatorname{Sin} (z)\). Algebraic outcomes for this problem are presented in Table 14 for \(h= \frac{1}{10}\) and Table 15 for \(h= \frac{1}{5}\) respectively. The graphical comparison of absolute errors at \(h= \frac{1}{10}\) and \(h= \frac{1}{5}\) is demonstrated in Fig. 5.

Figure 5
figure 5

Comparison of exact and cubic-B solution for Problem 4

Table 14 Algebraic outcomes for Problem 4 at \(h=\frac{1}{10}\)
Table 15 Algebraic outcomes for Problem 4 at \(h=\frac{1}{5}\)

At \(h= \frac{1}{10}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=10\) we will have seven equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have thirteen equations and thirteen unknowns. The values of thirteen unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 11 \) are

$$\begin{gathered} l _{-1} = 0.896666666666667,\qquad l_{0} = 1.001666666666667,\\ l_{1} = 1.096666666666667,\qquad l_{2} = 1.180708735596316,\\ l_{3} = 1.252951688415917,\qquad l_{4} = 1.312674935541193, \\ l_{5} = 1.359282877916855,\qquad l_{6} = 1.392309586646931,\\ l_{7} = 1.411423490072131,\qquad l_{8} = 1.416431780494556,\\ l_{9} = 1.407284247601092,\qquad l_{10} = 1.384076246160497, \\ l_{11} = 1.347050511813141.\end{gathered} $$

At \(h= \frac{1}{5}\) we will have unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, n+1 \). At \(n=5\) we will have two equations from Eq. (12), three equations from Eq. (13), three equations from Eq. (14), so in total we will have eight equations and eight unknowns. The values of eight unknowns \(l _{i}\) where \(i = -1, 0, 1, \dots, 6 \) are as follows.

Solving with cubic B-spline method, we also can acquire the estimated derivative at the knots, which is described in Table 16, which is the main advantage of cubic B-spline method, as other methods are unable to obtain these values.

Table 16 Estimated derivative at the knots for Problem 4

4 Conclusion

The preceding segments demonstrate that the cubic B-spline technique is a sensible tactic to the numerical solution of sixth order BVP. The calculations associated with the examples deliberated above were accomplished by using Matlab R2015a. The algebraic outcomes validate the effectiveness and accurateness of the anticipated scheme. The anticipated algorithm formed a rapidly convergent series. We recommend that the cubic B-spline technique can also be accommodating when we investigate further higher order BVPs. It works soundly for higher order problems and signifies the fastest convergence as well as a notably low error.