Skip to main content

Advertisement

Extended cubic B-spline method for solving a linear system of second-order boundary value problems

Article metrics

  • 1030 Accesses

  • 1 Citations

Abstract

A method based on extended cubic B-spline is proposed to solve a linear system of second-order boundary value problems. In this method, two free parameters, \(\lambda _{1}\) and \(\lambda _{2}\), play an important role in producing accurate results. Optimization of these parameters are carried out and the truncation error is calculated. This method is tested on three examples. The examples suggest that this method produces comparable or more accurate results than cubic B-spline and some other methods.

Background

It is well-known that many real life phenomena in physics and engineering can be modelled by systems of linear and nonlinear differential equations. One class of these systems is of second order boundary value problems. The existence of solution to such system was studied in Chen et al. (2005), Cheng and Zhong (2005), Thompson and Tisdell (2002). Consider the following linear system of second-order boundary value problems:

$${ \left\{ \begin{array}{l} {u}^{\prime\prime}(x)+{a}_1(x){u}^{\prime}(x)+{a}_2(x){u}(x)+{a}_3(x){v}^{\prime\prime}(x)+{a}_4(x){v}^{\prime}(x)+{a}_5(x){v}(x)={f}_1(x)\\ {v}^{\prime\prime}(x)+{b}_1(x){v}^{\prime}(x)+{b}_2(x){v}(x)+{b}_3(x){u}^{\prime\prime}(x)+{b}_4(x){u}^{\prime}(x)+{b}_5(x){u}(x)={f}_2(x)\\ u(0)=u(1)=0, v(0)=v(1)=0, \end{array}\right.}$$
(1)

where \(a\le x\le b\), \({f}_1(x)\) and \({f}_2(x)\) are continuous functions, and \({a}_i(x)\) and \({b}_i(x)\), for \(i=1,2,3,4,5\), are real-valued functions of x that are smooth enough.

There are many studies on the solutions of linear and nonlinear systems of second-order boundary value problems approximately. Amongst others are variational iteration, reproducing kernel, sinc-collocation, modified homotopy analysis, continuous genetic algorithm, He’s homotopy perturbation, Laplace homotopy analysis, homotopy perturbation-reproducing kernel, and local radial basis function based differential quadrature methods (Lu 2007; Geng and Cui 2007; Dehghan and Saadatmandi 2007; Bataineh et al. 2009; Arqub and Abo-Hammour 2014; Saadatmandi et al. 2009; Ogunlaran and Ademola 2015; Geng and Cui 2011; Dehghan and Nikpour 2013). The main purpose of our present study is to apply a spline function in solving Eq. (1). This equation had already been treated using cubic B-spline, cubic B-spline scaling functions, sinc-collocation, and spline collocation approaches (Caglar and Caglar 2009; Dehghan and Lakestani 2008; El-Gamel 2012; Khuri and Sayfy 2009).

In 2003, Han and Liu proposed an extension of cubic B-spline of degree four with one free parameter, \(\lambda\). This parameter is introduced within the basis function in order to increase the flexibility of the spline curve (Han and Liu 2003). Then, Xu and Wang generalized the extension to degree five and six (Gang and Guo-Zhao 2008). Our goal is to apply the simplest B-spline extension, that is, extended cubic B-spline of degree four, in solving Eq. (1). Linear and singular boundary value problems has already been solved using extended cubic B-spline of degree four and an approach of optimizing \(\lambda\) has been proposed (Hamid et al. 2011; Goh et al. 2011). The results are promising and thus become the motivation of this study.

In this paper, extended cubic B-spline will be discussed along with the extended cubic B-spline method (ECBM). Optimization of the free parameters and calculations on the truncation error will follow. Three examples will be presented and comparisons with other methods will be made.

Extended cubic B-spline method

Extended cubic B-spline is an extension of B-spline Gang and Guo-Zhao (2008). One free parameter, \(\lambda\), is introduced within the basis function where this parameter can be used to alter the shape of the generated curve. The value of \(\lambda\) can be varied to obtain different numerical results. In this study, this value is optimized to produce approximate solutions with the least error.

Extended cubic B-spline

Suppose that \(\left\{ x_{i} \right\} _{i=0}^{n}\) is a uniform partition of a finite interval [ab] with \(n\in {\mathbb {Z}}^{+}\) such that \(a=x_{0}<x_{1}< \cdots <x_{n}=b.\) The partition can be extended using \(h=\frac{b-a}{n}\), \(x_{0}=a\), \(x_{i}=x_{0}+{i}{h}\), and \(i\in {\mathbb {Z}}\). Extended cubic B-spline basis function is established from a linear combination of the cubic B-spline basis function (Gang and Guo-Zhao 2008). Here, the blending function of degree four, \(E_{i}^{4}\), as shown in (2), is used.

$$\begin{aligned} E_{i}^{4}(x,\lambda )= \frac{1}{24h^{4}} \left\{ \begin{array}{ll} 4h(1-\lambda )(x-x_{i})^{3}+3\lambda (x-x_{i})^{4},& \quad x \in [x_{i},x_{i+1}],\\ (4-\lambda )h^{4}+12h^{3}(x-x_{i+1})+6h^{2}(2+\lambda )(x-x_{i+1})^{2} & \\ \quad -12h(x-x_{i+1})^{3}-3\lambda (x-x_{i+1})^{4}, & \quad x\in [x_{i+1},x_{i+2}], \\ (4-\lambda )h^{4}+12h^{3}(x_{i+3}-x)+6h^{2}(2+\lambda )(x_{i+3}-x)^{2} & \\ \quad -12h(x_{i+3}-x)^{3}-3\lambda (x_{i+3}-x)^{4}, & \quad x \in [x_{i+2},x_{i+3}],\\ 4h(1-\lambda )(x_{i+4}-x)^{3}+3\lambda (x_{i+4}-x)^{4} , & \quad x \in [x_{i+3},x_{i+4}], \end{array}\right. \end{aligned}$$
(2)

Extended cubic B-spline basis will degenerate into cubic B-spline basis when \(\lambda =0\). For \(-8\le \lambda \le 1\), cubic B-spline and extended cubic B-spline share the same properties: partition of unity, non-negativity, \(C^{2}\) continuity, and local suport Hamid (2010). Figure 1 displays a family of extended cubic B-spline bases with different values of \(\lambda\).

Fig. 1
figure1

Extended cubic B-spline basis, \(E_{i}^{4}(x,\lambda )\), when \(\lambda =-10, -5, 0, 5,10\)

From the basis function, an arbitrary spline curve can be generated by the following formula:

$$\begin{aligned} U(x,\lambda )=\sum _{i=-3}^{n-1} C_{i}E_{i}^{4}(x,\lambda ), x\in [x_{0},x_{n}],\quad C_{i} \in {\mathbb {R}}. \end{aligned}$$

As a result, \(U(x,\lambda )\) is a piecewise polynomial functions of degree 4. Similarly, for \(-8\le \lambda \le 1\), cubic B-spline and extended cubic B-spline curves have the same properties: symmetry, geometric invariability, and convex hull Goh et al. (2011). The values of \(E_{i}\) and its derivatives \(E_{i}^{\prime}\), \(E_{i}^{\prime\prime}\) at the nodal points are tabulated in Table. 1.

Table 1 Coefficient of \(E_{i}\), \(E_{i}^{\prime}\), and \(E_{i}^{\prime\prime}\)

Extended cubic B-spline interpolation

Suppose that the spline curves \(U(x,\lambda _{1})\) and \(V(x,\lambda _{2})\) are the approximation to the exact solutions, u(x) and v(x), respectively, defined as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} U(x,\lambda _{1})=\sum\limits _{i=-3}^{n-1} C_{i}E_{i}^{4}(x,\lambda _{1}),\quad x\in [x_{0},x_{n}], \quad C_{i}\in {\mathbb {R}}\\ V(x,\lambda _{2})= \sum\limits _{i=-3}^{n-1} D_{i}E_{i}^{4}(x,\lambda _{2}), \quad x\in [x_{0},x_{n}],\quad D_{i}\in {\mathbb {R}}\\ \end{array}\right. }&\end{aligned}$$
(3)

Therefore, from Table 1, the values of \(U(x,\lambda _{1})\) ,\(U^{\prime} (x,\lambda _{1})\), \(U^{\prime\prime} (x,\lambda _{1})\), \(V(x,\lambda _{2})\) , \(V^{\prime}(x,\lambda _{2})\), and \(V^{\prime\prime}(x, \lambda _{2})\) at knot \(x_{i}\) can be simplified into Eqs. (4) and (5).

$${\left\{ \begin{array}{l} U(x_{i},\lambda _{1})= C_{i-3}\left(\frac{4-\lambda _1}{24}\right)+ C_{i-2}\left(\frac{8+\lambda _1}{12}\right)+ C_{i-1}\left(\frac{4-\lambda _1}{24}\right)\\ U^{\prime} (x_i,\lambda _{1})= C_{i-3}\left(-\frac{1}{2h}\right)+C_{i-2}\left(\frac{0}{h}\right)+C_{i-1}(\frac{1}{2h})\\ U^{\prime\prime} (x_i,\lambda _{1})=C_{i-3}\left(\frac{2+\lambda _1}{2h^{2}}\right)+ C_{i-2}\left(\frac{-2-\lambda _1}{h^{2}}\right)+ C_{i-1}\left(\frac{2+\lambda _1}{2h^{2}}\right) \end{array}\right. }$$
(4)
$${\left\{ \begin{array}{l} V(x_{i},\lambda _{2})= D_{i-3}\left(\frac{4-\lambda _2}{24}\right)+ D_{i-2}\left(\frac{8+\lambda _2}{12}\right)+ D_{i-1}\left(\frac{4-\lambda _2}{24}\right)\\ V^{\prime} (x_i,\lambda _{2})= D_{i-3}\left(-\frac{1}{2h}\right)+D_{i-2}\left(\frac{0}{h}\right)+D_{i-1}(\frac{1}{2h})\\ V^{\prime\prime} (x_i,\lambda _{2})=D_{i-3}\left(\frac{2+\lambda _2}{2h^{2}}\right)+ D_{i-2}\left(\frac{-2-\lambda _2}{h^{2}}\right)+ D_{i-1}\left(\frac{2+\lambda _2}{2h^{2}}\right) \end{array}\right. }$$
(5)

Equations (4) and (5) will be used in simplifying the terms in the system of boundary value problems.

Solution of system of second order boundary value problem

In this part, a collocation approach based on extended cubic B-spline basis functions is used to obtain the numerical solutions of a class of systems of linear second order boundary value problems (1). The approximate solution (3) should satisfy the differential equation at points \(x_{i}\). This can be done by putting (3) into (1) resulting in Eqs. (6)–(9).

$$\begin{aligned}&{U}^{\prime\prime} (x_{i},\lambda _{1})+{a}_1(x_{i}){U}^{\prime}(x_{i},\lambda _{1})+{a}_2(x_{i}){U}(x_{i},\lambda _{1}) \\ & \quad +{a}_3(x_{i}){V}^{\prime\prime}(x_{i},\lambda _{2})+{a}_4(x_{i}){V}^{\prime}(x_{i},\lambda _{2})+{a}_5(x_{i}){V}(x_{i},\lambda _{2})=f_{1}(x_{i}), \quad i=0, 1, 2,\ldots , n \end{aligned}$$
(6)
$$\begin{aligned}&{V}^{\prime\prime}(x_{i},\lambda _{2})+{b}_1(x_{i}){V}^{\prime}(x_{i},\lambda _{2})+{b}_2(x_{i}){V}(x_{i},\lambda _{2}) \\&\quad +{b}_3(x_{i}){U}^{\prime\prime}(x_{i},\lambda _{1})+{b}_4(x_{i}){U}^{\prime}(x_{i},\lambda _{1})+{b}_5(x_{i}){U}(x_{i},\lambda _{1})=f_{2}(x_{i}), \quad i=0, 1, 2,\ldots , n \end{aligned}$$
(7)
$$U(x_{i},\lambda _{1})=0, \quad x=0, n$$
(8)
$$V(x_{i},\lambda _{2})=0, \quad x=0, n$$
(9)

Equations (4)–(5) are substituted into Eqs. (6)–(9) resulting in a linear system of \(2(n+3)\) equations with \(2(n+3)\) unknowns, \(C_{-3}\), \(C_{-2},\ldots ,C_{n-1}\), \(D_{-3}\), \(D_{-2},\ldots ,D_{n-1}\). This system can be written in the matrix-vector

$$XY=Z,$$
(10)

where \(Y=[ C_{-3} , C_{-2},\ldots , C_{n-1} , D_{-3} , D_{-2},\ldots ,D_{n-1}]^{T}\), \(Z=[0, f_{1}(x_{0}),\ldots , f_{1}(x_{n}), 0, 0, f_{2}(x_{0}),\ldots , f_{2}(x_{n}),0]^{T}\), and X is a \(2(n+3)\times 2(n+3)\) matrix given by

$$X= \left(\begin{array}{ccc} M_{1} & \mid & M_{2} \\ \cdots & \cdots & \cdots \\ M_{4} &\mid & M_{3}\\ \end{array}.\right)$$

The four sub-matrices \(M_{1}\), \(M_{2}\), \(M_{3}\), and \(M_{4}\) are calculated as follows:

$$\begin{aligned} M_{1}= & {} \begin{pmatrix} \frac{4-\lambda _1}{24} &{} \frac{8+\lambda _1}{12} &{} \frac{4-\lambda _1}{24} &{} 0 &{} \cdots &{} 0 &{} 0 \\ \alpha _{1}(x_{0}) &{} \beta _{1}(x_{0}) &{} \gamma _{1}(x_{0}) &{} 0 &{} \cdots &{} 0 &{} 0 \\ 0 &{} \alpha _{1}(x_{1}) &{} \beta _{1}(x_{1}) &{} \gamma _{1}(x_{1}) &{} 0 &{} \cdots &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} \cdots &{} 0 &{} 0 &{} \alpha _{1}(x_{n}) &{} \beta _{1}(x_{n}) &{} \gamma _{1}(x_{n})\\ \cdot &{} \cdot &{} \cdot &{} \cdot &{} \frac{4-\lambda _1}{24} &{} \frac{8+\lambda _1}{12} &{} \frac{4-\lambda _1}{24} \end{pmatrix}_{(n+3)\times (n+3)}\\ M_{2}= & {} \begin{pmatrix} 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{} 0 \\ \alpha _{2}(x_{0}) &{} \beta _{2}(x_{0}) &{} \gamma _{2}(x_{0}) &{} 0 &{} \cdots &{} 0 &{} 0 \\ 0 &{} \alpha _{2}(x_{1}) &{} \beta _{2}(x_{1}) &{} \gamma _{2}(x_{1}) &{} 0 &{} \cdots &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} \cdots &{} 0 &{} 0 &{} \alpha _{2}(x_{n}) &{} \beta _{2}(x_{n}) &{} \gamma _{2}(x_{n})\\ \cdot &{} \cdot &{} \cdot &{} \cdot &{} 0 &{} 0 &{} 0 \end{pmatrix}_{(n+3)\times (n+3)}\\ M_{3}= & {} \begin{pmatrix} \frac{4-\lambda _2}{24} &{} \frac{8+\lambda _2}{12} &{} \frac{4-\lambda _2}{24} &{} 0 &{} \cdots &{} 0 &{} 0 \\ \alpha _{3}(x_{0}) &{} \beta _{3}(x_{0}) &{} \gamma _{3}(x_{0}) &{} 0 &{} \cdots &{} 0 &{} 0 \\ 0&{}\alpha _{3}(x_{1}) &{} \beta _{3}(x_{1}) &{} \gamma _{3}(x_{1}) &{} 0 &{} \cdots &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} \cdots &{} 0 &{} 0 &{} \alpha _{3}(x_{n}) &{} \beta _{3}(x_{n}) &{} \gamma _{3}(x_{n})\\ \cdot &{} \cdot &{} \cdot &{} \cdot &{} \frac{4-\lambda _2}{24} &{} \frac{8+\lambda _2}{12} &{} \frac{4-\lambda _2}{24} \end{pmatrix}_{(n+3)\times (n+3)} \\ M_{4}= & {} \begin{pmatrix} 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{} 0 \\ \alpha _{4}(x_{0}) &{} \beta _{4}(x_{0}) &{} \gamma _{4}(x_{0}) &{} 0 &{} \cdots &{} 0 &{} 0 \\ 0 &{} \alpha _{4}(x_{1}) &{} \beta _{4}(x_{1}) &{} \gamma _{4}(x_{1}) &{} 0 &{} \cdots &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} \cdots &{} 0 &{} 0 &{} \alpha _{4}(x_{n}) &{} \beta _{4}(x_{n}) &{} \gamma _{4}(x_{n})\\ \cdot &{} \cdot &{} \cdot &{} \cdot &{} 0 &{} 0 &{} 0 \end{pmatrix}_{(n+3)\times (n+3)} \end{aligned}$$

The elements of these sub-matrices are specified below for \(i=0, 1, \ldots , n\).

$$\begin{aligned} \alpha _{1}(x_{i})&= \frac{2+\lambda _1}{2h^{2}}-a_{1}(x_{i})\frac{1}{2h}+a_{2}(x_{i})\frac{4-\lambda _1}{24}\\ \alpha _{2}(x_{i})&= a_{3}(x_{i})\frac{2+\lambda _2}{2h^{2}}-a_{4}(x_{i})\frac{1}{2h}+a_{5}(x_{i})\frac{4-\lambda _2}{24}\\ \alpha _{3}(x_{i})&= \frac{2+\lambda _2}{2h^{2}}-b_{1}(x_{i})\frac{1}{2h}+b_{2}(x_{i})\frac{4-\lambda _2}{24}\\ \alpha _{4}(x_{i})&= b_{3}(x_{i})\frac{2+\lambda _1}{2h^{2}}-b_{4}(x_{i})\frac{1}{2h}+b_{5}(x_{i})\frac{4-\lambda _1}{24}\\ \beta _{1}(x_{i})&= \frac{-2-\lambda _1}{h^{2}}+a_{1}(x_{i})\frac{0}{h}+a_{2}(x_{i})\frac{8+\lambda _1}{12}\\ \beta _{2}(x_{i})& = a_{3}(x_{i})\frac{-2-\lambda _2}{h^{2}}+a_{4}(x_{i})\frac{0}{h}+a_{5}(x_{i})\frac{8+\lambda _2}{12}\\ \beta _{3}(x_{i})&= \frac{-2-\lambda _2}{h^{2}}+b_{1}(x_{i})\frac{0}{h}+b_{2}(x_{i})\frac{8+\lambda _2}{12}\\ \beta _{4}(x_{i})&= b_{3}(x_{i})\frac{-2-\lambda _1}{h^{2}}+b_{4}(x_{i})\frac{0}{h}+b_{5}(x_{i})\frac{8+\lambda _1}{12}\\ \gamma _{1}(x_{i})&= \frac{2+\lambda _1}{2h^{2}}+a_{1}(x_{i})\frac{1}{2h}+a_{2}(x_{i})\frac{4-\lambda _1}{24}\\ \gamma _{2}(x_{i})& = a_{3}(x_{i})\frac{2+\lambda _2}{2h^{2}}+a_{4}(x_{i})\frac{1}{2h}+a_{5}(x_{i})\frac{4-\lambda _2}{24}\\ \gamma _{3}(x_{i})& = \frac{2+\lambda _2}{2h^{2}}+b_{1}(x_{i})\frac{1}{2h}+b_{2}(x_{i})\frac{4-\lambda _2}{24}\\ \gamma _{4}(x_{i})& = b_{3}(x_{i})\frac{2+\lambda _1}{2h^{2}}+b_{4}(x_{i})\frac{1}{2h}+b_{5}(x_{i})\frac{4-\lambda _1}{24} \end{aligned}$$

Equation (10) can be solved for values of \(C_{i}\)’s and \(D_{i}\)’s in terms of \(\lambda _{1}\) and \(\lambda _{2}\) by taking \(Y=X^{-1}Z\). Lastly, the numerical solution can be calculated after obtaining the values of \(\lambda _{1}\) or \(\lambda _{2}\) either by optimization or trial and error (Hamid et al. 2011).

Optimizing the \(\lambda _{1}\) and \(\lambda _{2}\)

The approximate analytical solution is of the form

$$\begin{aligned} {\left\{ \begin{array}{ll} U(x,\lambda _{1})=\sum\limits _{i=-3}^{n-1} C_{i}E_{i}^{4}(x,\lambda _{1}), x\in [x_{0},x_{n}], \quad C_{i}\in {\mathbb {R}} \\ V(x,\lambda _{2})= \sum \limits_{i=-3}^{n-1} D_{i}E_{i}^{4}(x,\lambda _{2}), x\in [x_{0},x_{n}],\quad D_{i}\in {\mathbb {R}}, \end{array}\right. } \end{aligned}$$
(11)

where \(C_{i}\)’s and \(D_{i}\)’s are obtained by solving a linear system of order \(2(n+3)\times 2(n+3)\). \(C_{i}\)’s and \(D_{i}\)’s are functions of x, \(\lambda _{1}\), and \(\lambda _{2}\). The approach used is adopted from Hamid et al. (2011, 2010). Equation (11) has three free parameters, x, \(\lambda _{1}\), and \(\lambda _{2}\). So, U(x) and V(x) can be written as \(U(x,\lambda _{1},\lambda _{2})\) and \(V(x,\lambda _{1},\lambda _{2})\) respectively. \(U(x,\lambda _{1},\lambda _{2})\) and \(V(x,\lambda _{1},\lambda _{2})\) are piecewise polynomials with n intervals, as in equation (12) and (13). Each \(U_{i}(x,\lambda _{1},\lambda _{2})\) and \(V_{i}(x,\lambda _{1},\lambda _{2})\), for \(i=1, 2,\ldots ,n\) are polynomials of degree four.

$$\begin{aligned} U(x,\lambda _{1},\lambda _{2}) =&{\left\{ \begin{array}{ll} U_{1}(x,\lambda _{1},\lambda _{2}), x \in [x_{0},x_{1}],\\ U_{2}(x,\lambda _{1},\lambda _{2}), x\in [x_{1},x_{2}],\\ \vdots \qquad \qquad \vdots \\ U_{n}(x,\lambda _{1},\lambda _{2}), x \in [x_{n-1},x_{n}]. \end{array}\right. } \end{aligned}$$
(12)
$$\begin{aligned} V(x,\lambda _{1},\lambda _{2})=&{\left\{ \begin{array}{ll} V_{1}(x,\lambda _{1},\lambda _{2}), x \in [x_{0},x_{1}],\\ V_{2}(x,\lambda _{1},\lambda _{2}), x\in [x_{1},x_{2}],\\ \vdots \qquad \qquad \vdots \\ V_{n}(x,\lambda _{1},\lambda _{2}), x \in [x_{n-1},x_{n}]. \end{array}\right. } \end{aligned}$$
(13)

From the general form of the problem in (1), \(f_{1}(x)\) and \(f_{2}(x)\) are moved to the left-hand side of the equations, as in (14).

$$\begin{aligned} {\left\{ \begin{array}{ll} {u}^{\prime\prime}(x)+{a}_1(x){u}^{\prime}(x)+{a}_2(x){u}(x)+{a}_3(x){v}^{\prime\prime}(x)+{a}_4(x){v}^{\prime}(x)+{a}_5(x){v}(x)-{f}_1(x)=0\\ {v}^{\prime\prime}(x)+{b}_1(x){v}^{\prime}(x)+{b}_2(x){v}(x)+{b}_3(x){u}^{\prime\prime}(x)+{b}_4(x){u}^{\prime}(x)+{b}_5(x){u}(x)-{f}_2(x)=0 \end{array}\right. } \end{aligned}$$
(14)

Substituting the approximate solutions, \(U(x,\lambda _{1},\lambda _{2})\) and \(V(x,\lambda _{1},\lambda _{2})\) and its derivatives into (14), we have

$$\begin{aligned} {\left\{ \begin{array}{ll} {U}^{\prime\prime}(x,\lambda _{1},\lambda _{2})+{a}_1(x){U}^{\prime}(x,\lambda _{1},\lambda _{2})+\,{a}_2(x){U}(x,\lambda _{1},\lambda _{2})+{a}_3(x){V}^{\prime\prime}(x,\lambda _{1},\lambda _{2}) \\ \quad + {a}_4(x){V}^{\prime}(x,\lambda _{1},\lambda _{2})+{a}_5(x){V}(x,\lambda _{1},\lambda _{2})-{f}_1(x)\approx 0,\\ {V}^{\prime\prime}(x,\lambda _{1},\lambda _{2})+{b}_1(x){V}^{\prime}(x,\lambda _{1},\lambda _{2})+{b}_2(x){V}(x,\lambda _{1},\lambda _{2})+ {b}_3(x){U}^{\prime\prime}(x,\lambda _{1},\lambda _{2})+\\ \quad {b}_4(x){U}^{\prime}(x,\lambda _{1},\lambda _{2})+{b}_5(x){U}(x,\lambda _{1},\lambda _{2})-{f}_2(x)\approx 0. \end{array}\right. } \end{aligned}$$
(15)

Equation (15) is like a version of error formula. From this equation, we have

$$\begin{aligned} D_{1}(x,\lambda _{1},\lambda _{2})& = {U}^{\prime\prime}(x,\lambda _{1},\lambda _{2})+{a}_1(x){U}^{\prime}(x,\lambda _{1},\lambda _{2})+{a}_2(x){U}(x,\lambda _{1},\lambda _{2}) \\ &+{a}_3(x){V}^{\prime\prime}(x,\lambda _{1},\lambda _{2}) \\ &+{a}_4(x){V}^{\prime}(x,\lambda _{1},\lambda _{2})+{a}_5(x){V}(x,\lambda _{1},\lambda _{2})-{f}_1(x), \quad x\in [x_{0},x_{n}],\\ D_{2}(x,\lambda _{1}, \lambda _{2})& = {V}^{\prime\prime}(x,\lambda _{1},\lambda _{2})+{b}_1(x){V}^{\prime}(x,\lambda _{1},\lambda _{2})+{b}_2(x){V}(x,\lambda _{1},\lambda _{2})+ {b}_3(x){U}^{\prime\prime}(x,\lambda _{1},\lambda _{2})\\&+{b}_4(x){U}^{\prime}(x,\lambda _{1},\lambda _{2})+{b}_5(x){U}(x,\lambda _{1},\lambda _{2})-{f}_2(x),\quad x\in [x_{0},\, x_{n}], \end{aligned}$$

which can be expanded into Eqs. (16) and (17).

$$\begin{aligned} D_{1}(x,\lambda _{1},\lambda _{2}) &= {\left\{ \begin{array}{ll} {U}^{\prime\prime}_{1}(x,\lambda _{1},\lambda _{2})+{a}_1(x){U}^{\prime}_{1}(x,\lambda _{1},\lambda _{2}) \\ \quad + {a}_2(x){U}_{1}(x,\lambda _{1},\lambda _{2})+{a}_3(x){V}^{\prime\prime}_{1}(x,\lambda _{1},\lambda _{2}) \\ \quad + {a}_4(x){V}^{\prime}_{1}(x,\lambda _{1},\lambda _{2})+{a}_5(x){V}_{1}(x,\lambda _{1},\lambda _{2})-{f}_1(x), \quad x \in [x_{0},x_{1}],\\ {U}^{\prime\prime}_{2}(x,\lambda _{1},\lambda _{2})+{a}_1(x){U}^{\prime}_{2}(x,\lambda _{1},\lambda _{2}) \\ \quad +{a}_2(x){U}_{2}(x,\lambda _{1},\lambda _{2})+{a}_3(x){V}^{\prime\prime}_{2}(x,\lambda _{1},\lambda _{2}) \\ \quad + {a}_4(x){V}^{\prime}_{2}(x,\lambda _{1},\lambda _{2})+ {a}_5(x){V}_{2}(x,\lambda _{1},\lambda_{2})-{f}_1(x), \quad x\in [x_{1},x_{2}],\\ \vdots \vdots \\ {U}^{\prime\prime}_{n}(x,\lambda _{1},\lambda _{2})+{a}_1(x){U}^{\prime}_{n}(x,\lambda _{1},\lambda _{2})\\ \quad +{a}_2(x){U}_{n}(x,\lambda _{1},\lambda _{2})+{a}_3(x){V}^{\prime\prime}_{n}(x,\lambda _{1},\lambda _{2})\\ \quad +{a}_4(x){V}^{\prime}_{n}(x,\lambda _{1},\lambda _{2})+{a}_5(x){V}_{n}(x,\lambda _{1},\lambda _{2})-{f}_1(x), \quad x\in [x_{n-1},x_{n}].\\ \end{array}\right. } \end{aligned}$$
(16)
$$\begin{aligned} D_{2}(x,\lambda _{1},\lambda _{2}) &= {\left\{ \begin{array}{ll} {V}^{\prime\prime}_{1}(x,\lambda _{1},\lambda _{2})+{b}_1(x){V}^{\prime}_{1}(x,\lambda _{1},\lambda _{2})\\ \quad +{b}_2(x){V}_{1}(x,\lambda _{1},\lambda _{2})+{b}_3(x){U}^{\prime\prime}_{1}(x,\lambda _{1},\lambda _{2})\\ \quad +{b}_4(x){U}^{\prime}_{1}(x,\lambda _{1},\lambda _{2})+{b}_5(x){U}_{1}(x,\lambda _{1},\lambda _{2})-{f}_2(x), \quad x\in [x_{0},x_{1}],\\ {V}^{\prime\prime}_{2}(x,\lambda _{1},\lambda _{2})+{b}_1(x){V}^{\prime}_{2}(x,\lambda _{1},\lambda _{2})\\ \quad + {b}_2(x){V}_{2}(x,\lambda _{1},\lambda _{2})+{b}_3(x){U}^{\prime\prime}_{2}(x,\lambda _{1},\lambda _{2})\\ \quad + {b}_4(x){U}^{\prime}_{2}(x,\lambda _{1},\lambda _{2})+{b}_5(x){U}_{2}(x,\lambda _{1},\lambda _{2})-{f}_2(x), \quad x\in [x_{1},x_{2}],\\ \vdots \vdots \\ {V}^{\prime\prime}_{n}(x,\lambda _{1},\lambda _{2})+{b}_1(x){V}^{\prime}_{n}(x,\lambda _{1},\lambda _{2})\\ \quad + {b}_2(x){V}_{n}(x,\lambda _{1},\lambda _{2})+{b}_3(x){U}^{\prime\prime}_{n}(x,\lambda _{1},\lambda _{2})\\ \quad + {b}_4(x){U}^{\prime}_{n}(x,\lambda _{1},\lambda _{2})+{b}_5(x){U}_{n}(x,\lambda _{1},\lambda _{2})-{f}_2(x), \quad x \in [x_{n-1},x_{n}]. \end{array}\right. } \end{aligned}$$
(17)

Since \(D_{1}(x,\lambda _{1},\lambda _{2})\) and \(D_{2}(x,\lambda _{1},\lambda _{2})\) are piecewise functions with n equations, it is wise to have some representatives from every sub-interval. The representative is taken to be the midpoint of every sub-interval. Therefore, \(x^{*}_{i}=\frac{x_{i}+x_{i+1}}{2}\), for \(i=0, 1,\ldots , n-1\). Evaluating \(D_{1}(x,\lambda _{1},\lambda _{2})\) and \(D_{2}(x,\lambda _{1},\lambda _{2})\) at \(\left\{ x^{*}_{i} \right\} _{i=0}^{n-1}\) would produce a sequence of 2n expressions containing \(\lambda _{1}\) and \(\lambda _{2}\),

$$\begin{aligned} {\left\{ \begin{array}{ll} D_{1}(x^{*}_{0},\lambda _{1},\lambda _{2}),\\ D_{1}(x^{*}_{1},\lambda _{1},\lambda _{2}),\\ \vdots \\ D_{1}(x^{*}_{n-1},\lambda _{1},\lambda _{2}),\\ \end{array}\right. } \end{aligned}$$
(18)
$$\begin{aligned} {\left\{ \begin{array}{ll} D_{2}(x^{*}_{0},\lambda _{1},\lambda _{2}),\\ D_{2}(x^{*}_{1},\lambda _{1},\lambda _{2}),\\ \vdots \\ D_{2}(x^{*}_{n-1},\lambda _{1},\lambda _{2}),\\ \end{array}\right. } \end{aligned}$$
(19)

By handling Eqs. (18) and (19) as the error at collocation points, the expressions are combined using the two-norm formula resulting equation (20). This equation measures the accuracy of the approximated solution, \(U(x,\lambda _{1},\lambda _{2})\) and \(V(x,\lambda _{1},\lambda _{2})\) without including the exact solution.

$$\begin{aligned} d_{1}(\lambda _{1},\lambda _{2})=\sqrt{\sum _{i=0}^{n-1}[D_{1}(x^{*}_{i},\lambda _{1},\lambda _{2})]^{2}+\sum _{i=0}^{n-1}[D_{2}(x^{*}_{i},\lambda _{1},\lambda _{2})]^{2}} \end{aligned}$$
(20)

Also, from Eq. (20) we can obtain \(d_{2}(\lambda _{1},\lambda _{2})\) which is assumed to be easier to calculate than the former.

$$\begin{aligned} d_{2}(\lambda _{1},\lambda _{2})=\sum _{i=0}^{n-1}[D_{1}(x^{*}_{i},\lambda _{1},\lambda _{2})]^{2}+\sum _{i=0}^{n-1}[D_{2}(x^{*}_{i},\lambda _{1},\lambda _{2})]^{2} \end{aligned}$$
(21)

On the other hand, we can combine the expressions using one-norm formula, as in (22).

$$\begin{aligned} d_{3}(\lambda _{1},\lambda _{2})=\sum _{i=0}^{n-1}\left|D_{1}(x^{*}_{i},\lambda _{1},\lambda _{2})\right|+\sum _{i=0}^{n-1}\left|D_{2}(x^{*}_{i},\lambda _{1},\lambda _{2})\right| \end{aligned}$$
(22)

This is done to make comparisons between results of \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) in terms of computational time and accuracy. \(d_{3}(\lambda _{1},\lambda _{2})\) is significantly more simplified that the other two. Finally, we can substitute the optimized value of \(\lambda _{1}\) and \(\lambda _{2}\) in the approximate solution for the problems.

Error estimation

The technique for finding the error estimate as in Kadalbajoo and Kumar (2007) is extended to the system of linear second order differential equations. In this part, a truncation error for the present method in the interval [0, 1] is presented. Suppose that u(x) and v(x) are functions with continuous derivatives in [0, 1]. By using the formulas of u(x) in (4), the following relationship can be obtained.

$$\begin{aligned} h\left[\left(\frac{4-\lambda _{1}}{24}\right)U^{\prime}(x_{i-1},\lambda _{1})+\left(\frac{8+\lambda _{1}}{12})U^{\prime}(x_{i},\lambda _{1}\right)+\left(\frac{4-\lambda _{1}}{24}\right)U^{\prime}(x_{i+1},\lambda _{1})\right]= \frac{1}{2}\left[U(x_{i+1},\lambda _{1})-U(x_{i-1},\lambda _{1})\right] \end{aligned}$$
(23)

Similarly, Eqs. (24)–(26) can be derived, where \(U^{\prime\prime\prime} (x_{i+},\lambda _{1})\) and \(U^{\prime\prime} (x_{i-},\lambda _{1})\) represent \(U^{\prime\prime\prime} (x_{i},\lambda _{1})\) in \((x_{i},x_{i+1})\) and \((x_{i-1},x_{i})\), respectively.

$$\begin{aligned} h^{2}U^{\prime\prime} (x_{i},\lambda _{1})= 6[U(x_{i+1},\lambda _{1})-U(x_{i},\lambda _{1})]-2h\left[\left(\frac{8+\lambda _{1}}{4}\right)U^{\prime}(x_{i},\lambda _{1})+\left(\frac{4-\lambda _{1}}{4}\right)U^{\prime}\left(x_{i+1},\lambda _{1}\right)\right] \end{aligned}$$
(24)
$$\begin{aligned} h^{3}U^{\prime\prime\prime} (x_{i+},\lambda _{1})= & {} 12[U(x_{i},\lambda _{1})-U(x_{i+1},\lambda _{1})]+6h[U^{\prime}(x_{i},\lambda _{1})+(U^{\prime}(x_{i+1},\lambda _{1})] \end{aligned}$$
(25)
$$\begin{aligned} h^{3}U^{\prime\prime\prime} (x_{i-},\lambda _{1})= & {} 12[U(x_{i-1},\lambda _{1})-U(x_{i},\lambda _{1})]+6h[U^{\prime}(x_{i-1},\lambda _{1})+U^{\prime}(x_{i},\lambda _{1})] \end{aligned}$$
(26)

By using the operator notation \(E(U(x_{i}))=U(x_{i+1})\), Eq. (23) can be written as Sastry (2012)

$$\begin{aligned} h\left[\left(\frac{4-\lambda _{1}}{24}\right)E^{-1}+\left(\frac{8+\lambda _{1}}{12}\right)+\left(\frac{4-\lambda _{1}}{24}\right)E\right]U^{\prime}(x_{i},\lambda _{1})= \frac{1}{2}(E-E^{-1})u(x_{i}). \end{aligned}$$

By expanding \(E= e^{hD}\) in powers of hD, we get

$$\begin{aligned} h\left[\left(\frac{8+\lambda _{1}}{12}\right)+\left(\frac{4-\lambda _{1}}{12}\right)\left(1+\frac{h^{2}D^{2}}{2!}+\frac{h^{4}D^{4}}{4!}+\ldots\right)\right]U^{\prime}(x_{i},\lambda _{1})=\left (hD+\frac{h^{3}D^{3}}{3!}+\frac{h^{5}D^{5}}{5!}+\ldots\right)u(x_{i}) \end{aligned}$$

Upon simplification, we have

$$\begin{aligned} U^{\prime}\left(x_{i},\lambda _{1}\right) & = \left(D+\frac{h^{2}D^{3}} {3!}+\frac{h^{4}D^{5}}{5!}+\ldots\right) \left[1+\left(\frac{4-\lambda _{1}} {12}\right)\left(\frac{h^{2}D^{2}}{2!}+\frac{h^{4}D^{4}}{4!}+\frac{h^{6}D^{6}}{6!}\right)\right]^{-1}u(x_{i})\\ & = \left(D+\frac{h^{2}D^{3}}{3!}+\ldots\right)\left[1-\left(\frac{4-\lambda _{1}}{12}\right) \left(\frac{h^{2}D^{2}}{2!}+\ldots\right)+\left(\frac{4-\lambda _{1}}{12}\right)^{2}\left(\frac{h^{2}D^{2}}{2!}+\ldots\right)^{2}\right] u(x_{i}) \\ & = \left(D+\frac{h^{2}D^{3}}{3!}+\ldots\right)\left[1-\left(\frac{4-\lambda _{1}}{24}\right)h^{2}D^{2}-\left(\frac{4-\lambda _{1}}{288}\right)h^{4}D^{4}-\ldots+\left(\frac{(4-\lambda _{1})^{2}}{576}\right)h^{4}D^{4}+\ldots\right]u(x_{i})\\ & = \left(D+\frac{h^{2}D^{3}}{3!}+\frac{h^{4}D^{5}}{5!}+\ldots\right)\left[1-\left(\frac{4-\lambda _{1}}{24}\right)h^{2}D^{2}+\left(\frac{\lambda _{1}^{2}-6\lambda _{1}+8}{576}\right)h^{4}D^{4}+\ldots \right]u(x_{i})\\ &= \left[D-\left(\frac{4-\lambda _{1}}{24}\right)h^{2}D^{3}+\left(\frac{\lambda _{1}^{2}-6\lambda _{1}+8}{576}\right)h^{4}D^{5}+\ldots+\frac{1}{6}h^{2}D^{3}-\left(\frac{4-\lambda _{1}}{144}\right)h^{4}D^{5}+\ldots \right]u(x_{i})\\ & = \left[D+\left(\frac{\lambda _{1}}{24}\right)h^{2}D^{3}+\left(\frac{5\lambda _{1}^{2}-10\lambda _{1}-16}{2280}\right)h^{4}D^{5}+\ldots \right]u(x_{i}). \end{aligned}$$

Therefore,

$$\begin{aligned} U^{\prime}(x_{i},\lambda _{1})=u^{\prime}(x_{i})+\left(\frac{\lambda _{1}}{24})h^{2}u^{\prime\prime\prime}(x_{i}\right)+\left(\frac{5\lambda _{1}^{2}-10\lambda _{1}-16}{2280}\right)h^{4}u^{(5)}(x_{i})+O(h^{6}). \end{aligned}$$
(27)

Similar approach is applied on Eqs. (24)–(26) that results in relations (28)–(30).

$$\begin{aligned} U^{\prime\prime}(x_{i},\lambda _{1})= \left(1+\frac{\lambda _{1}}{2}\right)u^{\prime\prime}(x_{i})+\left(\frac{\lambda _{1}^{2}-4}{48}\right)h^{2}u^{(4)}(x_{i})+ O(h^{4}) \end{aligned}$$
(28)
$$\begin{aligned} U^{\prime\prime\prime}(x_{i},\lambda _{1})= \left(1+\frac{\lambda _{1}}{2}\right)u^{\prime\prime\prime}(x_{i})+\left(\frac{\lambda _{1}^{2}+4\lambda _{1}+4}{48}\right)h^{2}u^{(5)}(x_{i})+ O(h^{4}) \end{aligned}$$
(29)
$$\begin{aligned} U^{(4)}(x_{i},\lambda _{1})= \left (1+\frac{\lambda _{1}}{2}\right)u^{(4)}(x_{i})+\left(\frac{\lambda _{1}^{2}+2\lambda _{1}}{48}\right)h^{2}u^{(6)}(x_{i})+ O(h^{4}) \end{aligned}$$
(30)

By using \(e_{1}(x)=U(x,\lambda _{1})-u(x)\) and substituting relations (27)–(30) in the Taylor series expansion of \(e_{1}(x_{i}+\theta h)\), we obtain

$$\begin{aligned} e_1(x_{i}+\theta h)=\left(\frac{\theta ^{2} \lambda _{1}}{24}\right)h^{2}u^{\prime\prime}(x_{i})+\left(\frac{1+2 \theta ^{2}}{24}\right)\theta \lambda _{1} h^{3}u^{\prime\prime\prime}(x_{i})+ \left(\frac{\lambda _{1}^{2}+2\theta ^{2}\lambda _{1}-4}{96}\right)\theta ^{2}h^{4}u^{(4)}(x_{i})+ O(h^{5}). \end{aligned}$$

Similarly, we can use the definition \(e_{2}(x)=V(x,\lambda _{2})-v(x)\) to have

$$\begin{aligned} e_{2}(x_{i}+\theta h)=\left(\frac{\theta ^{2} \lambda _{2}}{24}\right)h^{2}v^{\prime\prime}(x_{i})+\left(\frac{1+2 \theta ^{2}}{24}\right)\theta \lambda _{2} h^{3}v^{\prime\prime\prime}(x_{i})+ \left(\frac{\lambda _{2}^{2}+2\theta ^{2}\lambda _{2}-4}{96}\right)\theta ^{2}h^{4}v^{(4)}(x_{i})+ O(h^{5}). \end{aligned}$$

Therefore, the extended cubic B-spline has a truncation error of order \(h^{2}\). Apparently, the value of \(\lambda _{1}\) and \(\lambda _{2}\) have influences on the order.

Results and discussions

Several examples are discussed to demonstrate the efficiency of the proposed method. The results are compared with that of variational iteration, analytical approximation, sinc-collocation, reproducing kernel, He’s homotopy perturbation, Laplace homotopy analysis, and B-spline methods (Lu 2007; Geng and Cui 2007; Dehghan and Saadatmandi 2007; Saadatmandi et al. 2009; Ogunlaran and Ademola 2015; Caglar and Caglar 2009). The results are also presented with different values of n. Calculations were carried out using Wolfram Mathematica 10 with Intel(R) Core(TM) i5 CPU 3GHz processor, 4.00 GB RAM. The optimization can only be done for \(n\le 5\) due to the computational limit of the computer. Numerical errors are calculated using infinite and two norms, as respectively follows:

$$\begin{aligned} L_{\infty }= \max _{i}\mid u(x_{i})-U(x_{i}) \mid \quad {\mathrm{{or}}} \; L_{\infty }=\max _{i}\mid v(x_{i})-V(x_{i}) \mid \\ L_{2}= \sqrt{ \sum _{i=1}^{n}(u(x_{i})-U(x_{i}))^{2}} \quad {\mathrm{or}} \; L_{2}=\sqrt{ \sum _{i=1}^{n}(v(x_{i})-V(x_{i}))^{2}} \end{aligned}$$

Example 1

Consider the following system Lu (2007),

$$\begin{aligned} {\left\{ \begin{array}{ll} u^{\prime\prime}(x)+(2x-1)u^{\prime}(x)+\cos (\pi x)v^{\prime}(x)=f_{1}(x)\\ v^{\prime\prime}(x)+xu(x)=f_{2}(x)\\ u(0)=u(1)=0, v(0)=v(1)=0, \end{array}\right. } \end{aligned}$$
(31)

where \(0<x <1\), \(f_{1}(x)=-\pi ^{2} \sin (\pi x)+(2x-1) \pi \cos (\pi x) + (2x-1) \cos (\pi x)\), and \(f_{2}(x)=2+x \sin (\pi x)\). The exact solutions are \(u(x)=\sin (\pi x)\) and \(v(x)=x^{2}-x\).

Table 2 displays the values of \(\lambda _{1}\) and \(\lambda _{2}\) when \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) are minimized for \(n=5\). The \(L_{\infty }\) and \(L_{2}\) for each pair are also presented. From the table, it can be deduced that minimizing \(d_{3}(\lambda _{1},\lambda _{2})\) is the best option because the results are comparable and the computational time is significantly less than that of \(d_{1}(\lambda _{1},\lambda _{2})\) and \(d_{2}(\lambda _{1},\lambda _{2})\). Therefore, the chosen values of \(\lambda _{1}\) and \(\lambda _{2}\) are −6.639145E−02 and \(1.161882E{-}06\), respectively. Also, it can be observed that minimizing \(d_{2}(\lambda _{1},\lambda _{2})\) gives similar results with minimizing \(d_{1}(\lambda _{1},\lambda _{2})\) with significantly less computational time.

The approximate and exact solutions at the nodal points are displayed in Table 3. From the table, the approximate solutions agree with the exact solutions. Hence, for this example, the results are acceptable and accurate. The plots of the numerical results are shown in Figs. 2 and 3. Comparisons between the \(L_{\infty }\) of ECBM, He’s homotopy perturbation method (Saadatmandi et al. 2009), and Laplace homotopy analysis method (Ogunlaran and Ademola 2015) were made in Table 4. ECBM produced more accurate results than both methods except for the results of u(x) generated by the Laplace homotopy analysis method (Ogunlaran and Ademola 2015). Moreover, the numerical results for Example 1 when \(\lambda _{1}=-1.0E{-}03\), \(\lambda _{2}=0\), and \(n=41\) are shown in Tables 5 and 6. In this case, the values of \(\lambda _{1}\) and \(\lambda _{2}\) were obtained by trial and error. From the table, the ECBM produced more accurate results than variational iteration method (VIM) and cubic B-spline method (CBM). The norms for both n are shown in Table 7. It can be observed that ECBM improves the accuracy of CBM significantly.

Table 2 Computational time and norms for different optimization equations \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) with \(n=5\)
Table 3 Comparison of ECBM results with the exact solution for Example 1 when \(\lambda _{1}=-6.639145E{-}02\), \(\lambda _{2}=1.161882E{-}06\), and \(n=5\)
Fig. 2
figure2

Numerical solution U(x) and exact solution u(x) for Example 1 with \(\lambda _{1}=-6.639145E\)-02, \(\lambda _{2}=1.161882E\)-06, and \(n=5\)

Fig. 3
figure3

Numerical solution V(x) and exact solution v(x) for Example 1 with \(\lambda _{1}=-6.639145E{-}02\), \(\lambda _{2}=1.161882E{-}06\), and \(n=5\)

Table 4 \(L_{\infty }\) of He’s homotopy perturbation method Saadatmandi et al. (2009), Laplace homotopy analysis method Ogunlaran and Ademola (2015), and ECBM for Example 1 when \(n=5\)
Table 5 Absolute errors of VIM Lu (2007), CBM Caglar and Caglar (2009), and ECBM results for Example 1 with \(n=41\) for u(x)
Table 6 Absolute errors of CBM Caglar and Caglar (2009) and ECBM results for Example 1 with \(n=41\) for v(x)
Table 7 \(L_{\infty }\) and \(L_{2}\) of ECBM results for Example 1

Example 2

Consider the following equations Khuri and Sayfy (2009),

$$\begin{aligned} {\left\{ \begin{array}{l} u^{\prime\prime}(x)+u^{\prime}(x)+xu(x)+v^{\prime}(x)+2xv(x)=f_{1}(x)\\ v^{\prime\prime}(x)+v(x)+2u^{\prime}(x)+x^{2}u(x)=f_{2}(x)\\ u(0)=u(1)=0, v(0)=v(1)=0\\ \end{array}\right. } \end{aligned}$$
(32)

where \(0 \le x \le 1\), \(f_{1}(x)=-2(x+1) \cos (x)+\pi \cos (\pi x) + 2x \sin (\pi x)+(4x-2x^{2}-4) \sin (x)\), and \(f_{2}(x)=-4(x-1)\cos (x)-2(2-x^{2}+x^{3})\sin (x)-( \pi ^{2}-1) \sin (\pi x)\). The exact solutions are \(u(x)=2(1-x)\sin (x)\), and \(v(x)=\sin ( \pi x)\).

Table 8 displays the values of \(\lambda _{1}\) and \(\lambda _{2}\) when \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) are minimized for \(n=5\), with their respective \(L_{\infty }\) and \(L_{2}\). Again, minimizing \(d_{3}(\lambda _{1},\lambda _{2})\) is the best option because the results are comparable and the computational time is significantly less than that of \(d_{1}(\lambda _{1},\lambda _{2})\) and \(d_{2}(\lambda _{1},\lambda _{2})\). Therefore, the chosen values of \(\lambda _{1}\) and \(\lambda _{2}\) are −1.269208E−02 and \(-6.634523E{-}02\), respectively. For this example, minimizing \(d_{2}(\lambda _{1},\lambda _{2})\) gives similar results with minimizing \(d_{1}(\lambda _{1},\lambda _{2})\) with almost similar computational time.

The approximate and exact solutions at the nodal points are displayed in Table 9. Again, from the table, the approximate solutions agree with the exact solutions. The plots of the numerical results are shown in Figs. 4 and 5. The numerical results for \(\lambda _{1}=\lambda _{2}=-1.0E{-}03\) and \(n=25\) are shown in Tables 10 and 11 and compared with reproducing kernel and sinc methods (Geng and Cui 2007; Dehghan and Saadatmandi 2007). The values of \(\lambda _{1}\) and \(\lambda _{2}\) were obtained by trial and error. It can be seen that ECBM produced results with significantly higher accuracy than the other two. The infinite and two norms are shown in Table 12. For this example, ECBM improves the accuracy of CBM for u(x) and gives out similar results for v(x).

Table 8 Computational time and norms for different optimization equations \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) with \(n=5\)
Table 9 Comparison of ECBM results with the exact solution for Example 2 when \(\lambda _{1}=-0.012692\), \(\lambda _{2}=-0.066345\), and \(n=5\)
Fig. 4
figure4

Numerical solution U(x) and exact solution u(x) for Example 2 with \(\lambda _{1}=-0.012692\), \(\lambda _{2}=-0.066345\), and \(n=5\)

Fig. 5
figure5

Numerical solution V(x) and exact solution v(x) for Example 2 with \(\lambda _{1}=-0.012692\), \(\lambda _{2}=-0.066345\), and \(n=5\)

Table 10 Maximum errors of reproducing kernel Geng and Cui (2007), Sinc method Dehghan and Saadatmandi (2007), and ECBM results for Example 2 with \(n=25\) for u(x)
Table 11 Maximum errors of reproducing kernel Geng and Cui (2007), Sinc method Dehghan and Saadatmandi (2007), and ECBM results for Example 2 with \(n=25\) for v(x)
Table 12 \(L_{\infty }\) and \(L_{2}\) of ECBM results for Example 2

Example 3

Finally, we consider the system Caglar and Caglar (2009),

$$\begin{aligned} {\left\{ \begin{array}{ll} u^{\prime\prime}(x)+xu(x)+xv(x)=2\\ v^{\prime\prime}(x)+2xv(x)+2xu(x)=-2\\ u(0)=u(1)=0, v(0)=v(1)=0\\ \end{array}\right. } \end{aligned}$$
(33)

where \(0<x <1\). The exact solutions are \(u(x)=x^{2}-x\) and \(v(x)=x-x^{2}\).

Table 13 displays the values of \(\lambda _{1}\) and \(\lambda _{2}\) when \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) are minimized for \(n=5\) together with the values of \(L_{\infty }\) and \(L_{2}\). Minimizing \(d_{3}(\lambda _{1},\lambda _{2})\) is the best option because the computational time is significantly less than that of \(d_{1}(\lambda _{1},\lambda _{2})\) and \(d_{2}(\lambda _{1},\lambda _{2})\). However, the minimizing values of \(\lambda _{1}\) and \(\lambda _{2}\) are equivalent to CBM. It can also be observed that minimizing \(d_{2}(\lambda _{1},\lambda _{2})\) gives similar results with minimizing \(d_{1}(\lambda _{1},\lambda _{2})\) with a little less computational time.

The approximate and exact solutions at the nodal points are displayed in Table 14. The plots of the numerical results are shown in Figs. 6 and 7. The numerical results for \(n=21\) and \(\lambda _{1}=\lambda _{2}=1.25E{-}14\) are shown in Table 15 and compared with CBM Caglar and Caglar (2009). The values of \(\lambda _{1}\) and \(\lambda _{2}\) were obtained by trial and error. It can be seen that ECBM produced slightly more accurate results than CBM. The infinite and two norms are shown in Table 16.

Table 13 Computational time and norms for different optimization equations \(d_{1}(\lambda _{1},\lambda _{2})\), \(d_{2}(\lambda _{1},\lambda _{2})\), and \(d_{3}(\lambda _{1},\lambda _{2})\) with \(n=5\)
Table 14 Comparison of ECBM results with the exact solution for Example 3 when \(\lambda _{1}=0.000000\), \(\lambda _{2}=0.000000\), and \(n=5\)
Fig. 6
figure6

Numerical solution U(x) and exact solution u(x) for Example 3 with \(\lambda _{1}=0.000000\), \(\lambda _{2}=0.000000\), and \(n=5\)

Fig. 7
figure7

Numerical solution V(x) and exact solution v(x) for Example 3 with \(\lambda _{1}=0.000000\), \(\lambda _{2}=0.000000\), and \(n=5\)

Table 15 Comparison of norms of CBM and ECBM for Example 3 when \(n=21\) for u(x) and v(x)
Table 16 \(L_{\infty }\) and \(L_{2}\) of ECBM results for Example 3

Conclusions

In this research, a new method for finding approximate solutions for a system of second order boundary value problems based on extended cubic B-spline was proposed. This method is called extended cubic B-spline method. The error estimation was carried out and the truncation error was found to be of order \(h^2\), whereby the values of the free parameters \(\lambda _{1}\) and \(\lambda _{2}\) have influence on the order. This method improved the accuracy of its predecessor, CBM, and produced more accurate results than some other numerical methods. It is also found that minimizing the one-norm term, \(d_3(\lambda _1,\lambda _2)\) is sufficient to obtain the optimized values of \(\lambda _1\) and \(\lambda _2\). More work can be done in the optimizing technique to improve the computational time.

References

  1. Arqub OA, Abo-Hammour Z (2014) Numerical solution of systems of second-order boundary value problems using continuous genetic algorithm. Inf Sci 279:396–415

  2. Bataineh AS, Noorani MSM, Hashim I (2009) Modified homotopy analysis method for solving systems of second-order BVPs. Commun Nonlinear Sci Numer Simul 14(2):430–442

  3. Caglar N, Caglar H (2009) B-spline method for solving linear system of second-order boundary value problems. Comput Math Appl 57(5):757–762

  4. Chen S, Hu J, Chen L, Wang C (2005) Existence results for n-point boundary value problem of second order ordinary differential equations. J Comput Appl Math 180(2):425–432

  5. Cheng X, Zhong C (2005) Existence of positive solutions for a second-order ordinary differential system. J Math Anal Appl 312(1):14–23

  6. Dehghan M, Saadatmandi A (2007) The numerical solution of a nonlinear system of second-order boundary value problems using the sinc-collocation method. Math Comput Model 46(11):1434–1441

  7. Dehghan M, Lakestani M (2008) Numerical solution of nonlinear system of second-order boundary value problems using cubic B-spline scaling functions. Int J Comput Math 85(9):1455–1461

  8. Dehghan M, Nikpour A (2013) Numerical solution of the system of second-order boundary value problems using the local radial basis functions based differential quadrature collocation method. Appl Math Model 37(18):8578–8599

  9. El-Gamel M (2012) Sinc-collocation method for solving linear and nonlinear system of second-order boundary value problems. Appl Math 3(11):1627

  10. Gang X, Guo-Zhao W (2008) Extended cubic uniform B-spline and \(\alpha\)-B-spline. Acta Autom Sin 34(8):980–984

  11. Geng F, Cui M (2007) Solving a nonlinear system of second order boundary value problems. J Math Anal Appl 327(2):1167–1181

  12. Geng F, Cui M (2011) Homotopy perturbation-reproducing kernel method for nonlinear systems of second order boundary value problems. J Comput Appl Math 235(8):2405–2411

  13. Goh J, Majid AA, Ismail AIM (2011) Extended cubic uniform B-spline for a class of singular boundary value problems. Sci Asia 37(1):79–82

  14. Hamid NNA (2010) Splines for linear two-point boundary value problems. MSc thesis, Universiti Sains Malaysia

  15. Hamid NNA, Majid AA, Ismail AIM (2011) Extended cubic B-spline method for linear two-point boundary value problems. Sains Malays 40(11):1285–1290

  16. Han XL, Liu SJ (2003) An extension of the cubic uniform B-spline curves. J Comput Aided Des Comput Graph 15(5):576–578

  17. Kadalbajoo MK, Kumar V (2007) B-spline method for a class of singular two-point boundary value problems using optimal grid. Appl Math Comput 188(2):1856–1869

  18. Khuri SA, Sayfy A (2009) Spline collocation approach for the numerical solution of a generalized system of second-order boundary-value problems. Appl Math Sci 3(45):2227–2239

  19. Lu J (2007) Variational iteration method for solving a nonlinear system of second-order boundary value problems. Comput Math Appl 54(7):1133–1138

  20. Ogunlaran OM, Ademola AT (2015) On the Laplace homotopy analysis method for a nonlinear system of second-order boundary value problems. Gen 26(2):11–22

  21. Saadatmandi A, Dehghan M, Eftekhari A (2009) Application of He’s homotopy perturbation method for non-linear system of second-order boundary value problems. Nonlinear Anal Real World Appl 10(3):1912–1922

  22. Sastry SS (2012) Introductory methods of numerical analysis. PHI Learning Pvt, Ltd

  23. Thompson HB, Tisdell C (2002) Boundary value problems for systems of difference equations associated with systems of second-order ordinary differential equations. Appl Math Lett 15(6):761–766

Download references

Authors' contributions

ASH suggested the method and the problem and wrote the first version of the paper and carried out the works to generate results using Mathematica. NNAH checked the paper and the Mathematica program, gave constructive comments and suggestions to ASH to improve the quality of the paper. AIMI did the final checking and reviewing. All authors read and approved the final manuscript.

Acknowlegements

We thank Dr. Abedel-Karrem Alomari and Maher Hailat for their help in this study. Also the authors would like to thank the Editor-in-Chief and the reviewers for their valuable suggestions to improve this work.

Competing interests

The authors declare that they have no competing interests.

Author information

Correspondence to Ahmed Salem Heilat.

Rights and permissions

Open Access This 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.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Heilat, A.S., Hamid, N.N.A. & Ismail, A.I.M. Extended cubic B-spline method for solving a linear system of second-order boundary value problems. SpringerPlus 5, 1314 (2016) doi:10.1186/s40064-016-2936-4

Download citation

Keywords

  • Boundary value problem
  • System
  • Linear
  • Extended cubic B-spline