1 Introduction

Consider the following boundary value problem (BVP):

$$\begin{aligned} u^{(4)}(x) = f \bigl( x,u(x),u'(x),u''(x),u'''(x) \bigr) , \quad a< x< b, \end{aligned}$$
(1.1)

subject to the prescribed natural boundary conditions:

$$ u(a) = A_{0}, \qquad u'(a) = B_{0}, \qquad u(b) = A_{1},\qquad u'(b) = B_{1}, $$
(1.2)

where \(A_{0} \), \(B_{0} \), \(A_{1} \), and \(B_{1} \) are real constants and \(-\infty< a \le x \le b < \infty\).

The equation (1.1) represents general form of a fourth order non-linear ordinary differential equation (ODE), prescribed along with the Dirichlet and Neumann boundary conditions viz. (1.2). These conditions are also referred to as the boundary conditions of the first kind. Fourth order BVPs represent various physical problems that are related to elastic stability theory. These appear in the modeling of viscoelastic inelastic flows [1], plate deflection theory [2], and deformation of beams, arches, load bearing members like street lights, and robotic arms in multi-purpose engineering systems where elastic members serve as key members for shedding and transmitting loads [3, 4].

Another example of physical importance is the following fourth order ODE:

$$\begin{aligned} u^{(4)}(x)-\lambda u(x)u'''(x)=0, \end{aligned}$$
(1.3)

subject to the conditions (1.2). This arises from the time-independent Navier-Stokes equations for the axisymmetric flow of an incompressible fluid contained between infinite disks which occupy planes \(z=-d\) and \(z=d\). The disks are porous and fluid is injected or extracted normally with velocity \(A_{0}\) at \(z=-d\) and \(A_{1}\) at \(z=d\). Here, λ is the kinematic viscosity (Elcrat [5]).

Thus, due to the vast physical applications of fourth order BVPs, various techniques have been proposed by researchers to solve these problems. On one hand, equations of type (1.1) with boundary conditions of the second kind are transformable to coupled second order equations [612], such type of a reduction is not possible with first kind boundary conditions. Apart from these, a quartic non-polynomial spline approach has been proposed by researchers for the solution of the fourth [13] and sixth order [14] ODEs with second kind boundary conditions. In the past, several approaches have been sought for solving fourth order BVPs with first kind boundary conditions. These include multi-derivative methods proposed by Twizell and Tirmizi [15], collocation algorithms based on interpolating and approximating subdivision schemes by Ma and Silva [3], sinc collocation method by Nurmuhammad et al. [16], homotopy perturbation technique for a special fourth order BVP by Momani and Noor [17] and finite difference method by Usmani [18], and Chen and Li [19]. Some of the recently proposed approaches are the quintic spline by Akram and Amin [20], the septic spline by Akram and Naheed [21], the Adomian decomposition by Kelesoglu [22], and subdivision schemes based on collocation algorithms by Ejaz et al. [23]. However, all these techniques are applicable to only a linear counterpart of the problem (1.1)-(1.2). For the non-linear case, an iterative method was proposed by Agarwal and Chow [24] in 1984. In the year 2000, Mohanty [25] developed a fourth order finite difference technique for solving one-dimensional non-linear biharmonic problem of the first kind. Variational iteration and homotopy perturbation techniques were proposed by Noor and Mohyud-Din [26], Choobbasti et al. [4] and Mirmoradi et al. [27] in the years 2007, 2008 and 2009, respectively. In 2012, Talwar and Mohanty [28] framed a finite difference method for the solution of (1.1)-(1.2) using a uniform mesh size \(h>0\).

However, a uniform grid does not always result in stable solutions when applied to the singularly perturbed boundary value problems (SPBVPs) [21, 29]. Formation of sharp boundary layers in numerical methods when ϵ, the coefficient of highest order derivative, approaches to zero creates trouble when used in conjunction with many classical techniques. During the past decades, many approximate methods have been developed and refined, including the method of averaging, methods of matched asymptotic expansion and multiple scales. In 2008, Tirmizi et al. [30] developed a non-polynomial spline technique for a second order self-adjoint SPBVP. In 2010, Jiaqi [31] proposed a boundary layer correction technique for the linear fourth order SPBVPs. The recently proposed spline techniques of Akram [20, 21] have also been successfully applied to linear problems with boundary layer. To the best of the authors’ knowledge, no quasi-variable mesh methods of order two and three for the solution of fourth order non-linear ODE with boundary conditions of the first kind have been discussed in the literature so far.

In this article, with three grid points, we have derived two new methods of order two and three for the solution of the BVP (1.1)-(1.2) using a quasi-variable mesh. We use step-size \(h_{k}=x_{k}-x_{k-1}>0\), where k refers to the grid point number, with subsequent step-size being \(h_{k+1}=\eta h_{k}\), where η is a positive constant whose value is chosen in accordance with the occurrence of boundary layer. This approach enables a denser grid in the boundary layer region i.e. when ϵ is very small, and hence successfully applicable to SPBVPs. We use a combination of \(u(x)\) and its derivative \(u'(x)\) at each grid point, thereby obtaining the values of \(u'(x)\) as a by-product. Since we ultimately need to solve the coupled non-linear system of equations at each mesh point, the iterative methods pertaining to the complicated block structure so obtained are used. We have solved the linear systems using Gauss-Seidel and Gauss-Jacobi methods, and non-linear systems by the generalized Newton method ([3234]). Our finite difference techniques also show highly accurate results when applied to coupled non-linear fourth order BVPs with boundary conditions of the first kind. The numerical illustrations for the same are given below in this article.

This paper is organized into five sections: In Section 2, we present and derive our second and third order quasi-variable mesh techniques, which are reducible to second and fourth order techniques, respectively, upon setting the parameter \(\eta=1\). In Section 3, we discuss the convergence and stability analysis of the fourth order technique applied to a model problem. Section 4 comprises the numerical illustrations of the methods when applied to seven fourth order BVPs of the type (1.1)-(1.2). All these problems are of physical interest, as also discussed in this section. In Section 5, we give some concluding remarks about this article.

2 Finite difference methods and derivation

For the sake of simplicity, let us take the domain of interest to be the closed interval \([0,1]\). We divide this interval into \(N+1 \) parts by introducing mesh points: \(0 = x_{0} < x_{1} < \cdots< x_{N+1} = 1 \), with \(h_{k+1} = x_{k+1} - x_{k} > 0, k=0(1)N\), being the step-size in the \((k+1)\)th interval, and a parameter \(\eta= \frac{h_{k+1}}{h_{k}}> 0, k = 1(1)N \).

Then

$$\begin{aligned} 1 =& x_{N+1} - x_{0} = (x_{N+1} - x_{N}) + ( x_{N} - x_{N-1}) + \cdots+ (x_{2}-x_{1})+( x_{1} - x_{0} ) \\ =& h_{N+1} + h_{N} + \cdots+h_{2}+ h_{1} = \bigl(\eta^{N} + \eta^{N-1} + \cdots+ \eta+ 1\bigr)h_{1}. \end{aligned}$$

This yields \(h_{1} = 1/(1+\eta+\eta^{2}+\cdots+\eta^{N})\), which is the first step length, and the subsequent step lengths can be determined using \(h_{k+1}=\eta h_{k}\) for \(k=1(1)N\). Let the off-step grid points be given by \(x_{k+\frac{1}{2}}=x_{k}+\frac{\eta h_{k}}{2}\) for \(k=0(1)N\), and \(x_{k-\frac{1}{2}}=x_{k}-\frac{h_{k}}{2}\) for \(k=1(1)N+1\).

Let \(u_{k}=u(x_{k}), u'_{k}=u'(x_{k})\) for \(k=0(1)N+1\), and the corresponding notations hold true for higher order derivatives of u as well. Let \(f_{k}=f(x_{k},u_{k},u'_{k},u''_{k},u'''_{k})\) and \(f_{k\pm \frac{1}{2}}=f(x_{k\pm\frac{1}{2}},u_{k\pm\frac{1}{2}},u'_{k\pm\frac{1}{2}}, u''_{k\pm\frac{1}{2}},u'''_{k\pm\frac{1}{2}})\) for \(k=1(1)N\). Throughout the rest of this article, we vary \(k=1(1)N\), unless otherwise specified. Clearly, at each grid point \(x_{k}\), (1.1) can be written as

$$\begin{aligned} u_{k}^{(4)}=f_{k}. \end{aligned}$$
(2.1)

Let us now define

$$\begin{aligned} &\overline{u}''_{k}= \frac{2}{\eta(1+\eta)h_{k}^{2}} \bigl[u_{k+1} - (1+\eta )u_{k} + \eta u_{k-1} \bigr], \end{aligned}$$
(2.2a)
$$\begin{aligned} &\overline{u}'''_{k}= \frac{6}{\eta^{2}(1+\eta)h_{k}^{3}} \bigl[u_{k+1} -\bigl(1-\eta ^{2} \bigr)u_{k} -\eta^{2} u_{k-1} \bigr]- \frac{6}{\eta h_{k}^{2}}u'_{k}, \end{aligned}$$
(2.2b)
$$\begin{aligned} &\overline{\overline{u}}''_{k}= \frac{1}{\eta(1+\eta)h_{k}} \bigl[u'_{k+1} -\bigl(1- \eta^{2}\bigr)u'_{k} -\eta^{2} u'_{k-1} \bigr], \end{aligned}$$
(2.2c)
$$\begin{aligned} &\overline{\overline{u}}'''_{k}= \frac{2}{\eta(1+\eta)h_{k}^{2}} \bigl[u'_{k+1} - (1+ \eta)u'_{k} + \eta u'_{k-1} \bigr]. \end{aligned}$$
(2.2d)

Expanding each of the equations (2.2a)-(2.2d) using a Taylor series expansion, we obtain the following:

$$\begin{aligned}& \begin{aligned}[b] \overline{u}''_{k}={}&u''_{k}+ \frac{ (\eta-1 )h_{k}}{3}u'''_{k}+ \frac { (1-\eta+\eta^{2} )h_{k}^{2}}{12}u_{k}^{(4)}+\frac{ (-1+\eta-\eta ^{2}+\eta^{3} )h_{k}^{3}}{60}u_{k}^{(5)} \\ &{} +\frac { (1-\eta+\eta^{2}-\eta^{3}+\eta^{4} )h_{k}^{4}}{360}u_{k}^{(6)} \\ &{}+\frac { (-1+\eta-\eta^{2}+\eta^{3}-\eta^{4}+\eta^{5} )h_{k}^{5}}{2{,}520}u_{k}^{(7)}+O\bigl(h_{k}^{6} \bigr), \end{aligned} \end{aligned}$$
(2.3a)
$$\begin{aligned}& \begin{aligned}[b] \overline{u}'''_{k}={}&u'''_{k}+ \frac{(\eta-1)h_{k}}{4}u_{k}^{(4)}+\frac{ (1-\eta+\eta^{2} )h_{k}^{2}}{20}u_{k}^{(5)} \\ &{}+\frac{ (-1+\eta-\eta^{2}+\eta^{3} )h_{k}^{3}}{120}u_{k}^{(6)}+\frac{ (1-\eta+\eta^{2}-\eta^{3}+\eta^{4} )h_{k}^{4}}{840}u_{k}^{(7)}+O \bigl(h_{k}^{5}\bigr), \end{aligned} \end{aligned}$$
(2.3b)
$$\begin{aligned}& \begin{aligned}[b] \overline{\overline{u}}''_{k}={}&u''_{k}+ \frac{\eta h_{k}^{2}}{6}u_{k}^{(4)}+\frac {\eta (\eta-1 )h_{k}^{3}}{24}u_{k}^{(5)}+ \frac{\eta (1-\eta+\eta ^{2} )h_{k}^{4}}{120}u_{k}^{(6)} \\ &{}+ \frac{\eta (-1+\eta-\eta^{2}+\eta^{3} )h_{k}^{5}}{720}u_{k}^{(7)}+O\bigl(h_{k}^{6} \bigr), \end{aligned} \end{aligned}$$
(2.3c)
$$\begin{aligned}& \begin{aligned}[b] \overline{\overline{u}}'''_{k}={}&u'''_{k}+ \frac{ ( \eta-1 ) h_{k}}{3}u_{k}^{(4)}+\frac{ ( 1-\eta+\eta^{2} ) h_{k}^{2}}{12}u_{k}^{(5)}+ \frac{ ( -1+\eta-\eta^{2}+\eta^{3} )h_{k}^{3}}{60}u_{k}^{(6)} \\ &{} +\frac{ ( 1-\eta +\eta^{2}-\eta^{3}+\eta^{4} ) h_{k}^{4}}{360}u_{k}^{(7)}+O\bigl(h_{k}^{5} \bigr). \end{aligned} \end{aligned}$$
(2.3d)

2.1 Second order technique

To discretize the left hand side of (2.1), let us assume

$$\begin{aligned} h_{k}^{4}f_{k}= h_{k}^{4} u_{k}^{(4)} =a_{1} h_{k}^{2} \overline{u}''_{k}+ a_{2} h_{k}^{3} \overline{u}'''_{k}+ a_{3} h_{k}^{2} \overline{\overline{u}}''_{k} + a_{4} h_{k}^{3} \overline{\overline{u}}'''_{k}+T_{k}, \end{aligned}$$
(2.4)

where \(a_{1}, a_{2}, a_{3}, a_{4}\) are parameters to be suitably determined and \(T_{k}\) is the truncation error.

Substituting values from (2.2a)-(2.2d) in (2.4), and further equating to zero the coefficients of \(h_{k}^{2}, h_{k}^{3}, h_{k}^{4}\), and \(h_{k}^{5}\), so as to obtain \(T_{k}=O(h_{k}^{6})\), we get

$$\begin{aligned}& a_{1}=-\frac{48 (1-\eta+\eta^{2} )}{\eta (1+ \eta )^{2}}, \qquad a_{2}=\frac{4 (\eta-1 ) (4+5\eta+4 \eta^{2} )}{\eta (1+\eta )^{2}}, \\& a_{3}=\frac {48 (1-\eta+\eta^{2} )}{\eta (1+\eta )^{2}}, \qquad a_{4}=\frac{36 (1-\eta )}{ (1+\eta )^{2}}. \end{aligned}$$

Since \(f_{k}\) is a function of \(u''_{k}\) and \(u'''_{k}\), we need second order approximations for them. It can be seen from (2.3c) that \(\overline{\overline{u}}''_{k}\) of (2.2c) is a second order approximation to \(u''_{k}\). Further, eliminating the coefficient of \(h_{k}\) from (2.3b) and (2.3d), we obtain the second order approximation to \(u'''_{k}\) given by

$$\begin{aligned} \overline{\overline{\overline{u}}}'''_{k}={}& \frac{24}{\eta^{2} (1+\eta ) h_{k}^{3}} \bigl[u_{k+1}- \bigl(1-\eta^{2} \bigr)u_{k} -\eta^{2} u_{k-1} \bigr] \\ &{}-\frac{6}{\eta (1+\eta ) h_{k}^{2}} \bigl[u'_{k+1}+3 (1+\eta ) u'_{k} +\eta u'_{k-1} \bigr]. \end{aligned}$$
(2.5)

Now, define

$$\begin{aligned} \overline{f}_{k}=f\bigl(x_{k},u_{k},u'_{k}, \overline{\overline{u}}''_{k},\overline { \overline{\overline{u}}}'''_{k} \bigr). \end{aligned}$$
(2.6)

Thus, we obtain the discretization

$$\begin{aligned} &{-}\frac{48 (1-\eta+\eta^{2} )}{h_{k}^{2} \eta (1+ \eta )^{2}} \overline{u}''_{k}+ \frac{4 (\eta-1 ) (4+5\eta+4 \eta^{2} )}{h_{k} \eta (1+\eta )^{2}} \overline {u}'''_{k}+ \frac{48 (1-\eta+\eta^{2} )}{h_{k}^{2} \eta (1+\eta )^{2}} \overline{\overline{u}}''_{k} + \frac{36 (1-\eta )}{h_{k} (1+\eta )^{2}} \overline{\overline{u}}'''_{k} \\ &\quad=\overline{f}_{k}+\overline{T}_{k}, \end{aligned}$$
(2.7a)

where \(\overline{T}_{k}=O(h_{k}^{2})\).

Further, eliminating \(u'''_{k}\) from (2.3b) and (2.3d), and using (2.2b) and (2.2d), we obtain

$$\begin{aligned} 3 \bigl[u_{k+1}- \bigl(1-\eta^{2} \bigr)u_{k}- \eta^{2} u_{k-1} \bigr]-\eta h_{k} \bigl[u'_{k+1}+2 (1+\eta )u'_{k}+ \eta u'_{k-1} \bigr]=O\bigl(h_{k}^{4} \bigr). \end{aligned}$$
(2.7b)

Varying k over internal grid points 1 to N, equations (2.7a) and (2.7b) together form a system of 2N equations in 2N unknowns viz. \(u_{1}, u_{2},\dots,u_{N},u'_{1},u'_{2},\dots,u'_{N}\), and hence can be solved for a unique solution. We observe that for the uniform mesh case, i.e. when \(\eta=1\), the discretization (2.7a)-(2.7b) retains its order of accuracy.

2.2 Third order technique

To obtain the third order discretization to (1.1), let us consider for each k:

$$\begin{aligned} h_{k}^{4} \bigl( f_{k}+h_{k}^{2} \alpha f''_{k} \bigr)&= h_{k}^{4}u_{k}^{(4)}+\alpha h_{k}^{6} u_{k}^{(6)} \\ &=b_{1} h_{k}^{2} \overline{u}''_{k}+ b_{2} h_{k}^{3} \overline{u}'''_{k}+ b_{3} h_{k}^{2} \overline{\overline{u}}''_{k} + b_{4} h_{k}^{3} \overline{\overline{u}}'''_{k}+T_{k}^{(1)}, \end{aligned}$$
(2.8)

where \(\alpha, b_{1}, b_{2}, b_{3}\), and \(b_{4}\) are the parameters to be suitably determined, and \(T_{k}^{(1)}\) is the truncation error. Proceeding in a similar manner to the case of the second order technique, using equations (2.3a)-(2.3d), we obtain the following values of parameters consistent with \(T_{k}^{(1)}=O(h_{k}^{7})\):

$$ \begin{aligned} &b_{1}=-\frac{48 (1-\eta+\eta^{2} )}{\eta (1+ \eta )^{2}}, \quad b_{2}=\frac{4 (\eta-1 ) (4+5\eta+4 \eta^{2} )}{\eta (1+\eta )^{2}}, \quad b_{3}=\frac{48 (1-\eta+\eta^{2} )}{\eta (1+\eta )^{2}}, \\ &b_{4}=\frac{36 (1-\eta )}{ (1+\eta )^{2}}, \quad \mbox{and} \quad \alpha= \frac {-1+4 \eta-\eta^{2}}{30}. \end{aligned} $$
(2.9)

Also, simply using the Taylor series expansions, it is easy to obtain

$$\begin{aligned} f''_{k}=\frac{8}{\eta (1+\eta ) h_{k}^{2}} \bigl[f_{k+\frac{1}{2}} - (1+\eta ) f_{k} + \eta f_{k-\frac{1}{2}} \bigr] +O(h_{k}). \end{aligned}$$
(2.10)

Using equations (2.9) and (2.10) in (2.8), we obtain

$$\begin{aligned} &{-}\frac{48h_{k}^{2} (1-\eta+\eta^{2} )}{ \eta (1+ \eta )^{2}} \overline{u}''_{k} + \frac{4 h_{k}^{3} (\eta-1 ) (4+5\eta+4 \eta^{2} )}{ \eta (1+\eta )^{2}} \overline {u}'''_{k} \\ &\qquad{}+ \frac{48h_{k}^{2} (1-\eta+\eta^{2} )}{ \eta (1+\eta )^{2}} \overline{\overline{u}}''_{k} + \frac{36h_{k}^{3} (1-\eta )}{ (1+\eta )^{2}} \overline{\overline{u}}'''_{k} \\ &\quad= h_{k}^{4} \biggl[ \frac{ ( 4-\eta+4 \eta^{2} )}{15 \eta} f_{k} + \frac{4 ( -1+4 \eta-\eta^{2} )}{15 \eta (1+\eta )} (f_{k+\frac{1}{2}}+\eta f_{k-\frac{1}{2}} ) \biggr] +O\bigl(h_{k}^{7}\bigr). \end{aligned}$$
(2.11)

Now, eliminating \(u'''_{k}\) from equations (2.3b) and (2.3d), we obtain

$$\begin{aligned} &\frac{2}{\eta ( 1+\eta )h_{k}^{3}} \biggl[ -\frac {3}{\eta} \bigl( u_{k+1}- \bigl(1-\eta^{2} \bigr)u_{k}-\eta^{2} u_{k-1} \bigr) + h_{k} \bigl(u'_{k+1}+2 (1+ \eta )u'_{k}+\eta u'_{k-1} \bigr) \biggr] \\ &\quad= \frac{(\eta-1)h_{k}}{12}f_{k}+\frac{(1-\eta+\eta ^{2})h_{k}^{2}}{30}f'_{k}+O \bigl(h_{k}^{3}\bigr). \end{aligned}$$
(2.12)

Again, with the Taylor series expansions, it is easy to obtain

$$\begin{aligned} f'_{k}=\frac{2}{h_{k} \eta(1+\eta)} \bigl[ f_{k+\frac{1}{2}}- \bigl(1-\eta ^{2}\bigr)f_{k}-\eta^{2} f_{k-\frac{1}{2}} \bigr]+O\bigl(h_{k}^{2}\bigr). \end{aligned}$$
(2.13)

Using equation (2.13) in (2.12), we obtain the following:

$$\begin{aligned} &\frac{2}{\eta(1+\eta)h_{k}^{3}} \biggl[-\frac{3}{\eta} \bigl(u_{k+1}-\bigl(1-\eta^{2}\bigr)u_{k}- \eta^{2} u_{k-1} \bigr)+h_{k} \bigl(u'_{k+1}+2(1+ \eta)u'_{k}+\eta u'_{k-1} \bigr) \biggr] \\ &\quad= \frac{(\eta-1)(4 \eta^{2}+\eta+4)h_{k}}{60 \eta}f_{k}+\frac{(\eta^{2}-\eta +1)h_{k}}{15 \eta(1+\eta)} \bigl(f_{k+\frac{1}{2}}-\eta^{2} f_{k-\frac {1}{2}} \bigr)+O \bigl(h_{k}^{3}\bigr). \end{aligned}$$
(2.14)

Let us now define

$$\begin{aligned} &\hat{u}_{k+\frac{1}{2}}=u_{k}+\frac{\eta h_{k}}{2}u'_{k}+ \frac{\eta^{2} h_{k}^{2}}{8} \overline{\overline{u}}''_{k}, \end{aligned}$$
(2.15a)
$$\begin{aligned} &\hat{u}_{k-\frac{1}{2}}=u_{k}-\frac{h_{k}}{2}u'_{k}+ \frac{h_{k}^{2}}{8} \overline {\overline{u}}''_{k}, \end{aligned}$$
(2.15b)
$$\begin{aligned} &\hat{u}'_{k+\frac{1}{2}}=u'_{k}+ \frac{\eta h_{k}}{2} \overline{\overline {u}}''_{k}+ \frac{\eta^{2} h_{k}^{2}}{8} \overline{\overline{u}}'''_{k}, \end{aligned}$$
(2.15c)
$$\begin{aligned} &\hat{u}'_{k-\frac{1}{2}}=u'_{k}- \frac{h_{k}}{2}\overline{\overline {u}}''_{k}+ \frac{h_{k}^{2}}{8}\overline{\overline{u}}'''_{k}. \end{aligned}$$
(2.15d)

Using Taylor series expansions, it can easily be observed that (2.15a)-(2.15d) are \(O(h_{k}^{3})\) approximations.

We now aim to find third order approximation for \(u'''_{k+\frac {1}{2}}\). For this purpose, let us consider

$$ \begin{aligned}[b] u'''_{k+\frac{1}{2}}&=u'''_{k}+ \frac{\eta h_{k}}{2} u_{k}^{(4)}+\frac{\eta^{2} h_{k}^{2}}{8} u_{k}^{(5)}+O\bigl(h_{k}^{3}\bigr) \\ &= \frac{1}{h_{k}} \bigl[ c_{1} \overline{u}''_{k} + h_{k} c_{2} \overline {u}'''_{k} +c_{3} \overline{\overline{u}}''_{k}+ h_{k} c_{4} \overline{\overline {u}}'''_{k} \bigr]+{T}_{k}^{(2)}, \end{aligned} $$
(2.16)

where \(c_{1}, c_{2}, c_{3}\), and \(c_{4}\) are parameters to be determined, and \(T_{k}^{(2)}\) is the truncation error. Substituting values from (2.3a)-(2.3d), the values of the parameters so obtained, such that \({T}_{k}^{(2)}=O(h_{k}^{3})\), are as follows:

$$\begin{aligned}& c_{1}=-\frac{3 (2+4\eta+\eta^{2} +\eta^{3} )}{\eta ( 1+\eta )^{2}}, \qquad c_{2}=\frac{-2-4\eta-\eta^{2}+\eta^{3}+\eta^{4}}{\eta ( 1+\eta )^{2}}, \\& c_{3}=\frac{3 (2+4\eta+\eta^{2} +\eta ^{3} )}{\eta ( 1+\eta )^{2}}, \qquad c_{4}=\frac{3 (1+2\eta )}{ ( 1+\eta )^{2}}. \end{aligned}$$

Thus, we define the third order approximation:

$$\begin{aligned} \hat{u}'''_{k+\frac{1}{2}}={}& {-}\frac{3 (2+4\eta+\eta^{2} +\eta^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{u}''_{k} + \frac{ (-2-4\eta-\eta^{2}+\eta^{3}+\eta^{4} )}{\eta ( 1+\eta )^{2}} \overline{u}'''_{k} \\ &{} +\frac{3 (2+4\eta+\eta^{2} +\eta^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{\overline{u}}''_{k}+ \frac{3 (1+2\eta )}{ ( 1+\eta )^{2}} \overline {\overline{u}}'''_{k} \\ ={}& u'''_{k+\frac{1}{2}}+O \bigl(h_{k}^{3}\bigr). \end{aligned}$$
(2.17a)

In a similar manner to above, we find the following third order approximations:

$$\begin{aligned} \hat{u}'''_{k-\frac{1}{2}} ={}& \frac{3 (1+\eta+4 \eta^{2} +2 \eta^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{u}''_{k} + \frac{ ( 1+\eta-\eta^{2}-4\eta ^{3}-2\eta^{4} )}{\eta ( 1+\eta )^{2}} \overline{u}'''_{k} \\ &{}-\frac{3 (1+\eta+4\eta^{2} +2 \eta^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{\overline{u}}''_{k}+ \frac{3 \eta (2+\eta )}{ ( 1+\eta )^{2}} \overline{\overline{u}}'''_{k} \\ ={}& u'''_{k-\frac{1}{2}}+O \bigl(h_{k}^{3}\bigr), \end{aligned}$$
(2.17b)
$$\begin{aligned} \hat{\hat{u}}'''_{k}={}& \frac{6 (-1+2 \eta-2 \eta^{2} + \eta ^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{u}''_{k} - \frac {2 (1-2 \eta-3 \eta^{2}-2 \eta^{3}+\eta^{4} )}{\eta ( 1+\eta )^{2}} \overline{u}'''_{k} \\ &{} -\frac{6 (-1+2 \eta-2 \eta^{2} + \eta^{3} )}{h_{k} \eta ( 1+\eta )^{2}} \overline{\overline {u}}''_{k}+ \frac{3 (1-4\eta+\eta^{2} )}{ ( 1+\eta )^{2}} \overline{\overline{u}}'''_{k} \\ ={}&u'''_{k}+O \bigl(h_{k}^{3}\bigr). \end{aligned}$$
(2.17c)

Now, for finding third order approximation to \(u''_{k+\frac{1}{2}}\), let us consider

$$\begin{aligned} u''_{k+\frac{1}{2}}&=u''_{k}+ \frac{\eta h_{k}}{2}u'''_{k}+ \frac{\eta ^{2} h_{k}^{2}}{8}u_{k}^{(4)}+O\bigl(h_{k}^{3} \bigr) =d_{1} \overline{u}''_{k}+d_{2} h_{k} \overline{u}'''_{k}+d_{3} \overline{\overline {u}}''_{k}+T_{k}^{(3)}, \end{aligned}$$
(2.18)

where \(d_{1}, d_{2}\), and \(d_{3}\) are the parameters to be determined, and \(T_{k}^{(3)}\) is the truncation error. Substituting values from (2.3a)-(2.3c) in (2.18), and comparing the coefficients of \(h_{k}\) and \(h_{k}^{2}\) so as to induce \(T_{k}^{(3)}=O(h_{k}^{3})\), we obtain

$$d_{1}=\frac{1}{2}, \qquad d_{2}=\frac {1+2\eta}{6}, \qquad d_{3}=\frac{1}{2}. $$

Thus, we define the \(O(h_{k}^{3})\) approximation to \(u''_{k+\frac{1}{2}}\) as follows:

$$\begin{aligned} \hat{u}''_{k+\frac{1}{2}}&= \frac{1}{2} \overline{u}''_{k}+ \frac {(1+2\eta)}{6} h_{k} \overline{u}'''_{k}+ \frac{1}{2} \overline{\overline {u}}''_{k} \\ &=u''_{k+\frac{1}{2}}+O\bigl(h_{k}^{3} \bigr). \end{aligned}$$
(2.19a)

With the same approach as above, we define the following third order approximations:

$$\begin{aligned}& \begin{aligned}[b] \hat{u}''_{k-\frac{1}{2}}&= \frac{1}{2} \overline{u}''_{k}- \frac {(2+\eta)}{6} h_{k} \overline{u}'''_{k}+ \frac{1}{2} \overline{\overline {u}}''_{k} \\ &= u''_{k-\frac{1}{2}}+O\bigl(h_{k}^{3} \bigr), \end{aligned} \end{aligned}$$
(2.19b)
$$\begin{aligned}& \begin{aligned}[b] \hat{\hat{u}}''_{k}&=2 \overline{u}''_{k}+\frac{2(1-\eta)}{3} h_{k} \overline{u}'''_{k}- \overline{\overline{u}}''_{k}\\ &=u''_{k}+O\bigl(h_{k}^{3} \bigr). \end{aligned} \end{aligned}$$
(2.19c)

Now, define

$$\begin{aligned} &\hat{f}_{k+\frac{1}{2}}=f \bigl( x_{k+\frac{1}{2}}, \hat{u}_{k+\frac {1}{2}},\hat{u}'_{k+\frac{1}{2}},\hat{u}''_{k+\frac{1}{2}}, \hat {u}'''_{k+\frac{1}{2}} \bigr), \end{aligned}$$
(2.20a)
$$\begin{aligned} &\hat{f}_{k-\frac{1}{2}}=f \bigl( x_{k-\frac{1}{2}}, \hat{u}_{k-\frac {1}{2}},\hat{u}'_{k-\frac{1}{2}},\hat{u}''_{k-\frac{1}{2}}, \hat {u}'''_{k-\frac{1}{2}} \bigr), \end{aligned}$$
(2.20b)
$$\begin{aligned} &\hat{\hat{f}}_{k}=f \bigl( x_{k},u_{k},u'_{k}, \hat{\hat{u}}''_{k},\hat { \hat{u}}'''_{k} \bigr). \end{aligned}$$
(2.20c)

Then we claim that the third order discretization to equation (1.1), subject to the conditions (1.2), is given by

$$\begin{aligned} &{-}\frac{48 (1-\eta+\eta^{2} )}{h_{k}^{2} \eta (1+ \eta )^{2}} \overline{u}''_{k} + \frac{4 (\eta-1 ) (4+5\eta+4 \eta^{2} )}{h_{k} \eta (1+\eta )^{2}} \overline {u}'''_{k} \\ &\qquad{}+ \frac{48 (1-\eta+\eta^{2} )}{h_{k}^{2} \eta (1+\eta )^{2}} \overline{\overline{u}}''_{k} + \frac{36 (1-\eta )}{ h_{k} (1+\eta )^{2}} \overline{\overline{u}}'''_{k} \\ &\quad= \frac{ ( 4-\eta+4 \eta^{2} )}{15 \eta} \hat{\hat{f}}_{k} + \frac {4 ( -1+4 \eta-\eta^{2} )}{15 \eta (1+\eta )} ( \hat{f}_{k+\frac{1}{2}}+\eta\hat{f}_{k-\frac{1}{2}} ) +{\overline{T}}^{(1)}_{k}, \end{aligned}$$
(2.21a)
$$\begin{aligned} &\frac{2}{\eta(1+\eta)h_{k}^{3}} \biggl[-\frac{3}{\eta} \bigl(u_{k+1}-\bigl(1-\eta^{2}\bigr)u_{k}- \eta^{2} u_{k-1} \bigr)+h_{k} \bigl(u'_{k+1}+2(1+ \eta)u'_{k}+\eta u'_{k-1} \bigr) \biggr] \\ &\quad= \frac{(\eta-1)(4 \eta^{2}+\eta+4)h_{k}}{60 \eta}\hat{\hat{f}}_{k}+\frac {(\eta^{2}-\eta+1)h_{k}}{15 \eta(1+\eta)} \bigl( \hat{f}_{k+\frac{1}{2}}-\eta ^{2} \hat{f}_{k-\frac{1}{2}} \bigr)+{ \overline{T}}_{k}^{(2)}, \end{aligned}$$
(2.21b)

where \({\overline{T}}_{k}^{(1)}=O(h_{k}^{3})\) and \({\overline {T}}_{k}^{(2)}=O(h_{k}^{3})\).

To verify this, we observe that by the Taylor series expansions in (2.20a)-(2.20c) and using equations (2.15a)-(2.15d), (2.17a)-(2.17c), and (2.19a)-(2.19c), we get

$$\begin{aligned} &\hat{f}_{k+\frac{1}{2}}=f_{k+\frac{1}{2}}+O\bigl(h_{k}^{3} \bigr), \end{aligned}$$
(2.22a)
$$\begin{aligned} &\hat{f}_{k-\frac{1}{2}}=f_{k-\frac{1}{2}}+O\bigl(h_{k}^{3} \bigr), \end{aligned}$$
(2.22b)
$$\begin{aligned} &\hat{\hat{f}}_{k}=f_{k}+O \bigl(h_{k}^{3}\bigr). \end{aligned}$$
(2.22c)

Substituting values from (2.22a)-(2.22c) in (2.21a), and further using (2.11), we obtain \({\overline{T}}_{k}^{(1)}=O(h_{k}^{3})\). Similarly, using equations (2.22a)-(2.22c) in (2.21b), from (2.14), we obtain \(\overline{T}_{k}^{(2)}=O(h_{k}^{3})\). It is easily observable that upon setting \(\eta=1\), the mesh becomes uniform, and the discretization (2.21a)-(2.21b) reduces to fourth order. Note that upon varying \(k=1(1)N\), equations (2.21a)-(2.21b) form a system of 2N equations in 2N unknowns viz. \(u_{1}, u_{2}, \dots, u_{N}, u'_{1}, u'_{2},\dots,u'_{N}\).

The system of 2N equations so obtained in both the second and the third order methods is easily solvable by numerical techniques, as discussed in Section 4.

3 Convergence and stability analysis

3.1 Convergence analysis

Let us consider a simple counterpart of the problem (1.1):

$$\begin{aligned} u^{(4)}(x) = f(x), \quad 0< x< 1, \end{aligned}$$
(3.1)

subject to the boundary conditions:

$$ \begin{aligned} &u(0) = A_{0}, \qquad u(1) = A_{1}, \\ &u'(0) = B_{0},\qquad u'(1) = B_{1}. \end{aligned} $$
(3.2)

On setting the parameter \(\eta=1\), the discretization (2.21a)-(2.21b) reduces to fourth order finite difference scheme. Applying this scheme on the model problem (3.1)-(3.2), we obtain

$$\begin{aligned}& \begin{aligned}[b] &(u_{k-1} - 2u_{k} + u_{k+1} ) + \frac{h}{2} \bigl(u'_{k-1} - u'_{k+1} \bigr) \\ &\quad= \frac{-h^{4}}{90} ( 4{f}_{k+\frac{1}{2}} + 4{f}_{k-\frac{1}{2}} + 7 {f}_{k} )+T_{k}^{(1)}, \end{aligned} \end{aligned}$$
(3.3a)
$$\begin{aligned}& \begin{aligned}[b] &\frac{3}{h} (u_{k-1} - u_{k+1} ) + \bigl(u'_{k-1} + 4u'_{k} + u'_{k+1} \bigr) \\ &\quad= \frac{h^{3}}{30} ( {f}_{k+\frac{1}{2}} - {f}_{k-\frac{1}{2}} )+T_{k}^{(2)}, \end{aligned} \end{aligned}$$
(3.3b)

where \(k=1(1)N\), h is the uniform step-size, and \(T_{k}^{(1)}\) and \(T_{k}^{(2)}\) are the truncation errors of \(O(h^{4})\).

Denote by \(\boldsymbol {P} =[1,0,1]\), \(\boldsymbol {L}=[1,1,1]\), and \(\boldsymbol {M} = [1,0,-1]\) the \(N \times N\) tridiagonal matrices. Then the system of equations (3.3a)-(3.3b) can be reformulated in matrix form:

$$\begin{aligned} \begin{bmatrix} (\boldsymbol {L}-3\boldsymbol {I}) & \frac{h}{2}\boldsymbol {M} \\ \frac{3}{h}\boldsymbol {M} & (\boldsymbol {L}+3\boldsymbol {I}) \end{bmatrix} \begin{bmatrix} \boldsymbol {u} \\ \boldsymbol {u}' \end{bmatrix}= \begin{bmatrix} \boldsymbol {d1} \\ \boldsymbol {d2} \end{bmatrix} +\begin{bmatrix} \boldsymbol {T^{(1)}} \\ \boldsymbol {T^{(2)}} \end{bmatrix}, \end{aligned}$$

where \(\boldsymbol {u} =[u_{1},u_{2},\dots,u_{N}]^{t} \) and \(\boldsymbol {u}' = [u'_{1},u'_{2},\dots,u'_{N}]^{t} \) are N-dimensional solution vectors, d 1 and d 2 are vectors with right side functions along with boundary conditions as components, \(\boldsymbol {T^{(1)}}\) and \(\boldsymbol {T^{(2)}}\) are the truncation error vectors and I is the identity matrix. Assuming U and \(\boldsymbol {U}'\) to be the approximate solution vectors corresponding to u and \(\boldsymbol {u'}\), respectively, the modified block successive over relaxation (BSOR) method for the scheme (3.3a)-(3.3b) is given by (see [32])

$$\begin{aligned}& \boldsymbol {U}^{(n+1)} = \frac{-\omega_{1} h}{2} (\boldsymbol {L}-3\boldsymbol {I})^{-1} \boldsymbol {M} \boldsymbol {U}^{\prime(n)} + (1-\omega_{1}) \boldsymbol {U}^{(n)} + \omega_{1} (\boldsymbol {L}-3\boldsymbol {I})^{-1} \boldsymbol {d1}, \end{aligned}$$
(3.4a)
$$\begin{aligned}& \boldsymbol {U}^{\prime(n+1)} = \frac{-3\omega_{2} }{h} (\boldsymbol {L}+3 \boldsymbol {I})^{-1}\boldsymbol {M} \boldsymbol {U}^{(n)} + (1-\omega _{2})\boldsymbol {U}^{\prime(n)} + \omega_{2} ( \boldsymbol {L}+3\boldsymbol {I})^{-1} \boldsymbol {d2}, \end{aligned}$$
(3.4b)

where \(n=0,1,2,3, \ldots\) , refers to the iteration number, and \(\omega _{1}\) and \(\omega_{2}\) are the relaxation parameters.

The associated SOR iteration matrix of (3.4a)-(3.4b) is given by

$$\begin{aligned} \boldsymbol {S} = \begin{bmatrix} (1-\omega_{1})\boldsymbol {I} & \frac{-\omega_{1} h}{2}(\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M} \\ \frac{-3\omega_{2}}{h}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M} & (1-\omega_{1})\boldsymbol {I} \end{bmatrix}. \end{aligned}$$

The associated Jacobi iteration matrix is given by

$$\begin{aligned} \boldsymbol {J} = \begin{bmatrix} 0 & \frac{- h}{2}(\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M} \\ \frac{-3}{h}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M} & 0 \end{bmatrix}. \end{aligned}$$

From the SOR theory [32], we know that if θ is an eigenvalue of J, then λ is an eigenvalue of S, where they are related by the following equation:

$$\begin{aligned} (\lambda+\omega_{1}-1) (\lambda+\omega_{2}-1) = \omega_{1} \omega_{2} \lambda \theta^{2}. \end{aligned}$$

To evaluate the value of θ, we let \(\bigl [{\scriptsize\begin{matrix}{} \boldsymbol {v}_{1} \cr \boldsymbol {v}_{2} \end{matrix}} \bigr ]\) be a partitioned eigenvector of J. Then we have

$$\begin{aligned}& \frac{- h}{2}(\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M} \boldsymbol {v}_{2} = \theta\boldsymbol {v}_{1}, \\& \frac{-3}{h}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M} \boldsymbol {v}_{1} = \theta\boldsymbol {v}_{2}. \end{aligned}$$

Eliminating \(\boldsymbol {v}_{2} \) from the above two equations, we get

$$\begin{aligned} \frac{3}{2}(\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M}(\boldsymbol {L}+3 \boldsymbol {I})^{-1}\boldsymbol {M}\boldsymbol {v}_{1} = \theta^{2} \boldsymbol {v}_{1}. \end{aligned}$$

The rate of convergence of the BSOR method is dependent on the eigenvalues of the Jacobi matrix J, which in turn are given by

$$\begin{aligned} \frac{3\boldsymbol {\tau}}{2} = \theta^{2}, \end{aligned}$$

τ denoting the eigenvalues of \((\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M} \).

Hence, we determine the optimal parameter \(\omega= \omega_{1} = \omega _{2} \) as

$$\begin{aligned} \omega= \frac{2}{1+\sqrt{1-(\frac{3}{2})\bar{\boldsymbol {\tau}}}}, \end{aligned}$$

where \(\overline{\tau}=S((\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M})\), ‘S’ being the spectral radius.

The convergence factor is given by

$$\begin{aligned} \bar{\lambda} = \omega-1 = \frac{1-\sqrt{1-(\frac{3}{2})\bar {\boldsymbol {\tau}}}}{1+\sqrt{1-(\frac{3}{2})\bar{\boldsymbol {\tau}}}}. \end{aligned}$$

For convergence, we must have \(\vert \bar{\lambda} \vert < 1 \), which gives the range \(0 < \bar{\boldsymbol {\tau}} < \frac{2}{3}\). Thus, we establish the following result.

Theorem 1

The iterative method of the form (3.4a)-(3.4b) for the solution of \(u^{(4)}(x) = f(x) \) converges if \(0 < \bar {\boldsymbol {\tau}} < \frac{2}{3} \), where \(\bar{\boldsymbol {\tau}} = S((\boldsymbol {L}-3\boldsymbol {I})^{-1}\boldsymbol {M}(\boldsymbol {L}+3\boldsymbol {I})^{-1}\boldsymbol {M})\), ‘S’ being the spectral radius, \(\boldsymbol {L} = [1,1,1] \), and \(\boldsymbol {M} = [1,0,-1] \) being the \(N \times N \) tridiagonal matrices, and I being the \(N \times N\) identity matrix.

3.2 Stability analysis

An iterative method for (3.3a)-(3.3b) can be written as

$$\begin{aligned}& \boldsymbol {U}^{(n+1)} = \frac{1}{2}\boldsymbol {PU}^{(n)} + \frac {h}{4} \boldsymbol {MU}^{\prime(n)} + \boldsymbol {r}_{1}, \end{aligned}$$
(3.5a)
$$\begin{aligned}& \boldsymbol {U}^{\prime(n+1)} = \frac{-3}{4h} \boldsymbol {MU}^{(n)} - \frac {1}{4} \boldsymbol {PU}^{\prime(n)} + \boldsymbol {r}_{2}, \end{aligned}$$
(3.5b)

where \(\boldsymbol {U}^{(n)}\) and \(\boldsymbol {U}^{\prime(n)}\) are approximate solution vectors at the nth iteration and \(\boldsymbol {r}_{1} \) and \(\boldsymbol {r}_{2} \) are right hand side vectors consisting of the boundary conditions.

The above iterative method can be written in matrix form:

$$\begin{aligned} \begin{bmatrix} \boldsymbol {U}^{(n+1)} \\ \boldsymbol {U}^{\prime(n+1)} \end{bmatrix} = \boldsymbol {G} \begin{bmatrix} \boldsymbol {U}^{(n)} \\ \boldsymbol {U}^{\prime(n)} \end{bmatrix} + \boldsymbol { R}, \end{aligned}$$

where

$$\begin{aligned} \boldsymbol {G} = \begin{bmatrix} \frac{1}{2}\boldsymbol {P} & \frac{h}{4}\boldsymbol {M} \\ \frac{-3}{4h}\boldsymbol {M} & \frac{-1}{4}\boldsymbol {P} \end{bmatrix} \end{aligned}$$

and

$$\begin{aligned} \boldsymbol {R} = \begin{bmatrix} \boldsymbol {r}_{1} \\ \boldsymbol {r}_{2} \end{bmatrix}. \end{aligned}$$

The eigenvalues of P and M are \(2 \cos (\frac{n\pi}{(N+1)}) \) and \(2 i \cos(\frac{n\pi}{(N+1)})\), respectively, where \(n=1,2,\ldots,N\). The characteristic equation of matrix G is given by

$$\begin{aligned} \operatorname{det} \begin{bmatrix} \frac{1}{2}\boldsymbol {P}-\zeta\boldsymbol {I} & \frac{h}{4}\boldsymbol {M} \\ \frac{-3}{4h}\boldsymbol {M} & \frac{-1}{4}\boldsymbol {P}-\zeta \boldsymbol {I} \end{bmatrix} = 0, \end{aligned}$$

where ζ are the eigenvalues of G given by

$$\begin{aligned} \biggl( \operatorname{det} \biggl[\frac{-1}{4}\boldsymbol {P}- \zeta\boldsymbol {I} \biggr] \biggr) \times \biggl( \operatorname{det} \biggl[ \biggl( \frac{1}{2}\boldsymbol {P}-\zeta\boldsymbol {I} \biggr)+\frac{3}{16} \boldsymbol {M} \biggl( \frac{-1}{4}\boldsymbol {P}-\zeta\boldsymbol {I} \biggr)^{-1} \biggr] \biggr)=0. \end{aligned}$$
(3.6)

The proposed iterative method (3.5a)-(3.5b) is stable, if maximum absolute eigenvalues of the iteration matrix are less than or equal to 1. It has been verified computationally that all the eigenvalues are less than 1. Hence, the scheme is stable.

4 Numerical illustrations

For the uniform mesh case, we know that the step size h is equal to \(\frac{1}{(N+1)}\), thereby giving \(O(h)=O(N^{-1})\). However, for the quasi-variable mesh case, we need to appropriately chose the parameter so as to retain the claimed order of convergence as the number of intervals are varied, taking also into account the region of boundary layer, if any. As discussed in Section 2, if \(h_{1}, h_{2}, \ldots, h_{N+1}\) are the step-sizes over the \(N+1\) sub-intervals of the domain \([0,1]\), then let

$$\begin{aligned} H_{\max}=\max_{1 \leq k \leq N+1}h_{k}. \end{aligned}$$
(4.1)

Let us choose, without loss of generality, \(\eta>1\). Then it is easy to observe the following:

$$\begin{aligned} H_{\max} &= h_{N+1} \\ & = \eta^{N} h_{1} \\ &\leq \frac{\eta^{N}}{(N+1)} \\ & < \frac{\eta^{N}}{N} . \end{aligned}$$
(4.2)

Thus, if we fix \(C=\eta^{N}\) to be a constant, then we obtain \(H_{\max} < C/N\). Further, let \(\mathbf{h}= \lbrace h_{k} \rbrace _{k=1}^{N+1}\). Then

$$\begin{aligned} \|\mathbf{h}\|_{\infty}&=H_{\max} < C/N. \end{aligned}$$
(4.3)

Hence, \(O(\mathbf{h})=O(N^{-1})\) in the maximum absolute norm. Similarly, in the sense of the root mean square norm, we have

$$\begin{aligned} \|\mathbf{h}\|_{2}&=\sqrt{\sum_{k=1}^{N+1} \frac{h_{k}^{2}}{(N+1)}} \\ &\leq \frac{1}{\sqrt{N+1}} \sqrt{(N+1) H_{\max}^{2}} \\ &= h_{N+1} \\ &= \eta^{N} h_{1} \\ &\leq \eta^{N} /(N+1) \\ &= C/(N+1) \\ &< C/N, \end{aligned}$$
(4.4)

where \(C=\eta^{N}\) is a constant.

In a similar manner to above, it can be verified that if \(\eta<1\), then \(\|\mathbf{h}\|_{\infty} \leq1/CN\) and \(\|\mathbf{h}\|_{2} \leq 1/CN\), where \(C=\eta^{N}\) is taken as a constant. Thus, upon defining η as a function of N, we are able to retain the order of accuracy upon varying N. It is to be noted that the choice of constant C needs to be compatible with the range of η, which in turn needs to be chosen so as to have a finer grid in the region of boundary layer. For \(\eta>1\), the mesh will be finer near \(x=0\), and coarser on the other side, while for \(\eta<1\), the mesh will be finer near \(x=1\), and coarser on the other side. If the boundary layer appears on both sides, the domain can be decomposed into two equal parts, and η be chosen less than 1 on first half, and greater than 1 on the second half of the domain. Then the method vice versa should be followed in the case an interior layer appears in the middle. In the case of a uniform mesh, \(C=\eta=1\).

We have tested our numerical methods on five linear and two non-linear problems. The right hand side functions and the boundary conditions can be determined from the exact solution. All the numerical computations are performed using double arithmetic. The iterations were stopped once the error tolerance ≤10−12 was achieved. The numerical results support the theoretical order of accuracy of our methods.

Problem 1

Solve (see [17])

$$\begin{aligned} u^{(4)}(x) = (1+K)u''(x)-K u(x) + \frac{1}{2} x^{2} - 1, \quad 0< x< 1. \end{aligned}$$
(4.5)

Here, K is a constant. The exact solution for this problem is given by

$$\begin{aligned} u(x) = 1 + \frac{1}{2} x^{2} + \sinh(x). \end{aligned}$$

Tables 1 and 2 illustrate the absolute errors so obtained using our second and fourth order methods, respectively, over a uniform mesh. We obtain successful results for value of K as large as 106. The tables also draw a comparison between the proposed results and the results of [17]. It is observed that on one hand, for large value of K, the accuracy of the numerical results of [17] deteriorates as the value of x increases from 0 to 1, our methods are unaffected by the same. The proposed results are clearly better than that of [17]. Figure 1(a) and (b) provide the plots of absolute error vs. x and Figure 1(c) depicts a comparison of the exact and numerical solutions so obtained with the fourth order technique.

Figure 1
figure 1

Problem 1 with \(\pmb{{K=10^{6}}}\) and \(\pmb{{C=1}}\) using ( 2.21a )-( 2.21b ).

Table 1 Problem 1 : Absolute errors with \(\pmb{C=1}\)
Table 2 Problem 1 : Absolute errors with \(\pmb{C=1}\)

Problem 2

Solve

$$\begin{aligned} -\epsilon u^{4}(x)+u(x) ={}& {-}\epsilon\bigl(\sin(\epsilon x) \bigl(1{,}680 x^{4} - 12{,}096 x^{5} + 30{,}240 x^{6} - 31{,}680 x^{7} \\ &{}+ 11{,}880 x^{8} - 336 \epsilon^{2} x^{6} (x-1)^{4} \\ &{}-384 \epsilon^{2} x^{7} (x-1)^{3} -72 \epsilon^{2} x^{8} (x-1)^{2} + \epsilon^{4} x^{8} (x-1)^{4} \bigr) \\ &{}+ \cos(\epsilon x) \bigl(48 \epsilon x^{8} (2x-2) \\ &{} + 1{,}344 \epsilon x^{5} (x-1)^{4} + 2{,}688 \epsilon x^{6} (x-1)^{3} + 1{,}152 \epsilon x^{7} (x-1)^{2} \\ &{}- 32 \epsilon^{3} x^{7} (x-1)^{4} - 16 \epsilon ^{3} x^{8} (x-1)^{3}\bigr) \bigr) \\ &{}+ x^{8} \sin( \epsilon x ) (x-1)^{4}, \quad 0< x< 1. \end{aligned}$$
(4.6)

The exact solution is given by

$$\begin{aligned} u(x) = x^{8} (x-1)^{4} \sin( \epsilon x ). \end{aligned}$$

The maximum absolute errors (MAEs) corresponding to different values of ϵ with a uniform mesh are tabulated in Table 3, along with a comparison drawn with the results of [21] and [20]. The tables clearly depict a better result with the proposed techniques. A plot of MAE vs. N and exact and numerical solutions vs. x, obtained with the fourth order method, are presented in Figure 2(a) and (b), respectively.

Figure 2
figure 2

Problem 2 with \(\pmb{{\epsilon=1/128}}\) and \(\pmb{{C=1}}\) using ( 2.21a )-( 2.21b ).

Table 3 Problem 2 : MAEs using ( 2.7a )-( 2.7b ) and ( 2.21a )-( 2.21b ) with \(\pmb{C=1}\)

Problem 3

Solve

$$\begin{aligned} -\frac{1}{\lambda}u^{(4)}(x)+u''(x) = 0, \quad 0< x< 1. \end{aligned}$$
(4.7)

This is a reaction type equation, which arises in beam theory. The exact solution is given by

$$\begin{aligned} u(x) = \frac{\exp(-\sqrt{\lambda}x)-\exp(-\sqrt{\lambda}(1-x))+\sqrt {\lambda} (\exp(-\sqrt{\lambda})+1 )x+\exp(-\sqrt{\lambda})-1}{ \sqrt{\lambda}+ (2+\sqrt{\lambda} )\exp(-\sqrt{\lambda}) -2}. \end{aligned}$$

The MAEs obtained for a range of values of λ, using the second order technique with a uniform mesh are given in Table 4 and that with the fourth order technique are given in Table 6. Using the second and third order quasi-variable mesh methods, the MAEs so obtained are depicted in Tables 5 and 7, respectively. In the quasi-variable mesh case, we have chosen \(C=\sqrt {\lambda}\) for the first half of the domain and \(C=\frac{1}{\sqrt {\lambda}}\) for the rest half. It is observed that while uniform mesh methods fail for high values of λ, the quasi-variable mesh methods are successful. Figure 3 provides the plots using the third order technique.

Figure 3
figure 3

Problem 3 with \(\pmb{{C=\sqrt{\lambda}}}\) for \(\pmb{{0< x<\frac{1}{2}}}\) and \(\pmb{{C=\frac{1}{\sqrt{\lambda}}}}\) for \(\pmb{{\frac {1}{2} \leq x<1}}\) using ( 2.21a )-( 2.21b ).

Table 4 Problem 3 : MAEs using ( 2.7a )-( 2.7b ) with \(\pmb{C=1}\)
Table 5 Problem 3 : MAEs using ( 2.7a )-( 2.7b ) with \(\pmb{C=\sqrt{\lambda}}\) for \(\pmb{0< x<\frac{1}{2}}\) and \(\pmb{C=\frac {1}{\sqrt{\lambda}}}\) for \(\pmb{\frac{1}{2} \leq x <1}\)
Table 6 Problem 3 : MAEs using ( 2.21a )-( 2.21b ) with \(\pmb{C=1}\)
Table 7 Problem 3 : MAEs using ( 2.21a )-( 2.21b ) with \(\pmb{C=\sqrt{\lambda}}\) for \(\pmb{0< x<\frac{1}{2}}\) and \(\pmb{C=\frac {1}{\sqrt{\lambda}}}\) for \(\pmb{\frac{1}{2} \leq x <1}\)

Problem 4

Solve

$$\begin{aligned} \frac{1}{\lambda} u^{(4)}(x)+u'''(x)=0, \quad 0< x< 1. \end{aligned}$$
(4.8)

This is a convection type equation. The exact solution is given by

$$\begin{aligned} u(x) = \frac{2 \exp(-\lambda x) + \lambda ( \exp(-\lambda)-1 ) x^{2} +2 \lambda x -2}{\lambda+ (\lambda+2)\exp(-\lambda) -2}. \end{aligned}$$

The MAEs obtained with a uniform mesh are given in Table 8 using the proposed second order method and in Table 10 using the fourth order method. The MAEs obtained using second order quasi-variable mesh method are shown in Table 9, and that using third order method in Table 11. Here, we have chosen \(C={\lambda}\). It is observed that as λ increases, quasi-variable mesh methods produce successful results while the uniform mesh methods fail. The plots of MAE vs. N and the exact and numerical solutions vs. x with the third order technique are presented in Figure 4(a) and (b), respectively.

Figure 4
figure 4

Problem 4 with \(\pmb{{C=\lambda}}\) and \(\pmb{{\lambda=10^{4}}}\) using ( 2.21a )-( 2.21b ).

Table 8 Problem 4 : MAEs using ( 2.7a )-( 2.7b ) with \(\pmb{C=1}\)
Table 9 Problem 4 : MAEs using ( 2.7a )-( 2.7b ) with \(\pmb{C=\lambda}\)
Table 10 Problem 4 : MAEs using ( 2.21a )-( 2.21b ) with \(\pmb{C=1}\)
Table 11 Problem 4 : MAEs using ( 2.21a )-( 2.21b ) with \(\pmb{C=\lambda}\)

Problem 5

Solve (see [5])

$$\begin{aligned} u^{(4)}(x)-\lambda u(x)u'''(x) = f(x), \quad 0< x< 1. \end{aligned}$$
(4.9)

The exact solution is given by \(u(x) = (1-x^{2})\exp(x) \). The physical significance of this non-linear problem has been discussed in Section 1. The MAEs and the root mean square errors (RMSEs) are tabulated in Tables 12 and 13 using second, and third and fourth order techniques, respectively. When used with a quasi-variable mesh, we have fixed \(C=0.6\) for the second, and \(C=0.7\) for the third order discretization. The tables clearly illustrate the accuracy of our methods. Figure 5 provides a comparative plot of the exact and numerical solutions.

Figure 5
figure 5

Exact and numerical solutions of Problem 5 with 17 nodal points and \(\pmb{{C=0.7}}\) using ( 2.21a )-( 2.21b ).

Table 12 Problem 5 : MAEs and RMSEs using ( 2.7a )-( 2.7b ) with different values of C
Table 13 Problem 5 : MAEs and RMSEs using ( 2.21a )-( 2.21b ) with different values of C

Problem 6

Solve

$$\begin{aligned} \Delta^{2} u(r) \equiv \biggl( \frac{d^{2}}{dr^{2}} + \frac{1}{r} \frac {d}{dr} \biggr)^{2}u(r) = f(r), \quad 0< r< 1, \end{aligned}$$
(4.10)

or, equivalently,

$$\begin{aligned} &u^{(4)}(r) = -\frac{2}{r}u'''(r) + \frac{1}{r^{2}}u''(r) - \frac {1}{r^{3}}u'(r) +f(r), \quad 0< r< 1. \end{aligned}$$

This is a fourth order singular problem in cylindrical polar coordinates. The exact solution is given by \(u(r) = r^{4} \sin(r) \). The MAEs and RMSEs so obtained are tabulated in Table 14 using a uniform mesh and in Table 15 using a quasi-variable mesh. In the case of quasi-variable mesh, we have taken \(C=0.5 \) for the second and \(C=0.6 \) for the third order techniques, respectively. The plots of the exact and numerical solutions and MAE vs. N with the third order method are presented in Figure 6.

Figure 6
figure 6

Problem 6 with \(\pmb{{C=0.6} }\) using ( 2.21a )-( 2.21b ).

Table 14 Problem 6 : MAEs and RMSEs using ( 2.7a )-( 2.7b ) and ( 2.21a )-( 2.21b ) with \(\pmb{C=1}\)
Table 15 Problem 6 : MAEs and RMSEs using ( 2.7a )-( 2.7b ) and ( 2.21a )-( 2.21b )

Problem 7

Solve

$$\begin{aligned} &u^{(4)}(r) = \frac{1}{r} \bigl[u'(r)v''(r)+v'(r)u''(r) \bigr] + f(r),\quad 0< r< 1, \end{aligned}$$
(4.11a)
$$\begin{aligned} &v^{(4)}(r) = -\frac{1}{r}u'(r)u''(r) + g(r),\quad 0< r< 1. \end{aligned}$$
(4.11b)

Theexact solution is given by \(u(r) = \cos(r) \), \(v(r) = \exp(r) \). These coupled non-linear equations represent amodel of equilibrium for a load symmetric about the center (see [35]). With a quasi-variable mesh, we haveused \(C=0.45 \) for the second and \(C=1.1 \) for the third order method. The MAEs and RMSEs obtained with the uniform mesh methods are tabulated in Table 16 and that obtained with quasi-variable mesh methods in Table 17. Comparative plots of the exact and numerical solutions obtained with the third order technique are presented in Figure 7.

Figure 7
figure 7

Problem 7 with \(\pmb{{C=1.1} }\) using ( 2.21a )-( 2.21b ).

Table 16 Problem 7 : MAEs and RMSEs using ( 2.7a )-( 2.7b ) and ( 2.21a )-( 2.21b ) with \(\pmb{C=1}\)
Table 17 Problem 7 : MAEs and RMSEs using ( 2.7a )-( 2.7b ) and ( 2.21a )-( 2.21b )

5 Concluding remarks

In this article, we derived finite difference techniques (2.7a)-(2.7b) of second and (2.21a)-(2.21b) of third order accuracies for the fourth order BVPs of the type (1.1)-(1.2), using a quasi-variable mesh. While the second order method retained its accuracy, the third order method transformed into a fourth order technique, upon setting the parameter \(\eta=1\). Further, we conducted the convergence and stability analysis of the fourth order technique applied to a model problem. We solved seven physical problems, including a singular and a coupled non-linear BVP. The developed methods were directly applicable to problems in polar coordinates. As a by-product of our methods, we obtained the high order approximations to the values of \(u'\) as well, at each grid point. The numerical results confirmed that the proposed quasi-variable mesh schemes yield results of desired accuracies, as theoretically claimed. Also, we observed that while in some cases, for higher values of the perturbation parameter λ, the uniform mesh techniques failed, the quasi-variable mesh techniques still yielded good results. A comparison of the proposed techniques with that of previously developed techniques clearly depicted the superiority of our methods.