Introduction

Many boundary value problems (BVPs) in physical science, engineering, and applied mathematics involve nonlinear differential equations subject to two-point (local) conditions or nonlocal BCs. In general, it is challenging to obtain the exact solution to such nonlinear problems. More difficulties arise when we deal with nonlinear problems with nonclassical conditions. The nonclassical conditions are usually the most physically reasonable choices to apply to the mathematical models to various physical sciences, and biological sciences phenomena [1,2,3,4,5]. Since the nonclassical BCs connect values of the function on the boundary to values inside the domain or when direct measurement on the boundary is impossible. These nonclassical boundary conditions are called nonlocal boundary conditions, e.g., integral type boundary conditions, or multi-point boundary conditions are one type of nonlocal BCs. Imposing nonlocal BCs are usually the most physically reasonable choices to apply to the mathematical models to various phenomena of physical sciences and biological sciences [6].

This work aims to apply the Adomian decomposition method [7, 8], for the approximate solutions of the following the generalized Thomas–Fermi type equations (GTFEs) subjected to integral type boundary conditions (nonlocal boundary conditions)

$$\begin{aligned}&\frac{1}{q(t)}(p(t)y'(t))'=f(t,y(t)),\quad t\in (0,1), \end{aligned}$$
(1)
$$\begin{aligned}&y(0)=\gamma ,\quad \hbox {or}\quad \displaystyle \lim _{t\rightarrow 0}p(t)y'(t)=0,\quad y(1)=\int _0^1g(s)y(s)ds+\beta , \end{aligned}$$
(2)

where \(\gamma \) and \(\beta \) are real constants. Here \(p(0)=0\) and q(t) is allowed to be discontinuous at \(t=0\) such problems may be called doubly singular [9]. We assume the following conditions on p(t), q(t) and g(t)

  1. (i)

    \(p(t)\in C[0,1]\cap C^{1}(0,1]\), \(p(t)>0\), \(q(t)>0\), and \(\displaystyle \int _0^1 g(s) ds<\infty \).

  2. (ii)

    \(\displaystyle \int _0^1 \frac{ds}{p(s)}<\infty \) and \(\displaystyle \int \limits _{0}^{1}\frac{1}{p(\xi )}\bigg (\int \limits _{\xi }^{1}q(s) ds\bigg ) d\xi <\infty \), (when \(y(0)=\gamma \)).

  3. (iii)

    \(\displaystyle \int _0^1 q(s) ds<\infty \) and \(\displaystyle \int \limits _{0}^{1}\frac{1}{p(\xi )} \bigg (\int \limits _{0}^{\xi }q(s) ds\bigg ) d\xi <\infty \), (when \(\lim _{t\rightarrow 0}p(t)y'(t)=0\)).

  4. (iv)

    The nonlinear function f(ty(t)) is continues and \(\frac{\partial f}{\partial y}\) is bounded on \(\{[0,1]\times \mathbb {R}\}\).

Equation (1) with \(p(t)=1,~q(t)=t^{-1/2}\) and \(f=y^{3/2}\) reduces into the Thomas–Fermi equation \(y''=t^{-1/2}y^{3/2}, y(0)=1, ~y(b_1)=0,\) which was used for determining the electrical potential in an atom [10, 11]. Equation (1) with \(p(t)=t^{k}\), \(q(t)=t^{k+l}\) and \(f=c\ y^{m}\), we get the generalized Thomas–Fermi equation [12] as

$$\begin{aligned} \frac{1}{t^{k+l}}(t^{k}y'(t))'=cy^{m}, \quad y(0)=1,\quad y(a)=0,\quad 0\le k<1,\quad l>-2,\quad m>1. \end{aligned}$$

We also consider the Lane–Emden–Fowler type equations (LEFEs)

$$\begin{aligned} \frac{1}{t^{k}}\big (t^{k}y'(t)\big )'=f(t,y(t)),\quad k>0,\quad t\in (0,1), \end{aligned}$$
(3)

subjected to the integral type BCs (2). The LEFEs were used to model several phenomena in mathematical physics and astrophysics [13]. The LEFEs (3) with \(k=2\), is a basic equation in the theory of stellar structure. Some of the special cases of (3) are given below.

  1. 1.

    \(\frac{1}{t^{2}}\big (t^{2}y'\big )'=\frac{a y}{y+b},~a>0,~b>0,\) arises in the oxygen diffusion in a spherical cell [2, 3].

  2. 2.

    \(\frac{1}{t^{2}}\big (t^{2}y'\big )'=-a e^{-b y},~a>0,~b>0,\) arises in heat conduction in human head [5].

  3. 3.

    \(\frac{1}{t^{2}} \big (t^{2}y'\big )'=- y^{m}, m>0,\) models many phenomenon in mathematical physics [1].

Several methods (analytical/numerical) developed to deal with GTFEs (1) and LEFEs (3), such as collocation method [14], finite difference method [15], spline finite difference method [16], B-Spline and spline methods [17], the traditional Adomian decomposition method [18, 19], the modified version of decomposition methods [7, 8, 20, 21], Lie group classification technique [22], Lagrangian formulation technique [23], the exact solutions of the generalized Lane–Emden equations [24], variational formulation approach [25], variational iteration method [26], optimal variational iteration method [27], homotopy analysis method [28], the modified homotopy perturbation method [29], the optimal homotopy analysis method [30, 31], nonstandard finite difference schemes [32], Haar wavelet methods [33,34,35], and Laguerre wavelet method [36].

Some recent theocratical work on nonsingular integral types BCs are given below. The existence of positive solutions of the following integral types BVPs

$$\begin{aligned} \left\{ \begin{array}{ll} (p(t)y'(t))'+q(t) f(t,y(t))=0,\quad t\in \Omega ,\\ \begin{aligned} ay(0)-b{\lim _{t \rightarrow 0^{+}}p(t)y'(t)}=&{}\int \limits _{0}^{1}g(s)y(s)ds,~ay(1)+b{\lim _{t \rightarrow 1^{-}}p(t)y'(t)}\\ =&{}\int \limits _{0}^{1}g(s)y(s)ds, \end{aligned}\\ \end{array} \right. \end{aligned}$$

was discussed in [37]. At least one positive solution of the following problems with integral types BCs

$$\begin{aligned} \left\{ \begin{array}{ll} (p(t)y'(t))'+f(t,y(t))=0,\quad t\in \Omega ,\\ p(0)y'(0)=p(1)y'(1),\quad y(1)=\int \limits _{0}^{1}g(s)y(s)ds, \end{array} \right. \end{aligned}$$

was studied in [38]. In [39], the sufficient conditions for the existence of at least one solution (1) with \(q(t)=p(t)=1\) was studied subject to integral types BCs

$$\begin{aligned} y'(0)=\int \limits _{0}^{1}h(s)y'(s)ds,\quad y'(1)=\int \limits _{0}^{1}g(s)y'(s)ds. \end{aligned}$$

In [7], authors pointed out that solving BVPs using the traditional Adomian decomposition method requires the computation of undetermined coefficients in a sequence of nonlinear algebraic or more complicated transcendental equations, which increases the computational work. In [7, 8] authors proposed a modified decomposition method to overcome the difficulties that occurred in the decomposition method for solving local BVPs.

To the best of our knowledge, there are no research works on numerical methods for solving the generalized Thomas–Fermi type equations (1) and the Lane–Emden–Fowler type equations (3) subjected to integral type BCs. This work will deal with a new type of nonlocal BVPs, i.e., the semi-numerical solution of the generalized Thomas–Fermi type equations and LEFEs subjected to integral type BCs. We first transform the given nonlocal BVPs into the equivalent integral equations. Then we apply a modified decomposition method, which allows convenient resolution of such problems. Moreover, we show that this decomposition scheme is convergent in a suitable Banach space. A sufficient theorem is supplied for the uniqueness of the solution of the problems. Unlike other methods, the proposed scheme solves the considered nonlinear nonlocal BVPs without restrictive assumptions such as linearization, discretization, and perturbation. It approximates the solution in the form of series with easily computable solution components. Several examples are included to show the accuracy, applicability, and overview of the method.

The GTFEs with Integral type BCs

To tackle the shortcomings as mentioned earlier of the traditional ADM, we propose a decomposition method based on Singh et al. [7] to obtain the numerical solution of GTFEs and LEFEs subjected to integral type BCs. The nonlinear nonlocal BVPs are transformed into integral equations before designing the iterative schemes to establish the new iterative methods.

Iterative Scheme for BCs \(y(0)=\gamma ,~y(1)=\displaystyle \int _0^1g(s)y(s)ds+\beta \)

We integrate (1) from t to 1, and dividing by p(t), we obtain

$$\begin{aligned} y'(t)=\frac{A}{p(t)}-\frac{1}{p(t)}\int _t^1 q(s)f(s,y(s))ds, \end{aligned}$$
(4)

where \(A=p(1)y'(1)\) is unknown constant be determined. Again integrating equation (4) from 0 to t, and using BCs \(y(0)=\gamma \) we obtain

$$\begin{aligned} y(t)=\gamma +Ah(t)-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi ,\quad \hbox {where}\quad h(t)= \int _0^t\frac{d\xi }{p(\xi )}. \end{aligned}$$
(5)

On using the other BCs \(y(1)=\displaystyle \int _0^1g(t)y(t)dt+\beta \), we find the value A as

$$\begin{aligned}&y(1)=\gamma +Ah(1)-\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi ,\nonumber \\&A=\frac{1}{h(1)}\bigg (-\gamma +\beta +\int _0^1g(t)y(t)dt+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi \bigg ), \end{aligned}$$
(6)

where \(h(1)= \int _0^1\frac{d\xi }{p(\xi )}.\) By substituting the value of A form (6) into equation (5), we get

$$\begin{aligned} y(t)=&\gamma +\frac{h(t)}{h(1)}\bigg (-\gamma +\beta +\int _0^1g(t)y(t)dt+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi \bigg )\nonumber \\&-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi . \end{aligned}$$
(7)

Rewriting the above equation, we get

$$\begin{aligned} y(t)=&\frac{\gamma (h(1)-h(t))}{h(1)}+\frac{h(t)}{h(1)}\bigg (\beta +\int _0^1g(t)y(t)dt+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi \bigg )\nonumber \\&-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s)f(s,y(s))dsd\xi . \end{aligned}$$
(8)

To apply ADM to (8), we decompose the unknown solution y(t) and the nonlinear function f(ty(t)) by infinite series as

$$\begin{aligned} y(t)=\sum _{m=0}^{\infty }y_m,\quad f(t,y(t))=\sum _{m=0}^{\infty }A_m, \end{aligned}$$
(9)

where \(A_m\) are Adomian polynomials [40] are given by

$$\begin{aligned} A_m=\frac{1}{m!}\frac{d^m}{d \lambda ^m} f\bigg (t,\sum _{n=0}^{\infty } y_n\lambda ^n \bigg )_{\lambda =0},\quad m=0,1,2\ldots \end{aligned}$$
(10)

Substituting the series (9) into (7), we obtain

$$\begin{aligned} \sum _{m=0}^{\infty }y_m(t)=&\frac{\gamma }{h(1)} (h(1)-h(t))+\frac{h(t)}{h(1)}\bigg (\beta +\int _0^1g(s) \bigg (\sum _{m=0}^{\infty }y_m\bigg ) ds\nonumber \\&+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \bigg (\sum _{m=0}^{\infty }A_m\bigg ) ds \ d\xi \bigg )-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \bigg (\sum _{m=0}^{\infty }A_m\bigg ) ds\ d\xi . \end{aligned}$$
(11)

The above equation further simplified as

$$\begin{aligned} \sum _{m=0}^{\infty }y_m(t)=&\gamma + (\beta -\gamma )\frac{h(t)}{h(1)}+ \frac{h(t)}{h(1)} \bigg \{\int _0^1g(s) \bigg (\sum _{m=0}^{\infty }y_m\bigg ) ds\nonumber \\&+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \bigg (\sum _{m=0}^{\infty }A_m\bigg ) dsd\xi \bigg \}-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \bigg (\sum _{m=0}^{\infty }A_m\bigg ) dsd\xi . \end{aligned}$$
(12)

On comparing both sides of (12), we find the following iteration method for the approximate solution of (1) with BCs \(y(0)=\gamma ,~y(1)=\int _0^1g(s)y(s)ds+\beta \) as follows

$$\begin{aligned} \begin{aligned} y_0(t)&=\gamma ,\\ y_{1}(t)=&\displaystyle (\beta -\gamma )\frac{h(t)}{h(1)}+ \frac{h(t)}{h(1)} \bigg (\int _0^1g(s) y_0(s) ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_0 dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_0 dsd\xi , \\ y_{j}(t)&= \displaystyle \frac{h(t)}{h(1)} \bigg (\int _0^1g(s) y_{j-1}(s) ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_{j-1} dsd\xi ,\quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(13)

The above proposed scheme gives the complete determination of solution components \(y_{j}\). The nth order approximate solution is obtained by truncating the series past the nth term as

$$\begin{aligned} \psi _n(t)=\sum _{j=0}^{n} y_j(t). \end{aligned}$$
(14)

Remark 1

It should be noted that if we take \(p(t)=q(t)=t^{k}\), \(h(t)=\displaystyle \int _0^t \frac{1}{s^{k}} ds=\frac{t^{1-k}}{1-k}\), \(h(1)=\frac{1}{1-k}\), \(\frac{h(t)}{h(1)}=t^{1-k}\), the GTFEs reduce into the LEFEs. It is given below.

$$\begin{aligned} y(t)&=\gamma + (\beta -\gamma ) t^{1-k} + t^{1-k} \bigg (\int _0^1g(s)y(s)ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k}f(s,y(s))dsd\xi \bigg )\nonumber \\&\quad -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k}f(s,y(s))dsd\xi . \end{aligned}$$
(15)

Therefor, the iterative scheme (13) is also valid for solving LEFEs (3) subjected to BCs \(y(0)=\gamma ,~y(1)=\int _0^1g(s)y(s)ds+\beta \).

Iterative Scheme for BCs \(\displaystyle \lim _{t\rightarrow 0}p(t)y'(t)=0,~y(1)=\int _0^1g(s)y(s)ds+\beta \)

Integrating equation (1) from 0 to t and using the BCs \(\displaystyle \lim _{t\rightarrow 0}p(t)y'(t)=0\), we get

$$\begin{aligned} y'(t)=\frac{1}{p(t)}\int _0^t q(s)f(s,y(s))ds. \end{aligned}$$
(16)

Again integrating equation (16) from t to 1, we obtain

$$\begin{aligned} y(t)=B-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s)f(s,y(s))dsd\xi , \end{aligned}$$
(17)

where \(B=y(1)\) is constant to be determined. Using the other BCs \(y(1)=\displaystyle \int _0^1g(s)y(s)ds+\beta \) on equation (17), we find the value B as

$$\begin{aligned} B=\int _0^1g(s)y(s)ds+\beta . \end{aligned}$$
(18)

Using the value of B into equation (17), we get

$$\begin{aligned} y(t)=\beta +\int _0^1g(s)y(s)ds-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) f(s,y(s))dsd\xi . \end{aligned}$$
(19)

Substituting the series (9) into (19), we obtain

$$\begin{aligned} \sum _{m=0}^{\infty }y_m(t)=\beta +\int _0^1g(s)\bigg (\sum _{m=0}^{\infty }y_m\bigg ) ds-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) \bigg (\sum _{m=0}^{\infty }A_m\bigg ) dsd\xi . \end{aligned}$$
(20)

Comparing both sides of (20), we find the following iteration method for the approximate solution of (1) with BCs \( \lim _{t\rightarrow 0}p(t)y'(t)=0,~y(1)=\int _0^1g(s)y(s)ds+\beta \) as follows

$$\begin{aligned} \begin{aligned}&y_0(t)=\beta ,\\&y_{1}(t)= \displaystyle \int _0^1g(s) y_{0}(s) ds-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) A_{0} dsd\xi ,\\&y_{j}(t)= \displaystyle \int _0^1g(s) y_{j-1}(s) ds-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) A_{j-1} dsd\xi ,\quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(21)

Hence the n-term approximate series solution is obtained as

$$\begin{aligned} \psi _n(t)=\sum _{j=0}^{n} y_j(t). \end{aligned}$$
(22)

Remark 2

It should be noted that if we take \(p(t)=q(t)=t^{k}\), the GTFEs reduce into the LEFEs

$$\begin{aligned} y(t)=\beta +\int _0^1g(s)y(s)ds-\int _t^1\frac{1}{\xi ^{k}}\int _0^\xi s^{k} f(s,y(s))dsd\xi . \end{aligned}$$
(23)

Convergence Analysis

In this section, we first provide sufficient theorems for the existence of a unique solution and the convergence analysis of the proposed method for the GTFEs and the LEFEs subject to integral type BCs. Let \(\mathbb {X}= C[0,1]\) be a Banach space with the norm \(\Vert y\Vert =\displaystyle \max _{ t\in [0,1]} |y(t)|,~y\in \mathbb {X}.\)

Let us write the integral equations (8) and (19) into the following operator theoretic form

$$\begin{aligned} y=Ny, \end{aligned}$$
(24)

where the nonlinear integral operator \(N:\mathbb {X}\rightarrow \mathbb {X}\) are given by

$$\begin{aligned} Ny&=\gamma + (\beta -\gamma )\frac{h(t)}{h(1)}+ \frac{h(t)}{h(1)} \bigg \{\int _0^1g(s) y(s) ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) f(s,y(s)) dsd\xi \bigg \}\nonumber \\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) f(s,y(s)) dsd\xi . \end{aligned}$$
(25)

and

$$\begin{aligned} Ny=\beta +\int _0^1g(s)y(s)ds-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) f(s,y(s))dsd\xi . \end{aligned}$$
(26)

Before establishing convergence of the recursive schemes, we first provide a sufficient condition that guarantees a unique solution of (8) and (19).

Theorem 1

Assume that the nonlinear function f(ty(t)) is continues and \(\frac{\partial f}{\partial y}\) is bounded on \(\{[0,1]\times \mathbb {R}\}\). Then integral equation (8) has a unique solution in \(\mathbb {X}\), whenever \(\delta =M_1+2M_2 L<1\), where

$$\begin{aligned} M_1:=\int _0^1g(s) ds,\quad \bigg |\frac{\partial f}{\partial y}\bigg |\le L,\quad M_2:=\max _{ t \in [0,1]} \bigg |\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) dsd\xi \bigg |. \end{aligned}$$

Proof

For any \(y, y^* \in \mathbb {X}\), we have

$$\begin{aligned} \Vert Ny-Ny^*\Vert&=\max _{ t \in [0,1]} \bigg | \frac{h(t)}{h(1)} \bigg (\int _0^1g(s) \Big (y(s)- y^*(s)\Big ) ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \Big (f(s,y(s))\\&\quad - f(s,y^*(s) ) \Big ) dsd\xi \bigg )-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \Big (f(s,y(s))- f(s,y^*(s) ) \Big ) dsd\xi . \bigg | \end{aligned}$$

Applying the mean value theorem on f, we find

$$\begin{aligned} \Vert Ny-Ny^*\Vert&\le M_1 \max _{ s \in [0,1]} \big | y(s)- y^{*}(s)\big |+ 2M_2 L \max _{ s \in [0,1]} \big | y(s)- y^{*}(s)\big |, \end{aligned}$$
(27)

where

$$\begin{aligned} M_1:=\int _0^1g(s) ds,~\max _{ t \in [0,1]} \frac{h(t)}{h(1)}=1,~\bigg |\frac{\partial f}{\partial y}\bigg |\le L,~ M_2:=\max _{ t \in [0,1]} \bigg |\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) dsd\xi \bigg |. \end{aligned}$$

The above inequality (27) reduces to

$$\begin{aligned} \Vert Ny-Ny^*\Vert&\le (M_1+2M_2 L) \Vert y-y^*\Vert =\delta \Vert y-y^*\Vert , \quad \hbox {where}\quad \delta =M_1+2M_2 L. \end{aligned}$$

This shows the integral equation (8) has a unique solution in \(\mathbb {X}\) whenever \(\delta <1\). \(\square \)

Theorem 2

Assume that the nonlinear function f(ty(t)) is continues and \(\frac{\partial f}{\partial y}\) is bounded on \(\{[0,1]\times \mathbb {R}\}\). Then integral equation (19) has a unique solution in \(\mathbb {X}\), whenever \(\delta =M_1+M_3 L<1\), where

$$\begin{aligned} M_1:=\int _0^1g(s) ds,\quad M_3:=\max _{ t \in [0,1]} \bigg |\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) dsd\xi \bigg |. \end{aligned}$$

Proof

For any \(y, y^* \in \mathbb {X}\), we have

$$\begin{aligned} \Vert Ny-Ny^*\Vert =&\max _{ t \in [0,1]} \bigg |\int _0^1g(s)\Big (y(s)- y^*(s)\Big ) ds\\&-\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) \Big (f(s,y(s))- f(s,y^*(s) ) \Big ) dsd\xi \bigg |. \end{aligned}$$

Applying the mean value theorem on f, we find

$$\begin{aligned} \Vert Ny-Ny^*\Vert&\le M_1 \max _{ s \in [0,1]} \big | y(s)- y^{*}(s)\big |+ M_3 L \max _{ s \in [0,1]} \big | y(s)- y^{*}(s)\big |, \end{aligned}$$

where

$$\begin{aligned} M_1:=\int _0^1g(s) ds,\quad M_3:=\max _{ t \in [0,1]} \bigg |\int _t^1\frac{1}{p(\xi )}\int _0^\xi q(s) dsd\xi \bigg |. \end{aligned}$$

Thus we have

$$\begin{aligned} \Vert Ny-Ny^*\Vert&\le (M_1+M_3 L) \Vert y-y^*\Vert =\delta \Vert y-y^*\Vert ,\quad \hbox {where}\quad \delta =M_1+M_3 L. \end{aligned}$$

This shows the mapping is contraction, and the integral equation (19) has a unique solution in \(\mathbb {X}\) whenever \(\delta <1\). \(\square \)

Theorem 3

Assume that all the conditions of Theorem 1 hold. Let \(y_0,y_1,y_2,\ldots \) be the components of series defined by (13) and let \(\psi _n\) be the n-terms series solution defined by (14). Then the sequence \(\{\psi _n\}\) converges, whenever \(\delta :=M_1+2M_2 L<1\) and \(\Vert y_1\Vert <\infty \).

Proof

Using (13) and (14), we have

$$\begin{aligned} \psi _n&=\gamma +\frac{\gamma }{h(1)} (h(1)-h(t))+\sum _{j=1}^{n} \bigg (\frac{h(t)}{h(1)} \bigg (\int _0^1g y_{j-1} ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) A_{j-1} dsd\xi \bigg ). \end{aligned}$$

On simplification we get

$$\begin{aligned} \psi _n&=\gamma +\frac{\gamma }{h(1)} (h(1)-h(t))+ \frac{h(t)}{h(1)} \bigg (\int _0^1g(s) \sum _{j=0}^{n-1} y_{j} ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \sum _{j=0}^{n-1} A_{j} dsd\xi \bigg )\nonumber \\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \sum _{j=0}^{n-1} A_{j} dsd\xi . \end{aligned}$$
(28)

For all \(n,m\in \mathbb {N}\), with \(n>m\), consider

$$\begin{aligned} \Vert \psi _{n}-\psi _{m}\Vert&=\max _{ t \in [0,1]} \bigg | \frac{h(t)}{h(1)} \Bigg (\int _0^1g(s) \bigg (\sum _{j=0}^{n-1}y_j-\sum _{j=0}^{m-1}y_j\bigg ) ds\nonumber \\&\quad +\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \bigg (\sum _{j=0}^{n-1}A_j-\sum _{j=0}^{m-1}A_j\bigg ) dsd\xi \Bigg )\nonumber \\&\quad -\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \sum _{m=0}^{n-1} \bigg (\sum _{j=0}^{n-1}A_j-\sum _{j=0}^{m-1}A_j\bigg ) dsd\xi \bigg |. \end{aligned}$$
(29)

From ( [41]), using the relation \(\sum _{j=0}^{n} A_{j}\le f(x, \psi _{n})\), the above equation reduces to

$$\begin{aligned} \Vert \psi _{n}-\psi _{m}\Vert&\le \max _{ t \in [0,1]} \bigg | \frac{h(t)}{h(1)} \bigg (\int _0^1g(s) \big (\psi _{n-1}- \psi _{m-1}\big ) ds+\int _0^1\frac{1}{p(\xi )}\int _\xi ^1 q(s) \big (f(s,\psi _{n-1})\\&\quad - f(s,\psi _{m-1} ) \big ) dsd\xi \bigg )-\int _0^t\frac{1}{p(\xi )}\int _\xi ^1 q(s) \big (f(s,\psi _{n-1})- f(s,\psi _{m-1} ) \big ) dsd\xi \bigg |. \end{aligned}$$

By following the steps of Theorem 1, we obtain

$$\begin{aligned} \Vert \psi _{n}-\psi _{m}\Vert&\le \delta \Vert \psi _{n-1}-\psi _{m-1}\Vert ,\quad \hbox {where}\quad \delta =M_1+2M_2 L. \end{aligned}$$

Setting \(n=m+1\), the above relation takes form

$$\begin{aligned} \Vert \psi _{m+1}-\psi _{m}\Vert \le \delta \Vert \psi _{m}-\psi _{m-1}\Vert \le \delta ^{2} \Vert \psi _{m-1}-\psi _{m-2}\Vert \le \ldots \le \delta ^{m} \Vert \psi _{1}-\psi _{0}\Vert . \end{aligned}$$
(30)

The inequality (30) for all \(n,m\in \mathbb {N}\) with \(n>m\) becomes

$$\begin{aligned} \Vert \psi _{n}-\psi _{m}\Vert&\le \delta ^{m}( 1+\delta + \delta ^{2} +\cdots +\delta ^{n-m-1} )\Vert \psi _{1}-\psi _{0}\Vert =\delta ^{m}\left( \frac{1-\delta ^{n-m}}{1-\delta }\right) \Vert y_1\Vert . \end{aligned}$$

It follows that

$$\begin{aligned} \Vert \psi _{n}-\psi _{m}\Vert \le \frac{\delta ^{m}}{1-\delta }\Vert y_1\Vert , \quad \hbox {since}\quad \delta <1, \end{aligned}$$
(31)

\(\Vert \psi _{n}-\psi _{m}\Vert \rightarrow 0\) as \(m\rightarrow \infty \) and \(\Vert y_1\Vert <\infty \). \(\square \)

Theorem 4

Assume that all the conditions of Theorem 2 hold. Let \(y_0,y_1,y_2,\ldots \) be the components of series defined by (21) and let \(\psi _n\) be the n-terms series solution defined by (22). Then the sequence \(\{\psi _n\}\) converges, whenever \(\delta :=M_1+2M_2 L<1\) and \(\Vert y_1\Vert <\infty \).

Proof

The proof is similar to Theorem 3, so it is omitted. \(\square \)

Numerical Simulations

In this section, the proposed iterative schemes (13) and (21) are used to solve several examples of the GTFEs and LEFEs subject to integral BCs. To the best of our knowledge, there are no research papers on numerical methods for solving such problems subjected to integral type BCs. So, to check the efficiency of the proposed processes, we define the absolute error \(E_n(t)\) and the maximum absolute error \(M_{n}\) as

$$\begin{aligned} E_n(t)&=|\psi _n(t)-y(t)|, \end{aligned}$$
(32)
$$\begin{aligned} M_{n}&=\max _{0\le t\le 1}|\psi _n(t)-y(t)|,\quad n=1,2,\ldots \end{aligned}$$
(33)

where y(t) is the exact solution and \(\psi _n(t)\) is n-term approximate series solution.

Lane–Emden–Folwer Type Equations

Example 1

Consider the LEFEs (3) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k}}\big (t^{k}y'(t)\big )'=12 t^6y^5(t)-2(3+k) t^2 y^3(t),\quad t\in (0,1),\\ \displaystyle y(0)=\frac{1}{2},\quad y(1)= \int _{0}^{1} \frac{s}{2} y(s) ds+\bigg (\frac{1}{\sqrt{5}}-\frac{cosech^{-1} (2)}{4}\bigg ). \end{array} \right. \end{aligned}$$
(34)

This problem is a special case of the GTFEs (1) with \(p(t)=q(t)=t^{k},\) \(k\in (0,1)\), \(12 t^6y^5(t)-2(3+k) t^2 y^3(t)\). Here \(\gamma =\frac{1}{2}\), \(g(s)=\frac{s}{2}\), and \(\beta = \frac{1}{\sqrt{5}}-\frac{cosech^{-1} (2)}{4}\). The exact solution is \(y(t)=\frac{1}{\sqrt{4+t^4}}.\)

According to (13), the solution components \(y_j\) are computed recursively as

$$\begin{aligned} \begin{aligned} y_0(t)&=\frac{1}{2},\\ y_{1}(t)&=\displaystyle \bigg (\frac{1}{\sqrt{5}}-\frac{cosech^{-1} (2)}{4}-\frac{1}{2} \bigg )t^{1-k}+ t^{1-k} \bigg (\int _0^1\frac{s}{2} y_0 ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_0 dsd\xi \bigg )\\&\quad \displaystyle -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_0 dsd\xi ,\\ y_{j}(t)&= \displaystyle t^{1-k} \bigg (\int _0^1\frac{s}{2} y_{j-1} ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_{j-1} dsd\xi ,\quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(35)

Using (35), the n-term approximate solution \(\psi _n(t)=\sum _{j=0}^{n} y_j(t)\) for any \(k\in (0,1)\) can be computed. For numerical purpose, the approximate solutions (for \(k=0.5\)) is listed as

$$\begin{aligned} \psi _2(t)&=\frac{1}{2}+0.003199 \sqrt{t}-\frac{t^4}{16}-0.002380 t^{9/2}+0.011718 t^8+0.000450 t^{17/2}\nonumber \\&\quad -0.00193 t^{12}+0.000094 t^{16}, \end{aligned}$$
(36)
$$\begin{aligned} \psi _3(t)&=\frac{1}{2}+0.001090 \sqrt{t}-\frac{t^4}{16}-0.000933 t^{9/2}-0.000031 t^5+0.011718 t^8\nonumber \\&\quad +0.000517t^{17/2}+0.000013 t^9-0.002441 t^{12}-0.000184 t^{25/2}+0.000487 t^{16}\nonumber \\&\quad +0.000012t^{33/2}-0.000050 t^{20}+1.66\times 10^{-6} t^{24}. \end{aligned}$$
(37)

Applying (32) and (33), we have computed the absolute error \(E_n(t)\) and the maximum absolute error \(M_{n}\). The maximum absolute error \(M_{n}\) is given in the Table 1 for \(k=0.25, k=0.5, k=0.75\). The numerical results of the approximate solution and the absolute errors are listed in Table 2 for \(k=0.5\).

Table 1 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 1
Table 2 Results of approximate solutions and the absolute errors for \(k=0.5\) of Example 1

Example 2

Consider the LEFEs (3) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k}}\big (t^{k}y'(t)\big )'=16 t^6e^{2y(t)}-\left( 4 (3+k) t^2\right) e^{y(t)},\quad t\in (0,1),\\ \displaystyle y(0)=\ln \bigg (\frac{1}{4}\bigg ),\quad y(1)= \int _{0}^{1}\frac{1}{2} y(s) ds+\bigg (-2+\tan ^{-1}(2)\bigg ). \end{array} \right. \end{aligned}$$
(38)

This problem is a special case of the GTFEs (1) with \(p(t)=q(t)=t^{k},\) \(k\in (0,1)\), \(f=16 t^6e^{2y(t)}-\left( 4 (3+k) t^2\right) e^{y(t)}\). Here, \(\gamma =\ln \big (\frac{1}{4}\big ),\quad g(s)=\frac{1}{2},\quad \beta =-2+\tan ^{-1}(2)\). Its exact solution is \(y(t)=\ln \big (\frac{1}{4+t^{4}}\big )\).

According to (13), the solution components \(y_j\) are computed recursively as

$$\begin{aligned} \begin{aligned} y_0(t)&=\displaystyle \ln \bigg (\frac{1}{4}\bigg ),\\ y_{1}(t)&=\displaystyle \bigg (-2+\tan ^{-1}(2)-\ln \bigg (\frac{1}{4}\bigg ) \bigg )t^{1-k}+ t^{1-k} \bigg (\int _0^1\frac{1}{2} y_0 ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_0 dsd\xi \bigg )\\&\quad \displaystyle -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_0 dsd\xi , \\ y_{j}(t)&= \displaystyle t^{1-k} \bigg (\int _0^1\frac{1}{2} y_{j-1} ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k} A_{j-1} dsd\xi ,\quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(39)

Applying (39), the n-term approximate solution \(\psi _n(t)=\sum _{j=0}^{n} y_j(t)\) (for any \(k\in (0,1)\)) can be found. The approximate solution (for \(k=0.5\)) is listed as

$$\begin{aligned} \psi _2(t)&= \ln \bigg (\frac{1}{4}\bigg )+0.018957 t^{1/4}-\frac{t^4}{4}-0.007536 t^{17/4}+0.03125 t^8+0.001035 t^{33/4}\nonumber \\&\quad -0.003975 t^{12}+0.000128 t^{16}, \end{aligned}$$
(40)
$$\begin{aligned} \psi _3(t)&=\ln \bigg (\frac{1}{4}\bigg )+0.010095 t^{1/4}-\frac{t^4}{4}-0.004181 t^{17/4}-0.000114 t^{9/2}+0.03125 t^8\nonumber \\&\quad +0.001488 t^{33/4}+0.000033 t^{17/2}-0.005208 t^{12}-0.000375 t^{49/4}+0.000863 t^{16}\nonumber \\&\quad +0.000016t^{65/4}-0.000063 t^{20}+1.36\times 10^{-6} t^{24}. \end{aligned}$$
(41)

The maximum absolute error \(M_{n}\) are given in the Table 3 for \(k=0.25, k=0.5, k=0.75\). The numerical results of approximate solutions and the absolute errors are listed in Table 4 for \(k=0.5\).

Table 3 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 2
Table 4 Results of approximate solutions and the absolute errors for \(k=0.5\) of Example 2

Example 3

Consider the LEFEs (3) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k}}\big (t^{k}y'(t)\big )' =4 t^2e^{2y(t)}-2 (1+k) e^{y(t)},\quad t\in (0,1),\\ \displaystyle \lim _{t\rightarrow 0}t^{k}y'(t)=0,\quad y(1)= \int _{0}^{1} \frac{1}{4} y(s) ds+\bigg (\frac{-1}{2}+ \tan ^{-1}\left( \frac{1}{2}\right) -\frac{3}{4}\ln 5\bigg ). \end{array} \right. \end{aligned}$$
(42)

This problem is a special case of the GTFEs (1) with \(p(t)=q(t)=t^{k}, \quad k>0\), \(f=4 t^2e^{2y(t)}-2 (1+k) e^{y(t)}\). Here, \(g(s)=\frac{1}{4}\) and \(\beta =\frac{-1}{2}+ \tan ^{-1}\left( \frac{1}{2}\right) -\frac{3}{4}\ln 5.\) The exact solution is \(y(t)=\ln \big (\frac{1}{4+t^{2}}\big ).\)

According to (21), we start with \(y_0=\beta ,\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&=-\frac{1}{2}+ \tan ^{-1}\left( \frac{1}{2}\right) -\frac{3}{4}\ln 5,\\ y_{j}(t)&= \displaystyle \int _0^1\frac{1}{4} y_{j-1}(s) ds-\int _t^1\frac{1}{\xi ^{k}}\int _0^\xi s^{k} A_{j-1} dsd\xi , \quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(43)

In view of (43), we find the approximate solutions (for \(k=2\)) is listed as

$$\begin{aligned} \psi _2(t)&= -1.34533-0.277117 t^2+0.0402845 t^4-0.00525404 t^6+0.000153719 t^8, \end{aligned}$$
(44)
$$\begin{aligned} \psi _3(t)&=-1.37199-0.259226 t^2+0.036295 t^4-0.00737899 t^6+0.00137041 t^8\nonumber \\&\quad -0.0000944087 t^{10}+1.84\times 10^{-6} t^{12}. \end{aligned}$$
(45)

The maximum absolute error \(M_{n}\) are given in the Table 5 for \(k=1, k=2, k=5\). The numerical results of approximate solutions and the absolute errors are listed in Table 6 for \(k=2\).

Table 5 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 3
Table 6 Results of approximate solutions and the absolute errors for \(k=2\) of Example 3

Example 4

Consider the LEFEs (3) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{2}}\big (t^{2}y'(t)\big )'=-y^{5}(t),\quad t\in (0,1),\\ \displaystyle y'(0)=0,\quad y(1)= \int _{0}^{1} \frac{1}{100} y(s) ds-\frac{1}{100} \sqrt{3} \bigg (-50+\sinh ^{-1} \left( \frac{1}{\sqrt{3}}\right) \bigg ). \end{array} \right. \end{aligned}$$
(46)

This problem is a special case of GTFEs (1) when \(p(t)=q(t)=t^{2}\), \(f=-y^{5}(t)\). Here, \(g(s)=\frac{1}{100}\) and \(\beta =-\frac{1}{100} \sqrt{3} \bigg (-50+\sinh ^{-1} \left( \frac{1}{\sqrt{3}}\right) \bigg ).\) The exact solution is \( y(t)=\sqrt{\frac{3}{3+t^2}}.\)

According to (21), we start with \(y_0=\beta ,\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&=-\frac{1}{100} \sqrt{3} \bigg (-50+\sinh ^{-1} \left( \frac{1}{\sqrt{3}}\right) \bigg ),\\ y_{j}(t)&= \displaystyle \int _0^1\frac{1}{100} y_{j-1}(s) ds-\int _t^1\frac{1}{\xi ^{2}}\int _0^\xi s^{2} A_{j-1} dsd\xi ~ ~ j=1,2,3,\ldots \end{aligned} \end{aligned}$$
(47)

Using the scheme (47), we find the approximate solutions as

$$\begin{aligned} \psi _2(t)&=0.970462-0.115124 t^2+0.0103368 t^4, \end{aligned}$$
(48)
$$\begin{aligned} \psi _3(t)&=0.983355-0.135569 t^2+0.0196118 t^4-0.00154531 t^6. \end{aligned}$$
(49)

The maximum absolute error \(M_{n}\) are given in the Table 7 for \(k=2\). The numerical results of approximate solutions and the absolute errors are listed in Table 8 for \(k=2\).

Table 7 Maximum absolute error estimate \(M_{n}, n=1,2,3,\ldots ,8\) for Example 4
Table 8 Results of approximate solutions and the absolute errors for \(k=2\) of Example 4

Example 5

Consider the LEFEs (3) subject to subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t}\big (ty'(t)\big )'=-e^{y(t)},\quad 0<t<1,\\ \displaystyle y'(0)=0,\quad y(1)= \int _{0}^{1}\frac{1}{10}y(s) ds+\frac{1}{20} \left( -8+\pi +\sqrt{2} \pi \right) \end{array} \right. \end{aligned}$$
(50)

This problem is a special case of GTFEs (1) when \(p(t)=q(t)=t\), \(f=-e^{y(t)}\). Here, \(g(s)=\frac{1}{10}\) and \(\beta =\frac{1}{20} \left( -8+\pi +\sqrt{2} \pi \right) \). The exact solution is \(y(t)=2\ln \bigg (\frac{4-2\sqrt{2}}{(3-2\sqrt{2}) t^2+1}\bigg ).\)

According to (21), we start with \(y_0=\beta ,\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&=\frac{1}{20} \left( -8+\pi +\sqrt{2} \pi \right) ,\\ y_{j}(t)&= \displaystyle \int _0^1\frac{1}{10} y_{j-1}(s) ds-\int _t^1\frac{1}{\xi }\int _0^\xi s A_{j-1} dsd\xi ~ ~j=1,2,3,\ldots \end{aligned} \end{aligned}$$
(51)

Using the scheme (51), we find the approximate solutions as

$$\begin{aligned} \psi _2(t)&=0.28258-0.304307 t^2+0.014989 t^4, \end{aligned}$$
(52)
$$\begin{aligned} \psi _3(t)&=0.30295-0.326356 t^2+0.0222672 t^4-0.0012234 t^6. \end{aligned}$$
(53)

The maximum absolute error \(M_{n}\) are given in the Table 9 for \(k=1\). The numerical results of approximate solutions and the absolute errors are listed in Table 10 for \(k=1\).

Table 9 Maximum absolute error estimate \(M_{n}, n=1,2,3,\ldots ,8\) for Example 5
Table 10 Results of approximate solutions and the absolute errors for \(k=1\) of Example 5

Thomas–Fermi Type Equations

Example 6

Consider the GTFEs (1) with \(p(t)=t^{k}\), \(q(t)=t^{k+l-2}\) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k+l-2}}\Big (t^{k}y'(t)\Big )'= l (k+l-1) e^{-y(t)} -l^2 t^l e^{-2y(t)},\quad t\in (0,1) \\ \displaystyle y(0)=\ln \big (5\big ),\quad y(1)= \int _{0}^{1} \frac{y(s)}{4} ds\\ \qquad +\frac{1}{20} \left( \text {HurwitzLerchPhi}\left[ -\frac{1}{5},1,1+\frac{1}{l}\right] +15 \ln (6)\right) . \end{array} \right. \end{aligned}$$

Note that the HurwitzLerchPhi[zsa] gives the Hurwitz-Lerch transcendent \(\Phi (z, s, a)\). The Hurwitz-Lerch transcendent is defined as an analytic continuation of

$$\begin{aligned} \Phi (z,s,a) =\sum _{n=0}^{\infty } \frac{z^n}{(n+a)^s}. \end{aligned}$$

Here, \(\gamma =\ln \big (5\big ),~g=\frac{1}{4},\quad \beta =\frac{1}{20} \left\{ \text {HurwitzLerchPhi}\left[ -\frac{1}{5},1,1+\frac{1}{l}\right] +15 \ln (6)\right\} .\) For parameters \(k\in (0,1)\) and \(l=1\), the problem with \(p(t)=t^{k}\) and \(q(t)=t^{k+l-2}\) is a doubly singular. The exact solution is \(y(t)= \ln \big (5+t^{l} \big ).\)

According to (13), we start with \(y_0=\ln \big (5\big ),\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&= \ln \big (5\big ),\\ y_{1}(t)&=\displaystyle \bigg (\frac{1}{20} \left\{ \text {HurwitzLerchPhi}\left[ -\frac{1}{5},1,1+\frac{1}{l}\right] +15 \ln (6)\right\} -\ln \big (5\big ) \bigg )t^{1-k}\\&\quad + t^{1-k} \bigg (\int _0^1\frac{1}{4} y_0 ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k+l-2} A_0 dsd\xi \bigg )-\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k+l-2} A_0 dsd\xi , \\ y_{j}(t)&= \displaystyle t^{1-k} \bigg (\int _0^1\frac{1}{4} y_{j-1} ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k+l-2} A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k+l-2} A_{j-1} dsd\xi , \quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(54)

Using the scheme (54) (for \(l=1, k=0.5\)), we find the approximate solutions as

$$\begin{aligned} \psi _2(t)&=\ln \big (5\big )-0.005554 \sqrt{t}+\frac{t}{5}+0.001855 t^{3/2}-0.02 t^2-0.000445 t^{5/2}\nonumber \\&\quad +0.002311t^3-0.000076 t^4, \end{aligned}$$
(55)
$$\begin{aligned} \psi _3(t)&=\ln \big (5\big )-0.00101 \sqrt{t}+\frac{t}{5}+0.000370 t^{3/2}-0.019987 t^2-0.000237 t^{5/2}\nonumber \\&\quad +0.002658 t^3+0.000106 t^{7/2}-0.000378 t^4-5.276\times 10^{-6} t^{9/2}\nonumber \\&\quad +0.000027t^5-6.156\times 10^{-7} t^6. \end{aligned}$$
(56)

The maximum absolute error \(M_{n}\) are given in the Table 11 for \(k=0.25, k=0.5, k=0.75\) and \(l=1\). The numerical results of approximate solutions and the absolute errors are listed in Table 12 for \(l=1\) and \(k=0.5\).

Table 11 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 6 when \(l=1\)
Table 12 Results of approximate solutions and the absolute errors for \(l=1\) and \(k=0.5\) of Example 6

Example 7

Consider the GTFEs (1) with \(p(t)=t^{k}\), \(q(t)=t^{k-1}\) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k-1}}\Big (t^{k}y'(t)\Big )'= t e^{2y(t)} - k e^{y(t)} ,\quad t\in (0,1) \\ \displaystyle y(0)=\ln \bigg (\frac{1}{2}\bigg ),\quad y(1)= \int _{0}^{1}\frac{1}{4} y(s) ds+\ln \bigg (\frac{1}{3}\bigg )+\frac{1}{4} \left( -1+\ln \left( \frac{27}{4}\right) \right) . \end{array} \right. \end{aligned}$$
(57)

Here, \(\gamma =\ln \big (\frac{1}{2}\big ),\) \(g(s)=\frac{1}{4}\), \(\beta =\ln \big (\frac{1}{3}\big )+\frac{1}{4} \left( -1+\ln \left( \frac{27}{4}\right) \right) \). For any \(k \in (0,1)\), the problem with \(p(t)=t^{k}\), \(q(t)=t^{k-1}\), is a doubly singular. The exact solution is \(y(t)=\ln \big (\frac{1}{2+t}\big )\).

In view of (13), we start with \(y_0=\ln \big (\frac{1}{2}\big ),\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&= \ln \bigg (\frac{1}{2}\bigg ),\\ y_{1}(t)&=\displaystyle \bigg (\ln \bigg (\frac{1}{3}\bigg )+\frac{1}{4} \left( -1+\ln \left( \frac{27}{4}\right) \right) -\ln \bigg (\frac{1}{2}\bigg ) \bigg )t^{1-k} \\&\quad +t^{1-k} \bigg (\int _0^1\frac{1}{4} y_0 ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k-1} A_0 dsd\xi \bigg )-\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k-1} A_0 dsd\xi , \\ y_{j}(t)&= \displaystyle t^{1-k} \bigg (\int _0^1\frac{1}{4} y_{j-1} ds+\int _0^1\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k-1} A_{j-1} dsd\xi \bigg )\\&\quad -\int _0^t\frac{1}{\xi ^{k}}\int _\xi ^1 s^{k-1} A_{j-1} dsd\xi \quad j=2,3,\ldots \end{aligned} \end{aligned}$$
(58)

Using the scheme (58) (for \(l=1, k=0.5\)), we find the approximate solutions as

$$\begin{aligned} \psi _2(t)&=\ln \bigg (\frac{1}{2}\bigg )+0.016449 \sqrt{t}-\frac{t}{2}-0.010883 t^{3/2}+0.125 t^2+0.006530 t^{5/2}\nonumber \\&\quad -0.036111 t^3+0.002976 t^4, \end{aligned}$$
(59)
$$\begin{aligned} \psi _3(t)&=\ln \bigg (\frac{1}{2}\bigg )+0.003265 \sqrt{t}-\frac{t}{2}-0.002741 t^{3/2}+0.124822 t^2+0.003821 t^{5/2}\nonumber \\&\quad -0.041382 t^3-0.003912 t^{7/2}+0.014781 t^4+0.000483 t^{9/2}\nonumber \\&\quad -0.002725 t^5+0.000150t^6. \end{aligned}$$
(60)

The maximum absolute error \(M_{n}\) are given in the Table 13 for \(k=0.25, k=0.5, k=0.75\). The numerical results of approximate solutions and the absolute errors are listed in Table 14 for \(k=0.5\).

Table 13 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 7 when \(l=1\)
Table 14 Results of approximate solutions and the absolute errors for \(l=1\) and \(k=0.5\) of Example 7

Example 8

Consider the GTFEs (1) with \(p(t)=t^{k}\), \(q(t)=t^{k+l-2}\) subject to nonlocal integral type BCs

$$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \frac{1}{t^{k+l-2}}\Big (t^{k}y'(t)\Big )'= l^2 t^l e^{2y(t)}-l (k+l-1) e^{y(t)},\quad t\in (0,1) \\ \displaystyle \lim _{t\rightarrow 0}t^{k}y'(t)=0,\quad y(1)= \int _{0}^{1}\frac{1}{10} y(s) ds\\ \qquad -\frac{1}{40} \left( HurwitzLerchPhi\left[ -\frac{1}{4},1,1+\frac{1}{l}\right] +36 \ln (5)\right) . \end{array} \right. \end{aligned}$$

Here, \(g(s)=\frac{1}{10}\), \(\beta =-\frac{1}{40} \left\{ HurwitzLerchPhi\left[ -\frac{1}{4},1,1+\frac{1}{l}\right] +36 \ln (5)\right\} .\) For the fixed parameters, \(k=0.5\), \(l=1.25\) and \(k=0.25\), \(l=1.25\), this problem with \(p(t)=t^{k}\) and \(q(t)=t^{k+l-2}\), is a doubly singular. The exact solution is \(y(t)=\ln \big (\frac{1}{4+t^l}\big ).\)

According to (21), we start with \(y_0=\beta ,\) and obtain the functions \(y_j\) recursively:

$$\begin{aligned} \begin{aligned} y_0(t)&=-\frac{1}{40} \left\{ HurwitzLerchPhi\left[ -\frac{1}{4},1,1+\frac{1}{l}\right] +36 \ln (5)\right\} ,\\ y_{j}(t)&= \displaystyle \int _0^1\frac{1}{10} y_{j-1}(s) ds-\int _t^1\frac{1}{\xi ^{k}} \int _0^\xi s^{k+l-2} A_{j-1} dsd\xi , ~ j=1, 2,3,\ldots \end{aligned} \end{aligned}$$
(61)

Using the scheme (61) (for \(l=1, k=0.5\)), we find the approximate solutions as

$$\begin{aligned} \psi _2(t)&=-1.38699+0. \sqrt{t}-0.24833 t+0.029474 t^2-0.003626 t^3+0.000138 t^4 \end{aligned}$$
(62)
$$\begin{aligned} \psi _3(t)&=-1.38646+0. \sqrt{t}-0.24975 t+0. t^{3/2}+0.031011 t^2+0. t^{5/2}-0.004929 t^3\nonumber \\&\quad +0.000728t^4-0.000059 t^5+1.52\times 10^{-6} t^6. \end{aligned}$$
(63)

The maximum absolute error \(M_{n}\) are given in the Table 15 for \(k=0.5\), \(k=0.75\), \(k=1\), \(k=2\) and \(l=1\). The numerical results of approximate solutions and the absolute errors are listed in Table 16 for \(l=1\) and \(k=0.5\).

Table 15 Maximum absolute error \(M_{n}, n=1,2,3,\ldots ,8\) of Example 8 when \(l=1\)
Table 16 Results of approximate solutions and the absolute errors for \(l=1\) and \(k=0.5\) of Example 8

Conclusion

An efficient analytical iterative method has been successfully applied for the approximate solutions of the GTFEs and the LEFEs subject to nonlocal integral type BCs. These nonlocal conditions arise mainly when the data on the boundary can not be measured directly. We have first transformed the given nonlocal boundary value problem into an equivalent integral equation in the first step. Then the modified decomposition method has been applied to the resulting integral equation for an approximate solution with high accuracy. The sufficient theorems for a unique solution and the convergence analysis of the proposed method for the nonlocal boundary value problems have been provided and tested. Several numerical examples are studied to confirm the accuracy, applicability, and generality of the proposed method. Numerical results supporting theoretical expectations are given. To the best of our knowledge, no research works on numerical methods for solving such problems subjected to integral type BCs. Our computational results demonstrate the reliability of the numerical treatment with the enhancements provided by using the proposed scheme.