Skip to main content

Mid-knot cubic non-polynomial spline for a system of second-order boundary value problems

Abstract

In this paper, a mid-knot cubic non-polynomial spline is applied to obtain the numerical solution of a system of second-order boundary value problems. The numerical method is proved to be uniquely solvable and it is of second-order accuracy. We further include three examples to illustrate the accuracy of our method and to compare with other methods in the literature.

1 Introduction

We consider a system of second-order boundary value problems of the type

$$ \begin{aligned} &y''(x)= \textstyle\begin{cases} f(x), &a \leq x \leq c,\\ g(x)y(x)+f(x)+r,&c \leq x \leq d,\\ f(x), &d \leq x \leq b, \end{cases}\displaystyle \\ &y(a)=\bar{a}, \qquad y(b)=\bar{b}, \end{aligned} $$
(1.1)

with continuity conditions of y and \(y'\) at c and d. Here, f and g are continuous functions on \([a,b]\) and \([c,d]\), respectively, r, ā and are real finite constants. This type of systems arise in the study of obstacle, unilateral, moving and free boundary value problems [7, 9, 10, 16, 23]. For instance, in modeling an elastic string lying over an elastic obstacle, it has been first shown in [19] that a variational inequality can be transformed to Eq. (1.1) by using the penalty function technique of Lewy and Stampacchia [17].

There are substantial interests on the numerical treatment of the problem (1.1). Noor and Khalifa [19] have used a collocation method with cubic B-splines as basis functions to solve (1.1), while the well-known Numerov method and finite difference schemes based on the central difference have been employed in [22]. Thereafter, Al-Said et al. [5] show that cubic spline method gives numerical solutions that are more accurate than that computed by quintic spline and finite difference techniques. The numerical results of [5, 19, 22] indicate first-order accuracy for these methods. In [4], a two-stage method is developed where a finite difference scheme is first employed to obtain the numerical solutions at mid-knots of a uniform mesh, then a second-order interpolation is used to obtain the numerical solutions at the knots. This method is of second-order accuracy. Other proven second-order accurate methods include polynomial spline methods that employ quadratic spline [1], cubic spline [2, 3] and quintic spline [6]. The numerical solutions are obtained at mid-knots of a uniform mesh in [13], while numerical solutions are obtained at the knots in [6]. These polynomial spline methods use ‘continuous’ spline, and derivatives of the spline are involved in the spline relations. On the other hand, discrete spline uses differences instead of derivatives in the spline relations. In [8], Chen and Wong have developed a deficient discrete cubic spline method for (1.1). It is proved that the accuracy of the method is two, and the numerical experiments demonstrate better accuracy over polynomial spline methods.

Besides continuous polynomial splines, non-polynomial splines have also been applied to solve (1.1). Non-polynomial spline, also known as parametric spline [13], depends on a parameter \(k>0\), and reduces to the ordinary cubic or quintic spline when \(k\to0\). Due to the parameter k, the numerical solutions obtained by non-polynomial splines in the literature are observed to be more accurate than that computed by polynomial splines. In fact, a cubic non-polynomial spline method has been proposed by Khan and Aziz [12] and subsequently by Siraj-ul-Islam and Tirmizi [25] to solve (1.1) at the knots of a uniform mesh. The method is shown to be of order two, and numerical results indicate better accuracy over polynomial spline methods. Higher degree non-polynomial splines have also been used in higher-order boundary value problems, for example quartic non-polynomial spline for third-order boundary value problem [24, 26], quintic non-polynomial spline for fourth-order boundary value problem [14] and sextic non-polynomial spline for fifth-order boundary value problem [15]. Out of all these work, only [26] gives the numerical solutions of the third-order boundary value problem at mid-knots of a uniform mesh while the rest obtains the numerical solutions at the knots. The methods mentioned so far yield discrete numerical schemes. There are also iterative methods such as Adomian decomposition method [18] and variational iteration method [20]. Both of these methods do not require discretization.

Motivated by the above work especially those involving the use of non-polynomial splines, in this paper we shall develop a cubic non-polynomial spline scheme at mid-knots of a uniform mesh for the problem (1.1). The unique solvability and convergence analysis will be carried out which indicates a second-order accurate method. Finally, three examples will be presented to illustrate the numerical efficiency and the better performance over other methods in the literature.

2 Mid-knot cubic non-polynomial spline method

Let \(\Omega:a=x_{0}< x_{1}<\cdots<x_{n}=b \) be a uniform mesh of \([a,b]\) with \(x_{i}=a+ih\), \(0\leq i\leq n\), where \(h=\frac{b-a}{n}\) is the step size. Without loss of generality, let

$$c=\frac{3a+b}{4}=x_{n/4}\quad\mbox{and} \quad d= \frac{a+3b}{4}=x_{3n/4}, $$

and we require the positive integer n, \(n\geq12\), to be divisible by 4. Thus, the points c and d are in Ω.

Define the mid-knots of the mesh Ω as

$$ x_{i-1/2}=a+ \biggl(i-\frac{1}{2} \biggr)h, \quad1 \leq i \leq n. $$
(2.1)

Note that the breakup points c and d are not any of the mid-knots defined above, in fact \(c\in[x_{n/4-1/2}, x_{n/4+1/2}]\) and \(d\in[x_{3n/4-1/2}, x_{3n/4+1/2}]\).

Throughout the paper, for any function \(v(x)\) we shall denote \(v^{(j)}(x_{i})=v^{(j)}_{i}\) and likewise \(v^{(j)}(x_{i-1/2})=v^{(j)}_{i-1/2}\). In the following, we define the cubic non-polynomial spline in terms of mid-knots of the mesh Ω. Note that [13] gives a similar definition but in terms of the knots of Ω.

Definition 2.1

For a given mesh Ω, we say \(P(x)\) is the cubic non-polynomial spline with parameter k (>0) if \(P(x)\in C^{(2)}[a,b]\), \(P(x)\) has the form \(\operatorname{span}\{1,x, \sin kx,\cos kx\}\), and its restriction \(P_{i}(x)\) on \([x_{i-1/2},x_{i+1/2}]\), \(1\leq i \leq n-1\) satisfies

$$ \textstyle\begin{cases} P_{i}(x_{i-1/2})=S_{i-1/2},\qquad P_{i}(x_{i+1/2})=S_{i+1/2},\\ P''_{i}(x_{i-1/2})=D_{i-1/2},\qquad P''_{i}(x_{i+1/2})=D_{i+1/2}. \end{cases} $$
(2.2)

From the above definition, for \(x\in[x_{i-1/2}, x_{i+1/2}]\), \(1\leq i \leq n-1\), we can express \(P_{i}(x)\) as

$$ P_{i}(x)=a_{i}\sin k(x-x_{i-1/2})+b_{i} \cos k(x-x_{i-1/2})+c_{i}(x-x_{i-1/2})+d_{i}. $$
(2.3)

Using (2.2), a direct computation gives

$$\begin{aligned} P_{i}(x) =& \frac{-D_{i+1/2}+D_{i-1/2}\cos kh}{k^{2}\sin kh}\sin k(x-x_{i-1/2})- \frac{D_{i-1/2}}{k^{2}}\cos k(x-x_{i-1/2}) \\ &{} + \biggl(\frac{S_{i+1/2}-S_{i-1/2}}{h}+\frac {D_{i+1/2}-D_{i-1/2}}{k^{2}h} \biggr) (x-x_{i-1/2})+S_{i-1/2}+ \frac {D_{i-1/2}}{k^{2}}. \end{aligned}$$
(2.4)

Then, using the continuity of the first derivative of the spline, namely, \(P'_{i-1}(x_{i-1/2})=P'_{i}(x_{i-1/2})\), \(2\leq i \leq n-1\), we obtain from (2.4)

$$ S_{i-3/2}-2S_{i-1/2}+S_{i+1/2}=h^{2} (\alpha D_{i-3/2}+2\beta D_{i-1/2}+\alpha D_{i+1/2} ),\quad2 \leq i \leq n-1, $$
(2.5)

where

$$ \alpha=\frac{1}{kh\sin kh}-\frac{1}{k^{2}h^{2}}, \qquad \beta= \frac{1}{k^{2}h^{2}}-\frac{\cos kh}{kh \sin kh}. $$
(2.6)

Remark 2.1

When \(k\to0\), we have \((\alpha,\beta)\to (\frac{1}{6},\frac{1}{3} )\) and the cubic non-polynomial spline relation of Eq. (2.5) reduces to the well-known cubic spline relation. Further, for the consistency of relation (2.5), we have \(2\alpha+2\beta=1\) [13].

We shall approximate a solution \(y(x)\) of (1.1) by the non-polynomial spline \(P_{i}(x)\) over the subinterval \([x_{i-1/2}, x_{i+1/2}]\), \(1\leq i \leq n-1\). Hence, it follows from (2.5) that

$$ y_{i-3/2}-2y_{i-1/2}+y_{i+1/2}=h^{2} \bigl(\alpha y''_{i-3/2}+2\beta y''_{i-1/2}+\alpha y''_{i+1/2} \bigr)+t_{i},\quad2\leq i \leq n-1, $$
(2.7)

where \(t_{i}\) is the truncation error. By Taylor expansion, the truncation error is found to be

$$\begin{aligned} t_{i} =& h^{2}(1-2\alpha-2 \beta)y''_{i-1/2}+h^{4} \biggl( \frac {1}{12}-\alpha \biggr)y^{(4)}_{i-1/2}+h^{6} \biggl(\frac{1}{360}-\frac {\alpha}{12} \biggr)y^{(6)}_{i-1/2} \\ &{} + O\bigl(h^{7}\bigr),\quad2\leq i\leq n-1. \end{aligned}$$
(2.8)

Remark 2.2

Due to the consistency relation \(2\alpha+2\beta=1\), (2.8) immediately gives \(t_{i}=O(h^{4}),~2\leq i\leq n-1\). If, in addition, \(\alpha=\frac{1}{12}\) (which implies \(\beta=\frac{5}{12}\)), then (2.8) yields \(t_{i}=O(h^{6}),~2\leq i\leq n-1\).

Next, since we approximate a solution \(y(x)\) of (1.1) by the non-polynomial spline \(P(x)\), it is natural to set the second derivative of the spline as

$$ D_{i-1/2}= \textstyle\begin{cases} f_{i-1/2}, & 1\leq i\leq\frac{n}{4},\\ g_{i-1/2}S_{i-1/2}+f_{i-1/2}+r, & \frac{n}{4}+1 \leq i \leq\frac{3n}{4},\\ f_{i-1/2}, & \frac{3n}{4}+1 \leq i \leq n. \end{cases} $$
(2.9)

Note that in (2.9), by considering the second derivative at mid-knots, we avoid the breakup points c and d at which \(y''\) is discontinuous.

Substituting (2.9) into (2.5) yields the following equations:

  • for \(2\leq i \leq\frac{n}{4}-1\),

    $$ S_{i-3/2}-2S_{i-1/2}+S_{i+1/2}=h^{2} (\alpha f_{i-3/2}+2\beta f_{i-1/2}+\alpha f_{i+1/2} ); $$
    (2.10)
  • for \(i=\frac{n}{4}\),

    $$\begin{aligned} &S_{n/4-3/2}-2S_{n/4-1/2}+ \bigl(1-\alpha h^{2} g_{n/4+1/2} \bigr)S_{n/4+1/2} \\ &\quad =h^{2} \bigl[\alpha f_{n/4-3/2}+2\beta f_{n/4-1/2}+ \alpha (f_{n/4+1/2}+r ) \bigr]; \end{aligned}$$
    (2.11)
  • for \(i=\frac{n}{4}+1\),

    $$\begin{aligned} &S_{n/4-1/2}+ \bigl(-2-2\beta h^{2}g_{n/4+1/2} \bigr)S_{n/4+1/2}+ \bigl(1-\alpha h^{2}g_{n/4+3/2} \bigr)S_{n/4+3/2} \\ &\quad =h^{2} \bigl[\alpha f_{n/4-1/2}+2\beta (f_{n/4+1/2}+r )+\alpha (f_{n/4+3/2}+r ) \bigr]; \end{aligned}$$
    (2.12)
  • for \(\frac{n}{4}+2\leq i \leq\frac{3n}{4}-1\),

    $$\begin{aligned} & \bigl(1-\alpha h^{2}g_{i-3/2} \bigr)S_{i-3/2}+ \bigl(-2-2\beta h^{2}g_{i-1/2} \bigr)S_{i-1/2}+ \bigl(1-\alpha h^{2}g_{i+1/2} \bigr)S_{i+1/2} \\ &\quad =h^{2} \bigl[\alpha (f_{i-3/2}+r )+2\beta (f_{i-1/2}+r )+\alpha (f_{i+1/2}+r ) \bigr]; \end{aligned}$$
    (2.13)
  • for \(i=\frac{3n}{4}\),

    $$\begin{aligned} & \bigl(1-\alpha h^{2}g_{3n/4-3/2} \bigr)S_{3n/4-3/2}+ \bigl(-2-2\beta h^{2}g_{3n/4-1/2} \bigr)S_{3n/4-1/2}+S_{3n/4+1/2} \\ &\quad =h^{2} \bigl[\alpha (f_{3n/4-3/2}+r )+2\beta (f_{3n/4-1/2}+r )+\alpha f_{3n/4+1/2} \bigr]; \end{aligned}$$
    (2.14)
  • for \(i=\frac{3n}{4}+1\),

    $$\begin{aligned} & \bigl(1-\alpha h^{2}g_{3n/4-1/2} \bigr)S_{3n/4-1/2}-2S_{3n/4+1/2}+S_{3n/4+3/2} \\ &\quad =h^{2} \bigl[\alpha (f_{3n/4-1/2}+r )+2\beta f_{3n/4+1/2}+\alpha f_{3n/4+3/2} \bigr]; \end{aligned}$$
    (2.15)
  • for \(\frac{3n}{4}+2\leq i \leq n-1\),

    $$ S_{i-3/2}-2S_{i-1/2}+S_{i+1/2}=h^{2} (\alpha f_{i-3/2}+2\beta f_{i-1/2}+\alpha f_{i+1/2} ). $$
    (2.16)

To set up a system of n equations for the unknown \(S_{i-1/2}\), \(1\leq i\leq n\), we need two more equations besides (2.10)–(2.16). Using the method of undetermined coefficients, we obtain the following two equations which have truncation errors of \(O(h^{6})\):

$$\begin{aligned} \textstyle\begin{cases} 2S_{0}-3S_{1/2}+S_{3/2}=h^{2} (-\frac{1}{120}D_{0}+\frac {5}{8}D_{1/2}+\frac{7}{48}D_{3/2}-\frac{1}{80}D_{5/2} ),\\ 2S_{n}-3S_{n-1/2}+S_{n-3/2}=h^{2} (-\frac {1}{120}D_{n}+\frac{5}{8}D_{n-1/2}+\frac{7}{48}D_{n-3/2}-\frac {1}{80}D_{n-5/2} ). \end{cases}\displaystyle \end{aligned}$$
(2.17)

Since \(n\geq12\), from (2.9) we have \(D_{i-1/2}=f_{i-1/2}\) for \(i=1,~2,~3,~n-2,~n-1,~n\). Hence, the above two equations become

$$\begin{aligned} \textstyle\begin{cases} 2S_{0}-3S_{1/2}+S_{3/2}=h^{2} (-\frac{1}{120}f_{0}+\frac {5}{8}f_{1/2}+\frac{7}{48}f_{3/2}-\frac{1}{80}f_{5/2} ),\\ 2S_{n}-3S_{n-1/2}+S_{n-3/2}=h^{2} (-\frac {1}{120}f_{n}+\frac{5}{8}f_{n-1/2}+\frac{7}{48}f_{n-3/2}-\frac {1}{80}f_{n-5/2} ). \end{cases}\displaystyle \end{aligned}$$
(2.18)

We have now derived the mid-knot cubic non-polynomial spline scheme which comprises Eqs. (2.10)–(2.16) and (2.18) with \(2\alpha+2\beta=1\). The solvability of the system and the convergence analysis will be tackled in the next section.

3 Solvability and convergence

In this section, we shall establish the unique solvability of the mid-knot cubic non-polynomial spline scheme (2.10)–(2.16) and (2.18) and also conduct a convergence analysis. To begin with, we define the norms of a column vector \(T=[t_{i}]\) and a matrix \(Q=[q_{ij}]\) as follows:

$$\Vert T \Vert = \max_{i} \vert t_{i} \vert \quad\mbox{and}\quad \Vert Q \Vert = \max_{i} \sum _{j} \vert q_{ij} \vert . $$

Let \(e_{i-1/2}=y_{i-\frac{1}{2}}-S_{i-\frac{1}{2}}\), \(1\leq i\leq n\) be the errors. Let \(Y=[y_{i-1/2}]\), \(S=[S_{i-1/2}]\), \(W=[w_{i}]\), \(T=[t_{i}]\) and \(E=[e_{i-1/2}]\) be n-dimensional column vectors. The system (2.10)–(2.16) and (2.18) can be written as

$$\begin{aligned} AS=W, \end{aligned}$$
(3.1)

where

$$\begin{aligned} A=A_{0}+h^{2}QG. \end{aligned}$$
(3.2)

Here, \(A_{0}\), Q and G are \(n \times n\) matrices given by

$$\begin{aligned} &A_{0}= \begin{pmatrix} 3 & -1 \\ -1& 2 & -1 \\ & & \ddots\\ & & -1 & 2 & -1 \\ & & & -1 &3 \end{pmatrix}, \end{aligned}$$
(3.3)
$$\begin{aligned} &Q= \begin{pmatrix} \frac{5}{8} & \frac{7}{48}&-\frac{1}{80} \\ \alpha& 2\beta& \alpha\\ & & \ddots\\ & & \alpha& 2\beta& \alpha\\ & & -\frac{1}{80}&\frac{7}{48} &\frac{5}{8} \end{pmatrix} \end{aligned}$$
(3.4)

and \(G=\operatorname{diag}[v_{i-1/2}]\) where

$$\begin{aligned} v_{i-1/2}= \textstyle\begin{cases} 0,& 1\leq i \leq\frac{n}{4},\\ g_{i-1/2}, & \frac{n}{4}+1\leq i \leq\frac{3n}{4},\\ 0,& \frac{3n}{4}+1\leq i \leq n. \end{cases}\displaystyle \end{aligned}$$
(3.5)

Further, \(W=[w_{i}]\) is given by

$$\begin{aligned} w_{i}= \textstyle\begin{cases} 2\bar{a}-h^{2} (-\frac{1}{120}f_{0}+\frac {5}{8}f_{1/2}+\frac{7}{48}f_{3/2}-\frac{1}{80}f_{5/2} ),& i=1,\\ -h^{2} (\alpha f_{i-3/2}+2\beta f_{i-1/2}+\alpha f_{i+1/2} ),& 2\leq i \leq\frac{n}{4}-1, \\ -h^{2} [\alpha f_{n/4-3/2}+2\beta f_{n/4-1/2}+\alpha (f_{n/4+1/2}+r ) ],& i=\frac{n}{4},\\ -h^{2} [\alpha f_{n/4-1/2}+2\beta (f_{n/4+1/2}+r )+\alpha (f_{n/4+3/2}+r ) ], & i=\frac{n}{4}+1, \\ -h^{2} [\alpha (f_{i-3/2}+r )+2\beta (f_{i-1/2}+r )+\alpha (f_{i+1/2}+r ) ], & \frac{n}{4}+2\leq i\leq\frac{3n}{4}-1,\\ -h^{2} [\alpha (f_{3n/4-3/2}+r )+2\beta (f_{3n/4-1/2}+r )+\alpha f_{3n/4+1/2} ],& i=\frac {3n}{4},\\ -h^{2} [\alpha (f_{3n/4-1/2}+r )+2\beta f_{3n/4+1/2}+\alpha f_{3n/4+3/2} ], & i=\frac{3n}{4}+1, \\ -h^{2} (\alpha f_{i-3/2}+2\beta f_{i-1/2}+\alpha f_{i+1/2} ), & \frac{3n}{4}+2\leq i\leq n-1,\\ 2\bar{b}-h^{2} (-\frac{1}{120}f_{n}+\frac {5}{8}f_{n-1/2}+\frac{7}{48}f_{n-3/2}-\frac{1}{80}f_{n-5/2} ),& i=n. \end{cases}\displaystyle \end{aligned}$$
(3.6)

It follows from (3.1) that

$$\begin{aligned} AY=W+T, \end{aligned}$$
(3.7)

where

$$\begin{aligned} T=AE. \end{aligned}$$
(3.8)

Remark 3.1

Noting Remark 2.2, we see that, for \(2\leq i\leq n-1\),

$$t_{i}= \textstyle\begin{cases} O(h^{4}), & \mbox{if }2\alpha+2\beta=1,\\ O(h^{6}), & \mbox{if }\alpha=\frac{1}{12}, \beta=\frac{5}{12}. \end{cases} $$

Coupling with the fact that the truncation error in the other two equations of Eq. (2.18) is \(O(h^{6})\), we get

$$\begin{aligned} \Vert T \Vert = \textstyle\begin{cases} O(h^{4}), & \mbox{if }2\alpha+2\beta=1, \\ O(h^{6}), & \mbox{if }\alpha=\frac{1}{12}, \beta=\frac{5}{12}. \end{cases}\displaystyle \end{aligned}$$
(3.9)

Lemma 3.1

([27])

The matrix \(A_{0}\) is nonsingular and

$$\begin{aligned} \bigl\Vert A_{0}^{-1} \bigr\Vert \leq \frac{n^{2}+1}{8}= \frac{(b-a)^{2}+h^{2}}{8h^{2}}. \end{aligned}$$
(3.10)

Lemma 3.2

([11])

Let D be a square matrix such that \(\| D\| <1\). Then \((I+D)\) is nonsingular and

$$\begin{aligned} \bigl\Vert (I+D) ^{-1} \bigr\Vert \leq \frac{ 1}{1- \Vert D \Vert }. \end{aligned}$$
(3.11)

We are now ready to establish the unique solvability and the convergence of the mid-knot cubic non-polynomial spline scheme in the following theorem.

Theorem 3.1

Suppose

$$\begin{aligned} K=\frac{1}{8} \bigl[(b-a)^{2}+h^{2} \bigr]\hat{g}< 1, \end{aligned}$$
(3.12)

where \(\hat{g}=\max_{x\in[c,d]}|g(x)|\). Then the system (3.1) has a unique solution and

$$\begin{aligned} \Vert E \Vert = O\bigl(h^{2}\bigr). \end{aligned}$$
(3.13)

Proof

Suppose (3.1) has a unique solution, then it can be written as

$$\begin{aligned} S&=A^{-1}W=\bigl(A_{0}+h^{2}QG \bigr)^{-1}W=\bigl[A_{0}\bigl(I+A_{0}^{-1}h^{2}QG \bigr)\bigr]^{-1}W \\ &=\bigl(I+A_{0}^{-1}h^{2}QG \bigr)^{-1}A_{0}^{-1}W. \end{aligned}$$
(3.14)

By Lemma 3.1, the inverse \(A_{0}^{-1}\) exists, hence for the existence of the unique solution S it remains to show that \((I+A_{0}^{-1}h^{2}QG)\) is nonsingular.

From the definitions of matrices Q and G, it is clear that

$$\begin{aligned} \Vert Q \Vert =1, \qquad \Vert G \Vert =\max _{\frac{n}{4}+1\leq i \leq \frac{3n}{4}} \vert g_{i-\frac{1}{2}} \vert \leq\hat{g}. \end{aligned}$$
(3.15)

Using (3.10) and (3.15), we find

$$\begin{aligned} \bigl\Vert A_{0}^{-1}h^{2}QG \bigr\Vert \leq h^{2} \bigl\Vert A_{0}^{-1} \bigr\Vert \cdot \Vert Q \Vert \cdot \Vert G \Vert \leq \frac{1}{8} \bigl[(b-a)^{2}+h^{2} \bigr]\hat{g}=K. \end{aligned}$$
(3.16)

Since \(K<1\), it follows immediately from Lemma 3.2 that \((I+A_{0}^{-1}h^{2}QG)\) is nonsingular. It is hence proven that (3.1) has a unique solution given by (3.14).

Next, we consider the error E, which from (3.8) can be written as

$$E=A^{-1}T=\bigl(I+A_{0}^{-1}h^{2}QG \bigr)^{-1}A_{0}^{-1}T. $$

From (3.9), we note that \(\|T\|=O(h^{4})\) in the general case, i.e., \(2\alpha+2\beta=1\). Together with Lemma 3.2, (3.16) and (3.10), it follows that

$$\begin{aligned} \Vert E \Vert \leq& \bigl\Vert \bigl(I+A_{0}^{-1}h^{2}QG \bigr)^{-1} \bigr\Vert \cdot \bigl\Vert A_{0}^{-1} \bigr\Vert \cdot \Vert T \Vert \\ \leq& \frac{ \Vert A_{0}^{-1} \Vert \cdot \Vert T \Vert }{1- \Vert A_{0}^{-1}h^{2}QG \Vert } \\ \leq& \frac{(b-a)^{2}+h^{2}}{8h^{2}(1-K)} O\bigl(h^{4}\bigr) \\ =& \frac{K}{\hat{g}(1-K)}~O\bigl(h^{2}\bigr) \\ =& O\bigl(h^{2}\bigr). \end{aligned}$$

This shows that (3.1) is a second-order convergence method in the general case when \(2\alpha+2\beta=1\).

On the other hand, for the special case \(\alpha=\frac{1}{12}\), \(\beta=\frac{5}{12}\), we have from (3.9) that \(\|T\|=O(h^{6})\). So by using a similar argument as above, we obtain \(\|E\|\leq O(h^{4})\), which indicates that (3.1) is a fourth-order convergence method. However, the solution of problem (1.1) exists continuously only up to the second derivative. Therefore, the numerical method is only second-order accurate over the whole interval for the special case \(\alpha=\frac{1}{12}\), \(\beta=\frac{5}{12}\). Indeed, a similar conclusion can be observed in [46, 8, 12, 25]. In summary, the numerical method (3.1) is of second order for all α and β satisfying \(2\alpha+2\beta=1\). □

Remark 3.2

Other than the two equations in (2.17) which have truncation errors of \(O(h^{6})\), we can also obtain, by the method of undetermined coefficients, the following two equations, which have truncation errors of \(O(h^{4})\):

$$\begin{aligned} \textstyle\begin{cases} 2S_{0}-3S_{1/2}+S_{3/2}=h^{2} (-\frac {1}{4}D_{0}+D_{1/2} ),\\ 2S_{n}-3S_{n-1/2}+S_{n-3/2}=h^{2} (-\frac{1}{4}D_{n}+D_{n-1/2} ). \end{cases}\displaystyle \end{aligned}$$
(3.17)

Since \(n\geq12\), from (2.9) we have \(D_{i-1/2}=f_{i-1/2}\) for \(i=1, n\). Hence, (3.17) leads to

$$\begin{aligned} \textstyle\begin{cases} 2S_{0}-3S_{1/2}+S_{3/2}=h^{2} (-\frac{1}{4}f_{0}+f_{1/2} ),\\ 2S_{n}-3S_{n-1/2}+S_{n-3/2}=h^{2} (-\frac{1}{4}f_{n}+f_{n-1/2} ). \end{cases}\displaystyle \end{aligned}$$
(3.18)

It is possible to use (2.10)–(2.16) and (3.18) (instead of (2.18)) to form a ‘new’ numerical scheme for the general case when \(2\alpha+2\beta=1\) (except \(\alpha=\frac{1}{12}\), \(\beta=\frac{5}{12}\)). In fact, the coefficient matrix A of the new system (2.10)–(2.16) and (3.18) is exactly the same as that of the original proposed scheme (2.10)–(2.16) and (2.18) (see (3.1)), therefore the unique solvability of the new system is guaranteed. Further, by following a similar argument to the proof of Theorem 3.1, we can show that the new scheme is also of second order. Although the convergence order of the new scheme is the same as the original proposed scheme, from numerical simulation we notice that the errors obtained by the new scheme are generally larger than that obtained by the original proposed scheme. As such, the original scheme (2.10)–(2.16) and (2.18) is a better choice.

4 Application to obstacle boundary value problem

To illustrate the application of the mid-knot cubic non-polynomial spline scheme (2.10)–(2.16) and (2.18), we consider the following well-known obstacle value problem

$$\begin{aligned} \begin{aligned} & {-}y''(x)\geq f(x), & \mbox{on } \Omega=[0, \pi], \\ &y(x) \geq\psi(x), & \mbox{on } \Omega=[0, \pi], \\ &\bigl[y''(x)-f(x) \bigr] \bigl[y(x)-\psi(x) \bigr]=0, & \mbox{on } \Omega=[0,\pi], \\ &y(0)=y(\pi)=0, \end{aligned} \end{aligned}$$
(4.1)

where \(f(x)\) is a given force on the string and \(\psi(x)\) is the elastic obstacle function.

The problem (4.1) has been considered by many authors. Noor and Khalifa [19] first discussed it using the variational inequality approach and showed that the problem (4.1) is equivalent to the variational inequality problem (also see [7, 9, 16, 21])

$$\begin{aligned} \rho(y, v-y)\geq\langle f, v-y \rangle, \quad \mbox{for all } v \in C, \end{aligned}$$
(4.2)

where \(\rho(\cdot,\cdot)\) is a coercive continuous bilinear form and C is the closed convex set given by \(C= \{ v \in H_{0}^{1}(\Omega) | v \geq\psi\mbox{ on }\Omega\}\) and \(H_{0}^{1}(\Omega)\) is a Sobolev space.

Following the idea and technique of Lewy and Stampacchia [17], the variational inequality (4.2) can be written as

$$\begin{aligned} \begin{aligned} &y''-\bigl[ \mu(y-\psi)\bigr](y-\psi)=f, \quad 0 < x < \pi, \\ &y(0)=y(\pi)=0, \end{aligned} \end{aligned}$$
(4.3)

where \(\mu(t)\), known as the penalty function, is the discontinuous function defined by

$$\begin{aligned} \mu(t)= \textstyle\begin{cases} 1, & t \geq0, \\ 0, & t < 0, \end{cases}\displaystyle \end{aligned}$$
(4.4)

and ψ is the given obstacle function defined by

$$\begin{aligned} \psi(x)= \textstyle\begin{cases} -1, & 0 \leq x \leq\frac{\pi}{4}, \\ 1, & \frac{\pi}{4} \leq x \leq\frac{3 \pi}{4}, \\ -1, & \frac{3 \pi}{4} \leq x \leq\pi. \end{cases}\displaystyle \end{aligned}$$
(4.5)

Equation (4.3) describes the equilibrium configuration of an obstacle string pulled at the ends and lying over elastic step of constant height 1 and unit rigidity.

From Eqs. (4.3)–(4.5), one obtains the following system of second-order boundary value problems:

$$\begin{aligned} \begin{aligned} &y''= \textstyle\begin{cases} f, & 0 \leq x \leq\frac{\pi}{4}\mbox{ and } \frac{3\pi}{4} \leq x \leq\pi, \\ y+f-1, & \frac{\pi}{4} \leq x \leq\frac{3 \pi}{4}, \end{cases}\displaystyle \\ & y(0)=y(\pi)=0, \end{aligned} \end{aligned}$$
(4.6)

with continuity conditions of y and \(y'\) at \(\frac{\pi}{4}\) and \(\frac{3 \pi}{4}\).

In Example 4.1, we shall consider a well-known special case of the system (4.6) when \(f=0\). This special case is first discussed in [19] and subsequently considered in almost every paper on system of second-order boundary value problems.

Example 4.1

([19])

We consider the system (4.6) when \(f=0\), i.e.,

$$\begin{aligned} \begin{aligned} &y''= \textstyle\begin{cases} 0, & 0 \leq x \leq\frac{\pi}{4} \mbox{ and } \frac{3 \pi}{4} \leq x \leq\pi, \\ y-1, & \frac{\pi}{4} \leq x \leq\frac{3 \pi}{4}, \end{cases}\displaystyle \\ &y(0)=y(\pi)=0. \end{aligned} \end{aligned}$$
(4.7)

The analytical solution of (4.7) is given by

$$\begin{aligned} y(x)= \textstyle\begin{cases} \frac{4}{\gamma_{1}} x, & 0 \leq x \leq \frac{\pi}{4} ,\\ 1- \frac{4}{\gamma_{2}} \cosh (\frac{\pi }{2}-x ), & \frac{\pi}{4} \leq x \leq\frac{3 \pi}{4}, \\ \frac{4}{\gamma_{1}}(\pi-x), & \frac{3 \pi}{4} \leq x \leq\pi, \end{cases}\displaystyle \end{aligned}$$
(4.8)

where \(\gamma_{1}=\pi+4 \coth\frac{\pi}{4}\) and \(\gamma_{2}= \pi\sinh\frac{\pi}{4}+4 \cosh\frac{\pi}{4}\).

In Table 1, we present the maximum absolute errors \(\|E\|=\max_{1\leq i\leq n}|e_{i-1/2}|\) obtained from our mid-knot cubic non-polynomial spline scheme for various values of α and β, and also the maximum absolute errors obtained from other methods.

Table 1 (Example 4.1) Maximum absolute errors

From Table 1, the numerical results confirm that our method is of second order. Compared to the parametric cubic spline method [12, 25], our method gives the smallest errors for all cases of \((\alpha,\beta)\). Furthermore, our method outperforms all other methods [16, 8, 19, 22] in all cases.

To illustrate graphically, in Figs. 1 and 2, we plot the exact solution, the numerical solution obtained from the mid-knot cubic non-polynomial spline method, and the associated absolute errors when \((\alpha,\beta,h)= (\frac{1}{12},\frac{5}{12}, \frac{\pi}{80} )\). It is observed from the figures that this method gives a good approximation to the exact solution.

Figure 1
figure 1

(Example 4.1) Exact solution and numerical solution when \((\alpha,\beta,h)=(\frac{1}{12},\frac{5}{12}, \frac{\pi}{80})\)

Figure 2
figure 2

(Example 4.1) Absolute error when \((\alpha,\beta,h)=(\frac{1}{12},\frac{5}{12}, \frac{\pi}{80})\)

Finally, to investigate the effect of α on the maximum absolute error \(\|E\|\), in Fig. 3 we plot the maximum absolute errors for different values of \(\alpha\in(0,0.5)\) (in steps of \(\frac{1}{32}\)) when \(h=\frac{\pi}{80}\). It is observed that the minimum \(\|E\|\) is obtained at about \(\alpha=\frac{1}{8}\).

Figure 3
figure 3

(Example 4.1) Maximum absolute error for different α when \(h=\frac{\pi}{80}\)

In the next two examples, unlike Example 4.1, we consider the problem (1.1) with nonzero f.

Example 4.2

We consider the boundary value problem

$$\begin{aligned} \begin{aligned} &y''= \textstyle\begin{cases} 2, & 0\leq x \leq\frac{\pi}{4}, \\ -y+\frac{\pi^{2}}{16}+\frac{7}{4}\pi+1, & \frac{\pi}{4}\leq x \leq\frac{3\pi}{4},\\ 2, & \frac{3\pi}{4} \leq x \leq\pi, \end{cases}\displaystyle \\ &y(0)=0, \qquad y(\pi)=\frac{\pi^{2}}{2}+\frac{5\pi}{2}+2. \end{aligned} \end{aligned}$$
(4.9)

Here, \(f(x)=2\), \(g(x)=-1\) and \(r=\frac{\pi^{2}}{16}+\frac{7}{4}\pi-1\). The analytical solution of (4.9) is given by

$$\begin{aligned} y(x)= \textstyle\begin{cases} x^{2}+x, & 0\leq x\leq\frac{\pi}{4},\\ -\frac{\sqrt{2}\pi}{2}\sin x -\sqrt{2}(\pi+1)\cos x+\frac{\pi^{2}}{16}+\frac{7\pi}{4}+1, & \frac{\pi }{4}\leq x \leq\frac{3\pi}{4},\\ x^{2}+x-\frac{\pi^{2}}{2}+\frac{3\pi}{2}+2, & \frac{3\pi}{4} \leq x \leq\pi. \end{cases}\displaystyle \end{aligned}$$
(4.10)

In this example, we focus on comparing the three more accurate methods observed in Table 1, namely: (i) mid-knot cubic non-polynomial spline (MCNS), (ii) parametric cubic spline (PCS) [12, 25], and (iii) deficient discrete cubic spline (DDCS) [8]. In Table 2, we present the maximum absolute errors and the convergence orders of these methods. It is clear that the mid-knot cubic non-polynomial spline scheme obtains the smallest errors in all the cases.

Table 2 (Example 4.2) Maximum absolute errors and convergence orders

Next, the effect of α on the maximum absolute error is illustrated in Fig. 4, where we plot the maximum absolute errors for different values of \(\alpha\in(0,0.5)\) (in steps of \(\frac{1}{32}\)) when \(h=\frac{\pi}{80}\). We notice that the minimum \(\|E\|\) is obtained at about \(\alpha=\frac{1}{16}\), which is different from Example 4.1.

Figure 4
figure 4

(Example 4.2) Maximum absolute error for different α when \(h=\frac{\pi}{80}\)

Example 4.3

We consider the boundary value problem

$$\begin{aligned} \begin{aligned} &y''= \textstyle\begin{cases} 2, & 0\leq x\leq\frac{1}{4},\\ y+\frac{3}{16}, & \frac{1}{4}\leq x\leq \frac{3}{4},\\ 2, & \frac{3}{4}\leq x \leq1, \end{cases}\displaystyle \\ &y(0)=1, \qquad y(1)=\frac{15}{8}e^{\frac{1}{2}}-\frac{1}{8}. \end{aligned} \end{aligned}$$
(4.11)

In this example, \(f(x)=2\), \(g(x)=1\) and \(r=-\frac{29}{16}\). The analytical solution of (4.11) is given by

$$\begin{aligned} y(x)= \textstyle\begin{cases} x^{2}+x+1, & 0 \leq x \leq\frac{1}{4}, \\ \frac{3}{2}e^{x-\frac{1}{4}}-\frac{3}{16}, & \frac{1}{4}\leq x \leq\frac{3}{4}, \\ x^{2}+ (\frac{3}{2}e^{\frac{1}{2}}-\frac{3}{2} )x+\frac {3}{8}e^{\frac{1}{2}}+\frac{3}{8}, & \frac{3}{4}\leq x \leq1. \end{cases}\displaystyle \end{aligned}$$
(4.12)

Once again we compare the three better methods arising from Table 1, namely: (i) mid-knot cubic non-polynomial spline (MCNS), (ii) parametric cubic spline (PCS) [12, 25], and (iii) deficient discrete cubic spline (DDCS) [8]. In Table 3, we present the maximum absolute errors of these methods and it is clear that the mid-knot cubic non-polynomial spline scheme outperforms in all the cases.

Table 3 (Example 4.3) Maximum absolute errors and convergence orders

In Fig. 5, we illustrate the effect of α on the maximum absolute error. It is observed that the minimum \(\|E\|\) is obtained at about \(\alpha=\frac{1}{8}\), which is a different value from Example 4.2 but is about the same value as in Example 4.1.

Figure 5
figure 5

(Example 4.3) Maximum absolute error for different α when \(h=\frac{1}{80}\)

5 Conclusion

In this paper, we have developed a numerical scheme for a system of second-order boundary value problems, which arises from second-order obstacle problem. Our scheme is obtained by using cubic non-polynomial spline at mid-knots to avoid the breakup points c and d. We have proved the unique solvability and established convergence order of our scheme. To demonstrate the numerical efficiency and to compare with other methods in the literature, three examples are presented. The numerical results illustrate that our method gives the smallest errors in all the cases.

References

  1. Al-Said, E.A.: Spline solutions for system of second-order boundary-value problems. Int. J. Comput. Math. 62, 143–154 (1996)

    Article  MathSciNet  Google Scholar 

  2. Al-Said, E.A.: Spline methods for solving system of second-order boundary-value problems. Int. J. Comput. Math. 70, 717–727 (1999)

    Article  MathSciNet  Google Scholar 

  3. Al-Said, E.A.: The use of cubic splines in the numerical solution of a system of second-order boundary value problems. Comput. Math. Appl. 42, 861–869 (2001)

    Article  MathSciNet  Google Scholar 

  4. Al-Said, E.A., Noor, M.A.: Modified Numerov method for solving system of second-order boundary-value problems. Korean J. Comput. Appl. Math. 8, 129–136 (2001)

    MathSciNet  MATH  Google Scholar 

  5. Al-Said, E.A., Noor, M.A., Al-Shejari, A.A.: Numerical solutions for system of second order boundary value problems. Korean J. Comput. Appl. Math. 5, 659–667 (1998)

    MathSciNet  MATH  Google Scholar 

  6. Aziz, T., Khan, A., Khan, I.: Quintic splines method for second-order boundary value problems. Int. J. Comput. Math. 85, 735–743 (2008)

    Article  MathSciNet  Google Scholar 

  7. Baiocchi, C., Capelo, A.: Variational and Quasi-Variational Inequalities. Wiley, New York (1984)

    MATH  Google Scholar 

  8. Chen, F., Wong, P.J.Y.: Deficient discrete cubic spline solution for a system of second order boundary value problems. Numer. Algorithms 66, 793–809 (2014)

    Article  MathSciNet  Google Scholar 

  9. Cottle, R.W., Giannessi, F., Lions, J.L.: Variational Inequalities and Complementarity Problems: Theory and Applications. Wiley, New York (1980)

    Google Scholar 

  10. Crank, J.: Free and Moving Boundary Problems. Clarendon Press, Oxford (1984)

    MATH  Google Scholar 

  11. Fröberg, C.: Numerical Mathematics, Theory and Computer Applications. Benjamin/Commings, Reading (1985)

    MATH  Google Scholar 

  12. Khan, A., Aziz, T.: Parametric cubic spline approach to the solution of a system of second-order boundary-value problems. J. Optim. Theory Appl. 118, 45–54 (2003)

    Article  MathSciNet  Google Scholar 

  13. Khan, A., Khan, I., Aziz, T.: A survey on parametric spline function approximation. Appl. Math. Comput. 171, 983–1003 (2005)

    MathSciNet  MATH  Google Scholar 

  14. Khan, A., Noor, M.A., Aziz, T.: Parametric quintic-spline approach to the solution of a system of fourth-order boundary-value problems. J. Optim. Theory Appl. 122, 309–322 (2004)

    Article  MathSciNet  Google Scholar 

  15. Khan Siraj-ul-Islam, M.A., Tirmizi, I.A., Twizell, E.H., Ashraf, S.: A class of methods based on non-polynomial sextic spline functions for the solution of a special fifth-order boundary-value problems. J. Math. Anal. Appl. 321, 651–660 (2006)

    Article  MathSciNet  Google Scholar 

  16. Kikuchi, N., Oden, J.T.: Contact Problems in Elasticity. SIAM, Philadelphia (1988)

    Book  Google Scholar 

  17. Lewy, H., Stampacchia, G.: On the regularity of the solution of a variational inequality. Commun. Pure Appl. Math. 22, 153–188 (1960)

    Article  MathSciNet  Google Scholar 

  18. Momani, S.: Solving a system of second order obstacle problems by a modified decomposition method. Appl. Math. E-Notes 6, 141–148 (2006)

    MathSciNet  MATH  Google Scholar 

  19. Noor, M.A., Khalifa, A.K.: Cubic splines collocation methods for unilateral problems. Int. J. Eng. Sci. 25, 1525–1530 (1987)

    Article  MathSciNet  Google Scholar 

  20. Noor, M.A., Noor, K.I., Rafiq, M., Al-Said, E.A.: Variational iteration method for solving a system of second-order boundary value problems. Int. J. Nonlinear Sci. Numer. Simul. 11, 1109–1120 (2010)

    Article  Google Scholar 

  21. Noor, M.A., Noor, K.I., Rassias, Th.: Some aspects of variational inequalities. J. Comput. Appl. Math. 47, 285–312 (1993)

    Article  MathSciNet  Google Scholar 

  22. Noor, M.A., Tirmizi, S.I.A.: Finite difference technique for solving obstacle problems. Appl. Math. Lett. 1, 267–271 (1988)

    Article  MathSciNet  Google Scholar 

  23. Rodrigues, J.F.: Obstacle Problems in Mathematical Physics. North-Holland, Amsterdam (1987)

    MATH  Google Scholar 

  24. Siraj-ul-Islam, Khan, M.A., Tirmizi, I.A., Twizell, E.H.: Non polynomial spline approach to the solution of a system of third-order boundary-value problems. Appl. Math. Comput. 168, 152–163 (2005)

    MathSciNet  MATH  Google Scholar 

  25. Siraj-ul-Islam, Tirmizi, I.A.: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems. Appl. Math. Comput. 173, 1208–1218 (2006)

    MathSciNet  MATH  Google Scholar 

  26. Siraj-ul-Islam, Tirmizi, I.A., Khan, M.A.: Quartic non-polynomial spline approach to the solution of a system of third-order boundary-value problems. J. Math. Anal. Appl. 335, 1095–1104 (2007)

    Article  MathSciNet  Google Scholar 

  27. Usmani, R.A.: Bounds for the solution of a second order differential equation with mixed boundary conditions. J. Eng. Math. 9, 159–164 (1975)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

Not applicable.

Availability of data and materials

Not applicable.

Funding

Not applicable.

Author information

Authors and Affiliations

Authors

Contributions

All the authors contribute equally to the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Patricia J. Y. Wong.

Ethics declarations

Competing interests

None of the authors have any competing interests in the manuscript.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ding, Q., Wong, P.J.Y. Mid-knot cubic non-polynomial spline for a system of second-order boundary value problems. Bound Value Probl 2018, 156 (2018). https://doi.org/10.1186/s13661-018-1075-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13661-018-1075-y

Keywords