Introduction

The first-order system of ODEs are defined as

$$\begin{aligned} \frac{d {\textbf {y}}}{d x}=\psi (x,{\textbf {y}}), \end{aligned}$$
(1)

with starting point

$$\begin{aligned} {\textbf {y}}(0)={\textbf {d}}, \hspace{.2 cm} {\textbf {d}} \in \mathbb {R}^{N}, \end{aligned}$$
(2)

where \(\psi =(\psi _1(x,y_1),\psi _2(x,y_1), \ldots , \psi _n(x,y_N))\) can be linear or non-linear in \({\textbf {y}}\). The first-order non-linear ordinary differential equations (FNODEs) are the underlying equations in various real-world phenomena (see [1,2,3,4,5]) and are at the center of our analysis. FNODEs explain numerous relevant mechanisms, be it analysis of economic growth through Solow models (see [6, 7], the and references therein) or predicting prey-predator population using Lotka-Volterra equations [8, 9] and finally the Riccati equations, having applications in conformal mapping, algebraic geometry, quantum mechanics, etc. (see [10, 11] for further details).

NODEs and FNODEs have been solved using several numerical and semi-analytical methods. The numerical methods include the basic numerical schemes (Euler, Runge–Kutta, multistep methods), Laplace transform-based methods, Galerkin’s method, finite difference method (see [12,13,14,15] and their cited references), finite element method (see [16,17,18,19,20] for details). The most explored semi-analytical methods for solving the NODEs are the Adomian decomposition method (ADM) [21, 22], homotopy methods [23,24,25], variational iteration method (VIM) [26,27,28], Pade approximation [29, 30], Power series method [31], optimized decomposition method (ODM) [21, 32, 33]. In the articles [21, 32], ODM is established as a superior method over other semi-analytical techniques for the ODEs and partial-integro differential equations, respectively. Recently in 2022, Beghami et al. [34] used a new approach based on ODM, called the Laplace optimized decomposition method (LODM), and proved to be very accurate for solving the fractional PDEs. In addition to the fractional PDEs, the authors in [35] solved two integro-partial differential equations using LODM and the results were very promising. Interestingly, LODM was able to provide the closed form solutions. Additionally, the LODM solution was able to predict the higher order moments with excellent accuracy. The use of the Laplace transform in LODM leads to better theoretical error estimates than ODM due to the presence of an extra time-multiplier in the convergence result. By better theoretical error estimates, we mean the lower error values of the LODM solution in comparison to the ODM (see [32, 35] for further details).

Patade et al. [36, 37] have worked in the direction of developing numerical methods based on semi-analytical techniques. They have introduced a numerical method based on the Daftardar-Gejji and Jafari (DJM) method for solving ODEs [36] and Volterra-integro differential equations [37]. Another article [38] focuses on the development of numerical methods based on VIM. This motivates us to develop a numerical method that is based on the newly developed and efficient LODM. Therefore, the objective of this paper is to compute solutions for FNODEs using the coupled trapezoidal scheme and LODM. In addition, the consistency, convergence and stability of the numerical schemes are also investigated. The article includes four test cases of the FNODEs to establish the accuracy of the results obtained using our method. The novelty of the paper is usage of the Laplace transform based LODM method for coupling with the trapezoidal method. In addition, the novelty lies in the development of two numerical schemes with consideration of three and four terms of LODM solution. Additionally, these numerical schemes are compared theoretically as well as numerically.

The rest part of the paper is organized as follows: In Sect. 2, the fundamental idea of LODM is described for the non-linear problems. Further, Sect. 3 discusses the novel numerical method and its detailed convergence as well as the stability analysis. Finally, Sect. 4 deals with the numerical implementation of the developed technique for the equation (1). The results are presented in the form of tables and figures. The final section includes the paper’s conclusions figured out from the implementation of the method.

Laplace Optimized Decomposition Method (LODM)

The general first-order NODE is expressed as:

$$\begin{aligned} {\textbf {L}} [{\textbf {u}}]={\textbf {N}} [{\textbf {u}}]+{\textbf {h}}, \end{aligned}$$
(3)

with the initial condition

$$\begin{aligned} {\textbf {u}}(0)={\textbf {d}}, \end{aligned}$$
(4)

where \({\textbf {L}}\) is linear differential operator \(\frac{d}{d x}\), \({\textbf {N}}\) is non-linear differential operator and \({\textbf {h}}\) is source term. Before proceeding with the explanation of LODM, we shall explain some basic definitions and important details of ODM. also, the Laplace transform and inverse Laplace transform of a function is defined as

$$\begin{aligned} \mathscr {L}(g(x))=G(s)=\int _{0}^{\infty } e^{-s x} g(x) dx \hspace{.3 cm} \text {and} \hspace{.3 cm} \mathscr {L}^{-1}(G(s))=\int _{0}^{\infty } e^{s x} G(s) ds. \end{aligned}$$
(5)

The core idea of ODM for the system of first order ODEs is that we take a linear approximation of the nonlinear functions

$$\begin{aligned} {\textbf {F}}[{\textbf {L}} [{\textbf {u}}], {\textbf {u}}]={\textbf {L}} [{\textbf {u}}]-{\textbf {N}} [{\textbf {u}}], \end{aligned}$$

near the points \({\textbf {d}}\) by using the first-order Taylor series expansion at \(t = 0\) as follows:

$$\begin{aligned} {\textbf {F}}[{\textbf {L}} [{\textbf {u}}], {\textbf {u}}]\approx \frac{\partial {\textbf {F}}}{\partial {\textbf {L}} [{\textbf {u}}]}({\textbf {d}}) {\textbf {L}} [{\textbf {u}}]+ \frac{\partial {\textbf {F}}}{\partial {\textbf {u}}}({\textbf {d}}) {\textbf {u}}. \end{aligned}$$
(6)

The above approximation gives us linear operator \({\textbf {R}}\) defined as \({\textbf {R}}[{\textbf {u}}]={\textbf {R}}[{\textbf {u}}] + {\textbf {C}} {\textbf {u}}\), where the functions \({\textbf {C}}=(C_1, C_2, \ldots C_N)\) are given by

$$\begin{aligned} {\textbf {C}}=\frac{\frac{\partial {\textbf {F}}}{\partial {\textbf {u}}}({\textbf {d}})}{\frac{\partial {\textbf {F}}}{\partial {\textbf {L}} [{\textbf {u}}]}({\textbf {d}})}. \end{aligned}$$
(7)

Applying the Laplace transform in Eq. (3) and using the differentiation property of Laplace transform, we acquire:

$$\begin{aligned} \mathscr {L}[{\textbf {u}}(x)]= \frac{{\textbf {d}}}{s}+\frac{1}{s}\mathscr {L}[{\textbf {N}}[{\textbf { u}}(x)]]+\frac{1}{s}\mathscr {L}[{\textbf {h}}(x)], \end{aligned}$$

which yields

$$\begin{aligned} {\textbf {u}}(x)&=\tilde{{\textbf {N}}} [{\textbf {u}}(x)]+\tilde{{\textbf {h}}}(x), \end{aligned}$$
(8)

where \(\tilde{{\textbf {N}}} [{\textbf {u}}(x)]=\mathscr {L}^{-1} \big [\frac{1}{s}\mathscr {L}[{\textbf {N}} [{\textbf {u}}(x)]\big ]\), \( \tilde{{\textbf {h}}}(x)={\textbf {d}}+\mathscr {L}^{-1} \big [\frac{1}{s}\mathscr {L}[{\textbf {h}} (x)]\big ]\). The LODM provides the following series solution:

$$\begin{aligned} {\textbf {u}}(x)= \sum _{k=0}^{\infty }{} {\textbf {u}}_k(x), \end{aligned}$$
(9)

and the nonlinear terms can be approximtaed using the Adomian polynomials:

$$\begin{aligned} {\textbf {N}} [{\textbf {u}}(x)]=\sum _{k=0}^{\infty }{} {\textbf {A}}_k(x), \end{aligned}$$
(10)

where \({\textbf {A}}_k\), \(k\ge 0\) are referred to as Adomian polynomials, see [21], and can be computed as given below

$$\begin{aligned} {\textbf {A}}_k(x)=\left. \frac{1}{k!}\frac{d^k}{d\theta ^k}\left[ {\textbf {N}}\left( \sum _{i=0}^{k}\theta ^i {\textbf {u}}_i(x)\right) \right] \right| _{\theta =0}. \end{aligned}$$
(11)

The component functions \({\textbf {u}}_k\) are determined with the help of the following iteration formula:

$$\begin{aligned} {\left\{ \begin{array}{ll} \mathscr {L}[{\textbf {u}}_0(x)]&{}=\frac{{\textbf {d}}}{s}+\frac{1}{s}\mathscr {L}[{\textbf {h}}(x)]\\ \mathscr {L}[{\textbf {u}}_1(x)]&{}= \frac{1}{s}\mathscr {L}[{\textbf {A}}_0(x)]\\ \mathscr {L}[{\textbf {u}}_2(x)]&{}= \frac{1}{s}\mathscr {L}[{\textbf {A}}_1(x)+{\textbf {C}} {\textbf {u}}_1(x)]\\ \mathscr {L}[{\textbf {u}}_{k+1}(x)]&{}= \frac{1}{s}\mathscr {L}[{\textbf {A}}_k(x)+{\textbf {C}}({\textbf {u}}_k(x)-{\textbf {u}}_{k-1}(x))], \quad k\ge 2. \end{array}\right. } \end{aligned}$$

Therefore, the required recursive relation is provided by applying the inverse Laplace transform to the above equations:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\textbf {u}}_0(x)&{}=\mathscr {L}^{-1}\bigg [\frac{{\textbf {d}}}{s}+\frac{1}{s}\mathscr {L}[{\textbf {h}}(x)]\bigg ]\\ {\textbf {u}}_1(x)&{}= \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_0(x)]\bigg ]\\ {\textbf {u}}_2(x)&{}= \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_1(x)+{\textbf {C}} {\textbf {u}}_1(x)]\bigg ]\\ {\textbf {u}}_{k+1}(x)&{}= \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_k(x)+{\textbf {C}}({\textbf {u}}_k(x)-{\textbf {u}}_{k-1}(x))]\bigg ], \quad k\ge 2. \end{array}\right. } \end{aligned}$$
(12)

Finally, if \(\sum _{k=0}^{\infty }{} {\textbf {u}}_k(x)\) converges then \({\textbf {u}}(x)= \sum _{k=0}^{\infty }{} {\textbf {u}}_k(x)\) is the solution of the problem (3). Hence:

$$\begin{aligned} {\textbf {u}}(x)=\tilde{{\textbf {h}}}(x)+\mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}\bigg [\sum _{k=0}^{\infty }{} {\textbf {A}}_k(x)\bigg ]\bigg ]. \end{aligned}$$

Numerical Method Based on LODM

In this section, we shall introduce a numerical method based on LODM. In order to proceed, we shall divide the computational interval \([\alpha , \beta ]\) into subintervals \(\alpha =x_0<x_1< \ldots < x_N=\beta \) such that \(\Delta x=x_{i}-x_{i-1}\) for every \(N\ge i \ge 1\). The implicit trapezium formula is given by

$$\begin{aligned} {\textbf {y}}_{i+1}={\textbf {y}}_i+\frac{\Delta x}{2}\bigg (\psi (x_i,{\textbf {y}}_i)+\psi (x_{i+1},{\textbf {y}}_{i+1})\bigg ). \end{aligned}$$
(13)

Comparing the above scheme with the Eq. (8), we obtain

$$\begin{aligned} {\textbf {u}}={\textbf {y}}_{i+1},\tilde{{\textbf {h}}}={\textbf {y}}_i + \frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i), \quad \tilde{{\textbf {N}}} {\textbf {u}}=\frac{\Delta x}{2}\psi (x_{i+1},{\textbf {y}}_{i+1}). \end{aligned}$$
(14)

In order to incorporate LODM into this numerical method, the truncated series solution of three terms, i.e., \(k=2\) is constructed as follows:

$$\begin{aligned} {\textbf {u}}&={\textbf {u}}_0 +{\textbf {u}}_1 +{\textbf {u}}_2={\textbf {u}}_0+ \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_0]\bigg ]+ \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_1+{\textbf {C}} {\textbf {u}}_1]\bigg ]\nonumber \\&={\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0)+[\tilde{{\textbf {N}}}({\textbf {u}}_0+{\textbf {u}}_1)-\tilde{{\textbf {N}}}({\textbf {u}}_0)+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0) ]\nonumber \\&={\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0))+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0). \end{aligned}$$
(15)

Using the Eq. (14) in Eq. (15), one can obtain

$$\begin{aligned} {\textbf {y}}_{i+1}&={\textbf {y}}_i + \frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i)+\tilde{{\textbf {N}}}\bigg [{\textbf {y}}_i+\frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i)+\frac{\Delta x}{2}\psi \bigg (x_{i+1},{\textbf {y}}_{i}\\&\quad +\frac{\Delta x}{2}\psi (x_i,y_i)\bigg )\bigg ]+{\textbf {C}} \bigg [\frac{\Delta x}{2}\psi \bigg (x_{i+1},{\textbf {y}}_{i}+\frac{\Delta x}{2}\psi (x_i,y_i)\bigg )\bigg ]\\&={\textbf {y}}_i + \frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i) + \frac{\Delta x}{2}\psi \bigg (x_{i+1},{\textbf {y}}_i+ \frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i) + \frac{\Delta x}{2}\psi \big (x_{i+1},{\textbf {y}}_i+\frac{\Delta x}{2}\psi (x_i,{\textbf {y}}_i)\big )\bigg )\\&\quad +{\textbf {C}} \bigg [\frac{\Delta x}{2}\psi \bigg (x_{i+1},{\textbf {y}}_{i}+\frac{\Delta x}{2}\psi (x_i,y_i)\bigg )\bigg ], \end{aligned}$$

which gives the numerical scheme as

$$\begin{aligned} \boxed {{\textbf {y}}_{i+1}={\textbf {y}}_i+ \frac{\Delta x}{2} \big ({\textbf {K}}_1+{\textbf {K}}_3\big )+\frac{\Delta x}{2} {\textbf {C}} {\textbf {K}}_2} \end{aligned}$$
(16)

where

$$\begin{aligned} {\textbf {K}}_1=\psi (x_i,{\textbf {y}}_i), \quad {\textbf {K}}_2=\psi \bigg (x_{i+1},{\textbf {y}}_{i}+\frac{\Delta x}{2}{} {\textbf {K}}_1 \bigg ),\quad {\textbf {K}}_3=\psi \bigg (x_{i+1},{\textbf {y}}_i+ \frac{\Delta x}{2}{} {\textbf {K}}_1+\frac{\Delta x}{2} {\textbf {K}}_2\bigg ). \end{aligned}$$

In contrast to this, if the first four terms in the series solution are considered for analysis, then a similar approach leads to

$$\begin{aligned} {\textbf {u}}&={\textbf {u}}_0 +{\textbf {u}}_1 +{\textbf {u}}_2+{\textbf {u}}_3={\textbf {u}}_0+ \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_0]\bigg ]+ \mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_1+{\textbf {C}} {\textbf {u}}_1]\bigg ]\nonumber \\&\quad +\mathscr {L}^{-1}\bigg [\frac{1}{s}\mathscr {L}[{\textbf {A}}_2+{\textbf {C}} ({\textbf {u}}_2-{\textbf {u}}_1)]\bigg ]\nonumber \\&={\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0)+\tilde{{\textbf {N}}}({\textbf {u}}_0+{\textbf {u}}_1)-\tilde{{\textbf {N}}}({\textbf {u}}_0)+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0)+\tilde{{\textbf {N}}}({\textbf {u}}_0+{\textbf {u}}_1+{\textbf {u}}_2)-\tilde{{\textbf {N}}}({\textbf {u}}_0+{\textbf {u}}_1)\nonumber \\&\quad +{\textbf {C}} (\tilde{{\textbf {N}}}({\textbf {u}}_0+{\textbf {u}}_1)-\tilde{{\textbf {N}}}({\textbf {u}}_0)+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0)-\tilde{{\textbf {N}}}({\textbf {u}}_0))\nonumber \\&={\textbf {u}}_0+\tilde{{\textbf {N}}}[{\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0))+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0)]+{\textbf {C}} (\tilde{{\textbf {N}}}({\textbf {u}}_0+\tilde{{\textbf {N}}}({\textbf {u}}_0))-\tilde{{\textbf {N}}}({\textbf {u}}_0)+{\textbf {C}} \tilde{{\textbf {N}}}({\textbf {u}}_0)). \end{aligned}$$
(17)

Again, using Eq. (14) in Eq. (17), it is easy to get

$$\begin{aligned} \boxed {{\textbf {y}}_{i+1}={\textbf {y}}_i+ \frac{\Delta x}{2} \big ({\textbf {K}}_1+{\textbf {K}}_4+{\textbf {C}} {\textbf {K}}_3+({\textbf {C}}^2-{\textbf {C}}){\textbf {K}}_2\big )}, \end{aligned}$$
(18)

where

$$\begin{aligned} {\textbf {K}}_1&=\psi (x_i,{\textbf {y}}_i), \quad {\textbf {K}}_2=\psi \bigg (x_{i+1},{\textbf {y}}_{i}+\frac{\Delta x}{2} {\textbf {K}}_1 \bigg ),\nonumber \\ \quad {\textbf {K}}_3&=\psi \bigg (x_{i+1},{\textbf {y}}_i+ \frac{\Delta x}{2} {\textbf {K}}_1+\frac{\Delta x}{2} {\textbf {K}}_2\bigg ),\nonumber \\ {\textbf {K}}_4&=\psi \bigg (x_{i+1},{\textbf {y}}_i+ \frac{\Delta x}{2} {\textbf {K}}_1+{\textbf {C}} \frac{\Delta x}{2} {\textbf {K}}_2+\frac{\Delta x}{2} {\textbf {K}}_3\bigg ). \end{aligned}$$
(19)

Consistency and Order

Definition 3.1

A scheme is said to be consistent if the local truncation error (LTE)\(:=y (x_i+\Delta x)-y_{i+1}\) tends to zero as \(\Delta x \rightarrow 0\). Furthermore, the scheme is said to be consistent of order p if \(y (x_i+\Delta x)-y_{i+1}=\mathscr {O}((\Delta x)^{p+1})\) (see [1]).

This section is dedicated to proving that the schemes (16) and (18) are consistent and then we proceed further to compute their order of accuracy. Note that in both these formulations, \(K_1, K_2\) and \(K_3\) are exactly the same. Using the Eq. (19), \(K_i\)’s can be approximated using the Taylor’s series approximation as

$$\begin{aligned} {\textbf {K}}_2&=\psi (x_i,{\textbf {y}}_i)+\bigg (\Delta x \frac{\partial \psi }{\partial x}+\frac{\Delta x}{2} \psi (x_i,{\textbf {y}}_i) \frac{\partial \psi }{\partial y}+\frac{(\Delta x)^2}{2} \frac{\partial ^2 \psi }{\partial x^2}\\&\quad +\frac{(\Delta x \psi (x_i,{\textbf {y}}_i))^2}{8} \frac{\partial ^2 \psi }{\partial y^2} +\frac{(\Delta x)^2}{2} \psi (x_i,{\textbf {y}}_i) \frac{\partial ^2 \psi }{\partial x \partial y}\bigg )\bigg |_{(x_i,y_i)}\\&:=\psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx} + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} +\frac{(\Delta x)^2}{2} \psi _i \psi _{xy}, \end{aligned}$$
$$\begin{aligned} K_3&:=\psi _i + \Delta x \psi _x + \frac{\Delta x}{2} \psi _y \bigg [2 \psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx} + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} \\&\quad +\frac{(\Delta x)^2}{2} \psi _{xy}\bigg ]+\frac{(\Delta x)^2}{2} \psi _{xx}+\frac{(\Delta x)^2}{4} \psi _{yy} \psi ^{2}_{i}\\&\quad +\frac{(\Delta x)^2}{2} \psi _{xy} \bigg [2 \psi _i+ \Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y\bigg ]+\mathscr {O}((\Delta x)^4), \end{aligned}$$
$$\begin{aligned} {\textbf {K}}_4&:=\psi _i+(\Delta x) \psi _x+\frac{(\Delta x)^2 }{2} \psi _{xx}+(\Delta x) \psi _{xy} \left[ \frac{(\Delta x) \psi _i}{2}+\frac{(\Delta x)}{2} \big (\psi _i+(\Delta x) \psi _x\right. \\&\quad \left. +(\Delta x) \psi _i \psi _y\big )+{\textbf {C}} \frac{(\Delta x)}{2} \bigg (\psi _i+(\Delta x) \psi _x+\frac{(\Delta x)}{2} \psi _i \psi _y\bigg )\right] \\&\quad +\psi _y \left[ \frac{(\Delta x)}{2} \psi _i+{\textbf {C}} \frac{(\Delta x)}{2} \bigg (\psi _i+(\Delta x) \psi _x+\frac{(\Delta x)^2}{2} \psi _i \psi _{xy}\right. \\&\quad \left. +\frac{(\Delta x)^2}{8} \psi _i^2 \psi _{yy}+\frac{(\Delta x)^2}{2} \psi _{xx}+\frac{(\Delta x)}{2} \psi _i \psi _y\bigg )\right] + \frac{(\Delta x)}{2} \psi _y \psi _i\\&\quad +\psi _y \frac{(\Delta x)}{2} \left[ \psi _i+ (\Delta x) \psi _x+(\Delta x)^2 \psi _i \psi _{xy}+\frac{(\Delta x)^2}{4} \psi _i \psi _{yy}+\frac{(\Delta x)^2}{2} \psi _{xx}\right. \\&\quad \left. +\frac{(\Delta x)}{2} \psi _y \bigg (\frac{(\Delta x)}{2} \psi _i \psi _y+ (\Delta x) \psi _x +2 \psi _i\bigg )\right] \\&\quad +\frac{\psi _{yy}}{2} \left[ \frac{(\Delta x)^3}{4} \big (2 {\textbf {C}}^2+5 {\textbf {C}} +2\big ) \psi _i \psi _x+\frac{(\Delta x)^3}{4}\big ({\textbf {C}}+2\big )^2 \psi ^{2}_{i} \psi _y\right. \\&\quad \left. +\frac{(\Delta x)^2}{4} \big ({\textbf {C}}+2\big )^2 \psi ^{2}_{i}\right] +\mathscr {O}((\Delta x)^4). \end{aligned}$$

Substituting these values in the scheme (16) gives us

$$\begin{aligned} {\textbf {y}}_{i+1}&={\textbf {y}}_{i}+\frac{\Delta x}{2} \bigg [2 \psi _i+\Delta x \psi _x + \frac{\Delta x}{2} \psi _y \bigg (2 \psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx} \nonumber \\&\quad + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} +\frac{(\Delta x)^2}{2} \psi _{xy}\bigg )+\frac{(\Delta x)^2}{2} \psi _{xx}\bigg ]\nonumber \\&\quad +\frac{(\Delta x)^3}{16} \psi _{yy}\bigg [2 \psi ^{2}_{i}+\bigg (\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx} + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} \nonumber \\&\quad +\frac{(\Delta x)^2}{2} \psi _{xy}\bigg )^2\bigg ]+\frac{(\Delta x)^3}{4} \psi _{xy} \bigg [2 \psi _i+ \Delta x \psi _x \bigg ] \nonumber \\&\quad +\frac{(\Delta x)^3}{4} \psi _{xy} \bigg [+\frac{\Delta x}{2} \psi _i \psi _y+\frac{(\Delta x)^2}{2} \psi _{xx} + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} +\frac{(\Delta x)^2}{2} \psi _{xy}\bigg ]\nonumber \\&\quad +{\textbf {C}} \frac{\Delta x}{2} \bigg [\psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx}\bigg ]\nonumber \\&\quad +{\textbf {C}} \frac{(\Delta x)}{2}\bigg [ \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy}+\frac{(\Delta x)^2}{2}\psi _{xy}\bigg ] \end{aligned}$$
(20)

and in the scheme (18) yields

$$\begin{aligned} y_{i+1}&=y_{i}+\frac{\Delta x}{2} \bigg [2 \psi _i+\Delta x \psi _x + \frac{\Delta x}{2} \psi _y \bigg (2 \psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y \bigg )+\frac{(\Delta x)^2}{2} \psi _{xx}\bigg ]\nonumber \\&\quad +\frac{(\Delta x)^3}{8} \psi _{yy} \psi ^{2}_{i}+\frac{(\Delta x)^3}{2} \psi _{xy} \psi _i \nonumber \\&\quad +C \frac{\Delta x}{2} \bigg [\psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx}+ \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy}+\frac{(\Delta x)^2}{2}\psi _{xy}\bigg ]\nonumber \\&\quad +\mathscr {O}((\Delta x)^4), \end{aligned}$$
(21)

To compute the local truncation error, let us evaluate

$$\begin{aligned} {\textbf {y}}(x_i+\Delta x)&={\textbf {y}}_i+(\Delta x) {\textbf {y}}'_i+\frac{(\Delta x)^2}{2}{} {\textbf {y}}''_j+\frac{(\Delta x)^3}{6}{} {\textbf {y}}'''_i+\mathscr {O}((\Delta x)^4)\nonumber \\&={\textbf {y}}_i+(\Delta x) \psi _i+\frac{(\Delta x)^2}{2}\big (\psi _x+ \psi _i \psi _y\big ) +\frac{(\Delta x)^3}{6}\big (\psi _{xx} +2\psi _i \psi _{xy} \nonumber \\&\quad +\psi _{x} \psi _{y} +\psi _i \psi ^{2}_{y}+\psi ^{2}_{i} \psi _{yy}\big )+\mathscr {O}((\Delta x)^4). \end{aligned}$$
(22)

Using the Eqs. (20) and (22), LTE between the approximated and exact solutions for the method (16) is represented by

$$\begin{aligned} {\textbf {y}}(x_i+\Delta x)-{\textbf {y}}_{i+1}&=-\frac{(\Delta x)^3}{12}\big (\psi _x \psi _y-2 \psi _i \psi ^{2}_y +\psi _{xx}\big )+\frac{(\Delta x)^3}{24} \psi ^{2}_{i} \psi _{yy}-\frac{(\Delta x)^3}{6} \psi _i \psi _{xy}\nonumber \\&\quad -{\textbf {C}} \frac{\Delta x}{2} \bigg (\psi _i+\Delta x \psi _x +\frac{\Delta x}{2} \psi _i \psi _y + \frac{(\Delta x)^2}{2} \psi _{xx} + \frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy}\nonumber \\&\quad +\frac{(\Delta x)^2}{2} \psi _{xy}\bigg )+O((\Delta x)^4), \end{aligned}$$
(23)

while Eqs. (21) and (22) yield the LTE for the technique (18) as

$$\begin{aligned} {\textbf {y}}(x_i+\Delta x)-{\textbf {y}}_{i+1}&=-\frac{(\Delta x)^3}{12} \psi _{xx}-\frac{(\Delta x)^3}{6} \psi _{i} \psi _{xy}\nonumber \\&\quad -\frac{(\Delta x)^3}{12} \psi _{x} \psi _{y}+\frac{(\Delta x)^3}{6} \psi _{i} \psi ^{2}_{y}-\frac{(\Delta x)^3}{12} \psi ^{2}_{i} \psi _{yy}+{\textbf {C}} \frac{(\Delta x)^3}{16} \psi ^{2}_{i} \psi _{yy}\nonumber \\&\quad -{\textbf {C}} \frac{(\Delta x)^2}{2}\left[ \psi _{i} \psi _{y} +(\Delta x)\psi _{i} \psi _{xy}+\frac{(\Delta x)}{4} \psi _{i} \psi _{yy}+\frac{(\Delta x)}{2} \psi _{x} \psi _{y}\right. \nonumber \\&\quad \left. +\frac{(\Delta x)}{4} \psi _{i} \psi ^{2}_{y}-\frac{(\Delta x)^2}{8} \psi _{i} \psi ^{2}_{y}-\frac{(\Delta x)}{4} \psi _{x} \psi _{y}\right] \nonumber \\&\quad -{\textbf {C}}^2 \frac{(\Delta x)}{2}\left[ \frac{(\Delta x)^2}{2}\psi _i \psi _{xy}+\frac{(\Delta x)^2}{8}\psi ^{2}_{i} \psi _{yy}+\frac{(\Delta x)^2}{2} \psi _{xx}+\psi _i \right. \nonumber \\&\quad \left. +(\Delta x) \psi _x+\frac{(\Delta x)}{2} \psi _i \psi _y+\frac{(\Delta x)^2}{8} \psi ^{2}_{i} \psi _{yy} \right] . \end{aligned}$$
(24)

The values of LTE presented in the equations (23) and (24) go to 0 as \(\Delta x \rightarrow 0\), hence both the numerical schemes are consistent for any value of \({\textbf {C}}\). In addition to this, using Definition 3.1, the scheme (16) is of first order if \(\Delta x=|{\textbf {C}}|\) and second order if \(\Delta x=\sqrt{(|{\textbf {C}}|)}\). It is noteworthy that the scheme (18) is of second order when \(\Delta x=|{\textbf {C}}|\). This establishes that the second scheme obtained by taking four terms is an improved numerical scheme than the one obtained using three terms. The advantage of coupling a semi-analytical method lies in the improvement of the scheme and its order of accuracy when the number of terms are increased.

Convergence

The objective of this subsection is to prove that our proposed numerical schemes are convergent. To achieve the desired result, the consistency established in the previous subsection is prerequisite in addition to proving that the schemes are regular.

Definition 3.2

A scheme is said to be regular if \(I=(x,y,\Delta x):=\frac{y_{i+1}-y_i}{(\Delta x)}\) defined in the domain \([\alpha ,\beta ] \times ]-\infty ,\infty [\) is continuous and Lipshitz functions in y, i.e.,

$$\begin{aligned} \Vert I(x,y,\Delta x)-I(x,y^{*},\Delta x)\Vert \le k \Vert y-y^{*}\Vert . \end{aligned}$$
(25)

In addition, a scheme is said to be convergent if it is regular and consistent and the order of convergence of the scheme is same as the order of consistency (see [2]).

We shall now establish the result (25) for schemes (16) and (18). The idea here is to prove that \({\textbf {K}}^{*}_{i}\)’s are Lipshitz functions for every \(i=1, 2, 3, 4\), and for every \((x,{\textbf {y}}^{*}) \in [\alpha -x_0,\alpha +x_0] \times ]-\infty ,\infty [^{N}\). Assuming that \(\psi (x,{\textbf {y}})\) are continuous and Lipshitz in \([\alpha -x_0,\alpha +x_0] \times ]-\infty ,\infty [^{N}\), we have

$$\begin{aligned} \Vert {\textbf {K}}_{1}-{\textbf {K}}^{*}_{1}\Vert =\Vert \psi (x_i,{\textbf {y}}_{i})-\psi (x_i,{\textbf {y}}^{*}_{i})\Vert \le {\textbf {k}} \Vert {\textbf {y}}_{i}-{\textbf {y}}^{*}_{i}\Vert . \end{aligned}$$
(26)

Using (26), the following can be easily obtained

$$\begin{aligned} \Vert {\textbf {K}}_2-{\textbf {K}}^{*}_{2}\Vert&\le {\textbf {k}} \bigg \Vert {\textbf {y}}_{i}+\frac{\Delta x}{2} {\textbf {K}}_{1}-{\textbf {y}}^{*}_{i}-\frac{\Delta x}{2} {\textbf {K}}^{*}_{1}\bigg \Vert \nonumber \\&\le {\textbf {k}}\left( \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert + \frac{\Delta x}{2}\Vert {\textbf {K}}_1-{\textbf {K}}^{*}_{1}\Vert \right) \nonumber \\&\le {\textbf {k}}\left( 1+{\textbf {k}} \frac{\Delta x}{2}\right) \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert , \end{aligned}$$
(27)
$$\begin{aligned} \Vert {\textbf {K}}_3-{\textbf {K}}^{*}_{3}\Vert&\le {\textbf {k}} \bigg \Vert {\textbf {y}}_{i}+\frac{\Delta x}{2} {\textbf {K}}_{1}+\frac{\Delta x}{2} {\textbf {K}}_{2}-{\textbf {y}}^{*}_{i}-\frac{\Delta x}{2} {\textbf {K}}^{*}_{1}-\frac{\Delta x}{2} {\textbf {K}}^{*}_{2}\bigg \Vert \nonumber \\&\le {\textbf {k}}\left( \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert + \frac{\Delta x}{2}\Vert {\textbf {K}}_1-{\textbf {K}}^{*}_{1}\Vert +\frac{\Delta x}{2}\Vert {\textbf {K}}_2-{\textbf {K}}^{*}_{2}\Vert \right) \nonumber \\&\le {\textbf {k}}\left( 1+{\textbf {k}} (\Delta x)+ {\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert , \end{aligned}$$
(28)

and

$$\begin{aligned} \nonumber \Vert {\textbf {K}}_4-{\textbf {K}}^{*}_{4}\Vert&\le {\textbf {k}} \bigg \Vert {\textbf {y}}_{i}+\frac{\Delta x}{2} {\textbf {K}}_{1}+{\textbf {C}}\frac{\Delta x}{2} {\textbf {K}}_{2}+\frac{\Delta x}{2} {\textbf {K}}_{3}-{\textbf {y}}^{*}_{i}-\frac{\Delta x}{2} {\textbf {K}}^{*}_{1}-{\textbf {C}}\frac{\Delta x}{2} {\textbf {K}}^{*}_{2}-\frac{\Delta x}{2} {\textbf {K}}^{*}_{3}\bigg \Vert \nonumber \\&\le {\textbf {k}}\left( \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert + \frac{\Delta x}{2}\Vert {\textbf {K}}_1-{\textbf {K}}^{*}_{1}\Vert +\frac{\Delta x}{2}\Vert {\textbf {K}}_3-{\textbf {K}}^{*}_{3}\Vert +{\textbf {C}}\frac{\Delta x}{2}\Vert {\textbf {K}}_2-{\textbf {K}}^{*}_{2}\Vert \right) \nonumber \\&\le {\textbf {k}}\left[ 1+{\textbf {k}}\frac{(\Delta x)}{2}+{\textbf {k C}}\frac{(\Delta x)}{2}\left( 1+{\textbf {k}}\frac{(\Delta x)}{2}\right) +{\textbf {k}}\frac{(\Delta x)}{2}\left( 1+{\textbf {k}} (\Delta x) +{\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \right] \nonumber \\&\qquad \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert . \end{aligned}$$
(29)

Thanks to the results obtained in expressions (26)–(28), the regularity of the scheme (16) is shown below as

$$\begin{aligned} \Vert {\textbf {I}}(x,{\textbf {y}},\Delta x)-{\textbf {I}}(x,{\textbf {y}}^{*},\Delta x)\Vert&= \bigg \Vert \frac{1}{2} \big ({\textbf {K}}_1+{\textbf {K}}_3\big )+\frac{1}{2} {\textbf {C}} {\textbf {K}}_2-\frac{1}{2} \big ({\textbf {K}}^{*}_{1}+{\textbf {K}}^{*}_{3}\big )-\frac{1}{2} {\textbf {C}} {\textbf {K}}^{*}_{2}\bigg \Vert \nonumber \\&\le \frac{1}{2} \Vert {\textbf {K}}_{1}-{\textbf {K}}^{*}_{1}\Vert +\frac{|{\textbf {C}}|_{\infty }}{2} \Vert {\textbf {K}}_{2}-{\textbf {K}}^{*}_{2}\Vert +\frac{1}{2} \Vert {\textbf {K}}_{3}-{\textbf {K}}^{*}_{3}\Vert \nonumber \\&\le \left[ \frac{{\textbf {k}}}{2} +\frac{|{\textbf {C}}|_{\infty }}{2}{} {\textbf {k}}\left( 1+{\textbf {k}} \frac{\Delta x}{2}\right) +\frac{{\textbf {k}}}{2}\left( 1+{\textbf {k}} (\Delta x)+ {\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \right] \nonumber \\&\qquad \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert , \end{aligned}$$
(30)

for \({\textbf {k'}}=\frac{{\textbf {k}}}{2} +\frac{|{\textbf {C}}|_{\infty }}{2}{} {\textbf {k}}\left( 1+{\textbf {k}} \frac{\Delta x}{2}\right) +\frac{{\textbf {k}}}{2}\left( 1+{\textbf {k}} (\Delta x)+ {\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \), the function \({\textbf {I}}(x,{\textbf {y}},\Delta x)\) is regular. Thus, by applying the Definition 3.2, the scheme (16) is convergent.

Again, using (26)–(29), the value of the norm in Eq. (25) for the scheme (18) yields

$$\begin{aligned} \Vert {\textbf {I}}(x,{\textbf {y}},\Delta x)-{\textbf {I}}(x,{\textbf {y}}^{*},\Delta x)\Vert&=\bigg \Vert \frac{1}{2} \big ({\textbf {K}}_1+{\textbf {K}}_4+{\textbf {C}} {\textbf {K}}_3+({\textbf {C}}^2-{\textbf {C}}){\textbf {K}}_2\big )-\frac{1}{2} \big ({\textbf {K}}^{*}_{1}+{\textbf {K}}^{*}_{4}\nonumber \\&\quad +{\textbf {C}} {\textbf {K}}^{*}_{3}+({\textbf {C}}^2-{\textbf {C}}){\textbf {K}}^{*}_2\big )\bigg \Vert \nonumber \\&\le \left[ {\textbf {k}}+\frac{{\textbf {k}}^2}{4}(\Delta x)\left[ 1+{\textbf { C}}\left( 1+{\textbf {k}}\frac{(\Delta x)}{2}\right) +\left( 1+{\textbf {k}} (\Delta x)\right. \right. \right. \nonumber \\&\quad \left. \left. \left. +{\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \right] \right] \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert \nonumber \\&+\left[ \frac{|{\textbf {C}}|_{\infty }{} {\textbf {k}}}{2}\left( 1+{\textbf {k}} (\Delta x)+ {\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \right. \nonumber \\&\quad \left. +({\textbf {C}}^2-{\textbf {C}})\frac{{\textbf {k}}}{2}\left( 1+{\textbf {k}} \frac{\Delta x}{2}\right) \right] \Vert {\textbf {y}}_i-{\textbf {y}}^{*}_{i}\Vert , \end{aligned}$$
(31)

for \({\textbf {k}}'={\textbf {k}}+\frac{{\textbf {k}}^2}{4}(\Delta x)\left[ 1+{\textbf { C}}\left( 1+{\textbf {k}}\frac{(\Delta x)}{2}\right) +\left( 1+{\textbf {k}} (\Delta x) +{\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) \right] \) \(+\frac{|{\textbf {C}}|_{\infty }{} {\textbf {k}}}{2}\left( 1+{\textbf {k}} (\Delta x)+ {\textbf {k}}^2 \frac{(\Delta x)^2}{4}\right) +({\textbf {C}}^2-{\textbf {C}})\frac{{\textbf {k}}}{2}\left( 1+{\textbf {k}} \frac{\Delta x}{2}\right) \), the function \({\textbf {I}}(x,{\textbf {y}},\Delta x)\) is regular. Hence, the Scheme (18) is convergent and having the same order as the order of consistency.

In the next subsection, the stability of the numerical schemes (16) and (18) are discussed.

Stability

Definition 3.3

If a numerical scheme can be represented as \(y_{i+1}= A y_i\) after taking \(\psi (x,y)=\eta y\) in Eq. (1), then the scheme is said to be stable if

$$\begin{aligned} \big |A\big | \le 1, \end{aligned}$$
(32)

i.e., the absolute value of the amplification factor in \(y_{i+1}= y_i\) is less than or equal to 1 (see [1]).

In order to test the stability of the concerned methods, the standard procedure is to consider a test equation \(\frac{d {\textbf {y}}}{d x}=\eta {\textbf {y}}\) so that \(\psi (x,{\textbf {y}})=\eta {\textbf {y}}\). Thus, values of \({\textbf {K}}_1, {\textbf {K}}_2, {\textbf {K}}_3\) and \({\textbf {K}}_4\) are computed as

$$\begin{aligned} {\textbf {K}}_1&=\eta {\textbf {y}}_i,\nonumber \\ {\textbf {K}}_2&=\eta \left( 1+\frac{\eta (\Delta x)}{2}\right) {\textbf {y}}_i, \nonumber \\ {\textbf {K}}_3&=\eta \bigg [1+\frac{\eta (\Delta x)}{2}+\frac{\eta (\Delta x)}{2}\bigg (1+\frac{\eta (\Delta x)}{2}\bigg )\bigg ]{\textbf {y}}_i\nonumber \\ {\textbf {K}}_4&=\eta \bigg [1+\frac{\eta (\Delta x)}{2}+{\textbf {C}}\frac{\eta (\Delta x)}{2} \left( 1+\frac{\eta (\Delta x)}{2}\right) +\frac{\eta (\Delta x)}{2} \left( 1+\eta (\Delta x)+\frac{\eta ^2 (\Delta x)^2}{4}\right) \bigg ]{\textbf {y}}_i. \end{aligned}$$
(33)

Using the values of \({\textbf {K}}_i's\), the techniques (16) and (18) can be interpreted as:

$$\begin{aligned} {\textbf {y}}_{i+1}&=\bigg [1+\frac{(\Delta x)}{2} \left[ \eta +\eta \bigg (1+\frac{\eta (\Delta x)}{2}+\frac{\eta (\Delta x)}{2}\bigg (1+\frac{\eta (\Delta x)}{2}\bigg )\bigg )+{\textbf {C}} \eta \left( 1+\frac{\eta (\Delta x)}{2}\right) \right] {\textbf {y}}_i\bigg ], \end{aligned}$$

and

$$\begin{aligned} {\textbf {y}}_{i+1}&={\textbf {y}}_i+\frac{(\Delta x)}{2} \left[ \eta {\textbf {y}}_i+\eta \bigg [1+\frac{\eta (\Delta x)}{2}+{\textbf {C}}\frac{\eta (\Delta x)}{2} \left( 1+\frac{\eta (\Delta x)}{2}\right) \right. \\&\quad \left. +\frac{\eta (\Delta x)}{2} \left( 1+\eta (\Delta x)+\frac{\eta ^2 (\Delta x)^2}{4}\right) \bigg ]{\textbf {y}}_i\right] \\&\quad +\frac{(\Delta x)}{2} \left[ {\textbf {C}}^2 \eta \left( 1+\frac{\eta (\Delta x)}{2}\right) {\textbf {y}}_i +{\textbf {C}}\eta \bigg [\frac{\eta (\Delta x)}{2}\bigg (1+\frac{\eta (\Delta x)}{2}\bigg )\bigg ]{\textbf {y}}_i \right] , \end{aligned}$$

respectively. Hence, it is easy to see that our approach (16) is stable if

$$\begin{aligned} \bigg |1+\frac{(\Delta x)}{2} \left[ \eta +\eta \bigg (1+\frac{\eta (\Delta x)}{2}+\frac{\eta (\Delta x)}{2}\bigg (1+\frac{\eta (\Delta x)}{2}\bigg )\bigg )+{\textbf {C}} \eta \left( 1+\frac{\eta (\Delta x)}{2}\right) \right] \bigg | \le 1, \end{aligned}$$
(34)

while scheme (18) is stable if

$$\begin{aligned} \nonumber&\bigg |1+\frac{(\Delta x)}{2} \left[ \eta +\eta \bigg [1+\frac{\eta (\Delta x)}{2}+{\textbf {C}}\frac{\eta (\Delta x)}{2} \left( 1+\frac{\eta (\Delta x)}{2}\right) +\frac{\eta (\Delta x)}{2} \left( 1+\eta (\Delta x)+\frac{\eta (\Delta x)^2}{4}\right) \bigg ]\right] \\&\,\,\,\,\,\,\,\frac{(\Delta x)}{2} {\textbf {C}}^2\eta \left( 1+\frac{\eta (\Delta x)}{2}\right) y_i +{\textbf {C}}\eta \bigg [\frac{\eta (\Delta x)}{2}\bigg (1+\frac{\eta (\Delta x)}{2}\bigg )\bigg ]\bigg | \le 1. \end{aligned}$$
(35)

Hence, one can establish the stability of the schemes after computing the values of \({\textbf {C}}\) using the Eq. (7).

Numerical Implementation

In this section, four simple examples of first order non-linear differential equations are considered to analyze the validity of our numerical schemes.

Example 4.1

Consider the non-linear ODE

$$\begin{aligned} \frac{dy}{dx}=-y^2, \quad \quad y(0)=d=1/16, \end{aligned}$$
(36)

and the exact solution for this problem is

$$\begin{aligned} y(x)=\frac{1}{x+16}. \end{aligned}$$
(37)

In order to compute the value of the numerical solution using our numerical schemes, we need the value of parameter C. For that, define

$$\begin{aligned} F[L [u], u]=\frac{du}{dx}+u^2, \end{aligned}$$

and therefore using the Eq. (7), we have

$$\begin{aligned} C=\frac{\frac{\partial F}{\partial u}(d)}{\frac{\partial F}{\partial L [u]}(d)}=2d=\frac{1}{8}. \end{aligned}$$

The Fig. 1 depicts the solution and absolute error plots for the problem (36). It is noteworthy that the four term numerical technique provides better accuracy than the three term scheme. The Fig. 1 clearly shows that our four term numerical scheme coincides with the exact solution and is behaving at par with the trapezoidal scheme. Here, we have used \(\Delta x=\sqrt{1/8}=0.125\) for obtaining the results. It can be observed that the maximum absolute error is \(10^{-3}\) obtained using the three term scheme and minimum error is \(10^{-4}\) obtained using the trapezoidal method. The advantage of using our proposed numerical algorithms over the trapezoidal and Runge–Kutta third order (RK-3) methods is justified by looking at the stability region plot for these methods in Fig. 2. It is evident from this plot that our schemes have wider stability region than the trapezoidal and the RK-3 methods. So, in conclusion, the four-term numerical method is the best method to solve this problem, if we factor in both error and stability.

Fig. 1
figure 1

Comparison of our numerical solutions with exact solution for Example 4.1

Fig. 2
figure 2

Stability region of different methods for Example 4.1

Example 4.2

Consider another interesting ordinary differential equation with cubic non-linear term

$$\begin{aligned} \frac{dy}{dx}=-y-0.25 y^3, \quad \quad y(0)=d=\frac{0.25}{2}, \end{aligned}$$
(38)

and the exact solution for this problem is given as

$$\begin{aligned} y(x)=\frac{d \exp (-x)}{\sqrt{(1+0.25 d^2(1-\exp (-2x))}}. \end{aligned}$$
(39)

The function F is expressed as

$$\begin{aligned} F[L [u], u]=\frac{du}{dx}+u+0.25 u^3, \quad \text {and} \quad C=1+(0.75) u^2|_{t=0}=1.01. \end{aligned}$$

It is observed that the four term numerical scheme (18) is showing very nice agreement with the exact solution. The Fig. 3 is symbolic of the fact that the three term scheme gave higher error than the trapezoidal method but the results obtained using the four term scheme are better than the trapezoidal method which claims the superiority of our numerical scheme. It should be mentioned here that we have taken \(\Delta x=1\) for computing the results. The comparison of the region of stability obtained after plotting the solutions of the amplification factor after taking \(\eta \Delta x\) as a single variable is presented in the Fig. 4. It is observed here that both the schemes 16 and 18 have bigger stability region than the trapezoidal one. In addition to this, the three term scheme here has the biggest stability region but generates highest error. Therefore, the four-term scheme is superior among the three techniques.

Fig. 3
figure 3

Comparison of our numerical schemes with Trapezoidal method for Example 4.2

Fig. 4
figure 4

Stability region of different methods for Example 4.2

Example 4.3

Let us solve the non-linear Riccati differential equation

$$\begin{aligned} \frac{dy}{dx}=1-y^2, \quad \quad y(0)=d=\frac{0.25}{2}, \end{aligned}$$
(40)

using the proposed numerical schemes and compare our results with the exact solution

$$\begin{aligned} y(x)=\frac{tanh(x)+d}{d \hspace{.03 cm} tanh(x) +1}, \end{aligned}$$
(41)

as presented in [21].

Here, we have

$$\begin{aligned} F[L [u], u]=\frac{du}{dx}+u^2-1, \quad C=2u|_{t=0}=0.25. \end{aligned}$$

The Fig. 5 depicts the solution plots for the problem (40) calculated using the proposed numerical schemes and display excellent accuracy. Our schemes give better results than the trapezoidal scheme that was initially used as a numerical method to create these novel techniques. It is worthy to mention that the behaviour of the numerical solution is improved by adding an extra term computed using the semi-analytical technique. In order to obtain the results, \(\Delta x=0.5\) is taken. It is interesting to note that the parameter C aids in selecting a suitable mesh width to achieve higher accuracy. In conclusion, our proposed four term numerical scheme is an efficient method to solve the famous Riccati equation. This statement is strengthened by visualizing the stability range for the numerical schemes through the Fig. 6.

Fig. 5
figure 5

Comparison of our numerical schemes with Trapezoidal method for Example 4.3

Fig. 6
figure 6

Stability region of different methods for Example 4.3

Example 4.4

Let the FNODE be taken as

$$\begin{aligned} \frac{dy}{dx}=y-y^2, \quad \quad y(0)=d=0.75, \end{aligned}$$
(42)

and the exact value of y be

$$\begin{aligned} y(x)=\frac{0.75}{(0.75+0.25 \exp (-x))}. \end{aligned}$$
(43)

In this case, we can easily obtain

$$\begin{aligned} F[L [u], u]=\frac{du}{dx}+u^2-u, \quad \text {and} \quad C=2d-1=0.5, \quad \Delta x=0.25. \end{aligned}$$

The Fig. 7 validates the numerical results while comparing them with the exact solution and at the same time shows its comparison with the numerical solution obtained using the trapezoidal scheme. The absolute error plot confirms our findings that the proposed four term scheme coincides with the exact solution. The Fig. 8 shows the plot of the imaginary part of \(\eta \Delta x\) against its real part for four numerical methods. It should be mentioned here that fixing \(\eta \) gives the range of the mesh length for which the method is stable.

Fig. 7
figure 7

Comparison of our numerical schemes with trapezoidal method for Example 4.4

Fig. 8
figure 8

Stability region of different methods for Example 4.4

Conclusions

This research work developed a numerical method through a novel coupling of the trapezoidal method and the Laplace optimized decomposition method. To understand the relevance of the number of terms of LODM solution to consider, the paper developed two numerical schemes (three term and four term) and compared the numerical results for both the schemes. The theoretical convergence, consistency and stability results were also discussed to validate the schemes. In addition, the physically relevant examples of the FNODEs were solved using the proposed schemes. It is evident from all the examples that our four-term numerical scheme is highly accurate and efficient in dealing with FNODEs. Also, it should be mentioned here that this technique of developing numerical methods based on semi-analytical techniques paved the way for improving the accuracy of the algorithm by increasing the number of terms in the semi-analytical approximations. The future scope of this work is the development of the numerical method for higher order non-linear problems, and the authors are currently exploring that area.