1 Introduction

So far, many researchers have proposed and developed various techniques for solving partial differential equations such as Lie symmetry [1, 2], homotopy perturbation method [3, 4], homotopy analysis method [5, 6], the Adomian decomposition method (ADM) [7, 8], auxiliary equation methods [9, 10], variational iteration method [11,12,13], and so on.

Among those methods, the Adomian decomposition method is a practical technique for solving (initial) boundary value problems for differential equations. What is more, the ADM has been demonstrated to be practical and effective for BVPs of ordinary differential equations. Several different resolution techniques for solving BVPs based on the ADM were considered by Adomian [14], Rach, Wazwaz [15, 16], Dehghan [17, 18], Duan [19], and so on.

On the other hand, for the (initial) boundary value problem of partial differential equations, the solution can be obtained by the ADM that satisfies all of the boundary conditions only with modification of the algorithm to accommodate the boundary. For this reason, Adomian [20] first proposed an algorithm for (initial) boundary value problems of partial differential equations based on the ADM by taking the average of its two partial solutions. Shidfar and Garshasbi [21] proposed a weighted algorithm of the ADM by combining the two partial solutions with a weight. Yun et al. [22] proposed a segmented and weighted Adomian decomposition algorithm to decease the boundary error of the Adomian solution, they also presented a corresponding algorithm.

In [23], although the boundary error of the approximate solution is smaller, there is no guarantee to make the boundary error smaller than any positive real number. To overcome this shortcoming, we propose a new algorithm for solution of the BVP of a partial differential equation on a triangle region based on the ADM combined with a segmented technique. In addition, a theorem is given to ensure that the boundary error in the algorithm can be controlled to become smaller than any positive real number. By the proposed algorithm, the effect of regional recharge model and the heterogeneous aquifer model of the plane triangle groundwater flow are considered in this paper.

2 Segmented Adomian algorithm on the triangle area

We consider a general second-order partial differential equation as follows:

$$\begin{aligned}& \mathrm{L}_{x} h+\mathrm{L}_{y} h+\mathrm{R} h+g(x,y)=0, \quad (x,y)\in D , \end{aligned}$$
(1)
$$\begin{aligned}& D: a \leq x\leq b, c\leq y\leq c+\frac{d-c}{b-a}(x-a), \end{aligned}$$
(2)

with

$$\begin{aligned}& h(b,y)=f_{1}(y), \end{aligned}$$
(3)
$$\begin{aligned}& h(x,y)=f_{2}(x), \quad \mbox{on } y= c+\frac{d-c}{b-a}(x-a), \end{aligned}$$
(4)
$$\begin{aligned}& h(x,c)=f_{3}(x), \end{aligned}$$
(5)

where \(\mathrm{L}_{x}=\partial ^{2}/\partial x^{2}\), \(\mathrm{L}_{y}= \partial ^{2}/\partial y^{2}\), R is a remainder operator, \(g(x,y)\) is a given continuous function, and \(f_{i}\) (\(i=1, 2, 3 \)) are given continuous functions of the corresponding boundaries.

Corresponding to boundary problem (1)–(5), the concrete steps of the segmented Adomian algorithm are as follows:

Step 1: Let \(i=0\), \(A_{i}=\emptyset\), \(B_{i}=\emptyset\) (empty set), \(C_{i}=D\), \(x_{0}=a\), \(y_{0}=c\), \(x_{1}=b\), \(y_{1}=d\).

Step 2: Let \(\bar{x}=(x_{0}+x_{1})/2\), \(\bar{y}=(y_{0}+y_{1})/2\), \(l_{1}(x)=y_{0}+(\bar{y}-y_{0})/(\bar{x}-x _{1})(x-x_{1})\), \(l_{2}(x)=y_{0}+(y_{1}-y_{0})/(x_{1}-x_{0})(x-x_{0})\), \(\tilde{l_{1}}(y)=x_{1}+(\bar{x}-x_{1})/(\bar{y}-y_{0})(y-y_{0})\), \(\tilde{l_{2}}(y)=x_{0}+(x_{1}-x_{0})/(y_{1}-y_{0})(y-y_{0})\).

Step 3: The Adomian decomposition method is applied to solve Eq. (1) with (3)–(4). In this process, the inverse operator \(\mathrm{L}_{C}^{-1}\) is taken as follows:

$$\begin{aligned}& \mathrm{L}_{C}^{-1}= \int _{\tilde{l_{2}}(y)}^{x} \int _{\tilde{l_{2}}(y)} ^{x} \,dx\,dx-\frac{x-\tilde{l_{2}}(y)}{x_{1}-\tilde{l_{2}}(y)} \int _{\tilde{l_{2}}(y)}^{x_{1}} \int _{\tilde{l_{2}}(y)}^{x} \,dx\,dx. \end{aligned}$$
(6)

For convenience, \(H_{C_{i}}(x,y)\) is used to denote the solution on \(C_{i}\) obtained in this step.

Step 4: Except on the boundary line \(y=y_{0}\) on \(C_{i}\), the boundary conditions are precisely satisfied by \(H_{C_{i}}\). So, we use the following formula to characterize the boundary error:

$$\begin{aligned} \widetilde{BE}= \bigl\Vert H_{C_{i}}(x,y_{0})-f_{3}(x) \bigr\Vert _{2}^{2}= \int _{x_{0}} ^{x_{1}} \bigl(H_{C_{i}}(x,y_{0})-f_{3}(x) \bigr)^{2}\,dx. \end{aligned}$$
(7)

Step 5: If \(\widetilde{BE}>\delta \) (δ is a given small number that is preassigned as the boundary error limit), then the calculation is continued to Step 6. Otherwise, the calculation is stopped, and one obtains the segmented approximate solution as follows:

$$\begin{aligned} H(x,y)= \textstyle\begin{cases} H_{A_{j}}(x,y), &(x,y)\in A_{j},j=0,1,2,\ldots ,i;\\ H_{B_{j}}(x,y), &(x,y)\in B_{j},j=0,1,2,\ldots ,i;\\ H_{C_{i}}(x,y), &(x,y)\in C _{i}. \end{cases}\displaystyle \end{aligned}$$
(8)

Step 6: Setting \(i=i+1\) and \(H_{A_{i}}(x,y)=H_{C_{i-1}}(x,y)\). Then, using the lines \(y=y_{0}+(\bar{y}-y_{0})/(\bar{x}-x_{1})(x-x _{1})\) and \(x=\bar{x}\), the area \(C_{i-1}\) is divided into three parts \(A_{i}\), \(B_{i}\), and \(C_{i}\) (see Fig. 1):

$$\begin{aligned} \begin{aligned} & A_{i}:\bar{x}\leq x\leq x_{1}, l_{1}(x)\leq y\leq l_{2}(x); \\ & B _{i}:\bar{x}\leq x\leq x_{1},y_{0}\leq y\leq l_{1}(x); \\ & C_{i}: x _{0}\leq x\leq \bar{x}, y_{0}\leq y \leq l_{2}(x). \end{aligned} \end{aligned}$$
(9)
Figure 1
figure 1

Regional division

Step 7: Eq. (1) with the boundary conditions \(h(x,y_{0})=f_{3}(x)\), \(h(x,l_{1}(x))=H_{A_{i}}(x,l_{1}(x))\) is solved by the Adomian decomposition method. In this process, the inverse operator \(\mathrm{L}_{B}^{-1}\) is taken as follows:

$$\begin{aligned}& \mathrm{L}_{B}^{-1}= \int _{y_{0}}^{y} \int _{y_{0}}^{y} \,dy\,dy-\frac{y-y _{0}}{l_{1}(x)-y_{0}} \int _{y_{0}}^{l_{1}(x)} \int _{y_{0}}^{y} \,dy\,dy, \end{aligned}$$
(10)

where \(H_{B_{i}}(x,y)\) \(((x,y)\in B_{i})\) denotes the solution obtained in this step.

Step 8: Set \(x_{1}=\bar{x}\), \(y_{1}=\bar{y}\), \(f_{1}(y)=H_{B_{i}}(x _{1},y)\), then proceed to Step 2.

3 The convergence theorem of the algorithm

Definition

The norm of a continuous function \(f(x)\) on the closed interval \([a,b]\) is defined as follows:

$$\begin{aligned} \bigl\Vert f(x) \bigr\Vert _{[a,b]}=\max_{x\in [a,b]} \bigl\vert f(x) \bigr\vert . \end{aligned}$$
(11)

The norm of a continuous function \(f(x,y)\) on the plane closed region D is defined as follows:

$$\begin{aligned} \bigl\Vert f(x,y) \bigr\Vert _{D}=\max_{(x,y)\in D} \bigl\vert f(x,y) \bigr\vert . \end{aligned}$$
(12)

There relations (11) and (12) are considered the \(L_{\infty }\)-error. Thus, the approximate degree of congruence of \(f(x,y)\) with \(g(x,y)\) on D should be characterized by \(\|f(x,y)-g(x,y)\|_{D}\).

Theorem

For an arbitrary small real number \(\delta >0\), there exists a natural number \(N>0\) such that when \(i>N\) (i is the number of iterations of the algorithm, namely the number of times dividing the area (2)), one has

$$ \widetilde{BE}= \bigl\Vert H_{C_{i}}(x,y_{0})-f_{3}(x) \bigr\Vert _{2}^{2} < \delta , $$
(13)

if there exists a real number \(\epsilon >0\) such that \(\|H(x,y)-h(x,y)\|_{D}<\epsilon \), namely the approximate solution \(H(x,y)\) (\((x,y)\in D \)) uniformly converges to the exact solution \(h(x,y)\) of boundary problem (1)(18).

Proof

According to the continuity of the functions \(H_{C_{i}}(x,y_{0})\) and \(f_{3}(x)\) on \([x_{0},\bar{x}]\), one has

$$\begin{aligned} \widetilde{BE} =& \int _{x_{0}}^{\bar{x}} \bigl(H_{C_{i}}(x,y_{0})-f _{3}(x) \bigr)^{2}\,dx \\ \leq & \bigl\Vert H_{C_{i}}(x,y_{0})-f_{3}(x) \bigr\Vert _{[x_{0},\bar{x}]}^{2}\cdot ( \bar{x}-x_{0}) \\ \leq & \bigl( \bigl\Vert H_{C_{i}}(x,y_{0}) \bigr\Vert _{[x_{0},\bar{x}]}+ \bigl\Vert f_{3}(x) \bigr\Vert _{[x _{0},\bar{x}]} \bigr)^{2}\cdot \frac{b-a}{2^{i}} \\ \leq & \bigl( \bigl\Vert H_{C_{i}}(x,y) \bigr\Vert _{C_{i}}+ \bigl\Vert f_{3}(x) \bigr\Vert _{[x_{0},\bar{x}]} \bigr) ^{2}\cdot \frac{b-a}{2^{i}} \\ \leq & \bigl( \bigl\Vert H_{C_{i}}(x,y)-h(x,y) \bigr\Vert _{C_{i}}+ \bigl\Vert h(x,y) \bigr\Vert _{C_{i}}+ \bigl\Vert f _{3}(x) \bigr\Vert _{[x_{0},\bar{x}]} \bigr)^{2}\cdot \frac{b-a}{2^{i}} \\ \leq & \bigl( \bigl\Vert H_{D}(x,y)-h(x,y) \bigr\Vert _{D}+ \bigl\Vert h(x,y) \bigr\Vert _{D}+ \bigl\Vert f_{3}(x) \bigr\Vert _{[a,b]} \bigr) ^{2}\cdot \frac{b-a}{2^{i}} \\ \leq &M\cdot 2^{-i}, \end{aligned}$$

where \(M= (\epsilon +\|h(x,y)\|_{D}+\|f_{3}(x)\|_{[a,b]} ) ^{2}\cdot (b-a)\).

Thus, for an arbitrarily small real number \(\delta >0\), while \(N=[\log _{2}(M/\delta )]\) and \(i>N\), the result \(\widetilde{BE}< \delta \) is established. □

Because we are unable to calculate \(\|H(x,y)-h(x,y)\|_{D}\), we define the residual error function to characterize the accuracy of the approximate solutions. Define an error function as follows:

$$\begin{aligned}& \operatorname{Error}(h)=\mathrm{L}_{x} h+\mathrm{L}_{y} h+ \Re h +g(x,y). \end{aligned}$$
(14)

Then \(\widetilde{EE}=\|\operatorname{Error}(h(x,y))\|_{2}^{2}\) characterizes the accuracy of the approximate solutions to Eq. (1), where \(\|\cdot \|_{2} \) denotes the \(L^{2}\)-norm. If \(\widetilde{EE}\) and \(\widetilde{BE}\) are equal to zero at the same time, \(h(x,y)\) is the exact solution of boundary problem (1)–(18). Otherwise, \(h(x,y)\) is an approximate solution, where the values of \(\widetilde{EE}\), \(\widetilde{BE}\) characterize the equation and boundary errors.

4 Application of this algorithm

4.1 The model for the effect of regional recharge of the triangle groundwater flow region

Syafrin and Serrano [24] used the model for the effect of regional recharge to study the groundwater flow in the Louisville aquifer. Serrano [25] studied a simple approach to groundwater modeling with decomposition. Dehghan [26] uses the orthogonal decomposition discrete empirical interpolation method (POD-DEIM) to prevent groundwater pollution. In this section, we reconsider the model for the effect of regional recharge on the triangle groundwater flow region. The governing equation of the model is as follows:

$$\begin{aligned} \frac{\partial ^{2} h}{\partial x^{2}}+\frac{\partial ^{2} h}{\partial y^{2}}=-\frac{R_{g}}{T}, \quad 0\leq x\leq 600, 0\leq y\leq x, \end{aligned}$$
(15)

with the boundary conditions

$$\begin{aligned}& h(600,y)=-\frac{y^{2}}{450\text{,}000}+\frac{3 y}{1000}+102, \end{aligned}$$
(16)
$$\begin{aligned}& h(x,y)=-\frac{x^{2}}{125\text{,}000}+\frac{49 x}{5000}+100,\quad \mbox{on }y=x, \end{aligned}$$
(17)
$$\begin{aligned}& h(x,0)=-\frac{3 x^{2}}{500\text{,}000}+\frac{13 x}{1875}+100, \end{aligned}$$
(18)

where h is the hydraulic head \([L]\); \(R_{g}\) is mean monthly recharge from rainfall \([LT^{-1}]\); T is the mean aquifer transmissivity \([L^{2}T^{-1}]\); and a and b are the aquifer horizontal dimensions in the x and y direction, respectively \([L]\). A typical recharge rate from rainfall \(R_{g}=10\text{ mm}\)/month, aquifer transmissivity of \(T=100\text{ m}^{2}\)/month. Then Eq. (15) is rewritten

$$\begin{aligned} \mathrm{L}_{x} h(x,y)+\mathrm{L}_{y}h(x,y)=- \frac{R_{g}}{T}. \end{aligned}$$
(19)

The specific process of the algorithm for the model is as follows:

Step 1: Set \(i=0\), \(x_{0}=0\), \(y_{0}=0\), \(x_{1}=600\), \(y_{1}=600\), \(l _{1}(x)=-x+600\), \(l_{2}(x)=x\), and \(C_{0}=\{(x,y)|0\leq x\leq 600, 0 \leq y\leq x\}\).

Step 2: Problem (15) with boundary conditions (16) and (17) is considered. Applying the inverse operator \(\mathrm{L}_{C}^{-1}\) on the both sides of Eq. (15), we obtain

$$\begin{aligned} \begin{aligned} &\sum_{n=0}^{\infty }h_{n}=f_{2}(y)+ \frac{x-y}{600-y}\bigl(f_{1}(y)-f_{2}(y)\bigr)- \mathrm{L}_{C}^{-1} \frac{R_{g}}{T}-\mathrm{L}_{C}^{-1} \mathrm{L} _{y} \sum_{n=0}^{\infty }h_{n}, \end{aligned} \end{aligned}$$
(20)

where

$$\begin{aligned} \mathrm{L}_{C}^{-1}= \int _{y}^{x} \int _{y}^{x} \,dx\,dx-\frac{x-y}{600-y} \int _{y}^{600} \int _{y}^{x} dx\,dx. \end{aligned}$$

The following recursion formulae are constructed from the above equation:

$$\begin{aligned} \begin{aligned} &h_{0}=f_{2}(y)+ \frac{x-y}{600-y}\bigl(f_{1}(y)-f_{2}(y)\bigr)- \mathrm{L}_{C} ^{-1}\frac{R_{g}}{T}, \\ &h_{n}=-\mathrm{L}_{C}^{-1}\mathrm{L}_{y} \,h _{n-1},\quad n=1,2,\ldots . \end{aligned} \end{aligned}$$
(21)

From the recursion formulae (21), we obtain \(h_{0}\), \(h_{1}\), then \(h_{n}=0\) (\(n\geq 2\)), i.e., the solution \(H_{C_{0}}\) of (15) with conditions (16) and (17) is obtained as follows:

$$\begin{aligned} H_{C_{0}}(x,y)=-\frac{43 x^{2}}{900\text{,}000}+\frac{21 x y}{500\text{,}000}+\frac{4 x}{125}- \frac{y^{2}}{450\text{,}000}-\frac{111 y}{5000}+100,\quad (x,y)\in C_{0}. \end{aligned}$$
(22)

Step 3: Because \(\widetilde{BE}=4524\), we set \(H_{A_{1}}(x,y)=H _{C_{0}}(x,y)\) and continue to the next step.

Step 4: Applying the lines \(x=300\) and \(y=600-x\), the domain \(C_{0}: 0\leq x\leq 600\), \(0\leq y\leq x\) is divided into three parts (see Fig. 2):

$$\begin{aligned} \begin{aligned} &A_{1}:300\leq x\leq 600,\quad 600-x\leq y \leq x; \\ &B_{1}:300\leq x\leq 600,\quad 0\leq y\leq 600-x; \\ &C_{1}:0\leq x\leq 300,\quad 0\leq y\leq x. \end{aligned} \end{aligned}$$
(23)
Figure 2
figure 2

Regional division

Step 5: Solving the problem in the domain \(B_{1}\) with the boundary conditions \(h(x,0)=f_{3}(x)\), \(h(x,600-x)=H_{A_{1}}(x,600-x)\). After applying \(\mathrm{L}_{B}^{-1}\) on the both sides of Eq. (15), the following recursion formulae are constructed:

$$\begin{aligned} \begin{aligned} &h_{0}=f_{3}(x)+ \frac{y}{600-x}\bigl(H_{A_{1}}(x,600-x)-f_{3}(x)\bigr)- \mathrm{L}_{B}^{-1}\frac{R_{g}}{T}, \\ &h_{n}=-\mathrm{L}_{B}^{-1} \mathrm{L}_{x} \,h_{n-1},\quad n=1,2,\ldots , \end{aligned} \end{aligned}$$
(24)

where

$$\begin{aligned} \mathrm{L}_{B}^{-1}= \int _{0}^{y} \int _{0}^{y} \,dy\,dy-\frac{y}{600-x} \int _{0}^{600-x} \int _{0}^{y} \,dy\,dy. \end{aligned}$$

From the recurrence formulae, we obtain \(h_{n}=0\) (\(n\geq 2\)), i.e., the solution is as follows:

$$\begin{aligned} H_{B_{1}}(x,y)=-\frac{3 x^{2}}{500\text{,}000}+\frac{21 x y}{500\text{,}000}+\frac{13 x}{1875}- \frac{11 y^{2}}{250\text{,}000}+\frac{43 y}{15\text{,}000}+100,\quad (x,y)\in B _{1}. \end{aligned}$$

Step 6: Solving the problem on \(C_{1}\) with the boundary conditions \(h(y,y)=f_{2}(y)\), \(h(300,y)=H_{B_{1}}(300,y)\). After applying \(\mathrm{L}_{C}^{-1}\) on both sides of Eq. (15), the following recursion formulae are constructed:

$$\begin{aligned} \begin{aligned} &h_{0}=f_{2}(y)+ \frac{x-y}{-y+300}\bigl(H_{B_{1}}(300,y)-f_{2}(y)\bigr)- \mathrm{L}_{C}^{-1}\frac{R_{g}}{T}, \\ &h_{n}=-\mathrm{L}_{C}^{-1} \mathrm{L}_{x} \,h_{n-1},\quad n=1,2,\ldots , \end{aligned} \end{aligned}$$
(25)

where

$$\begin{aligned} \mathrm{L}_{A}^{-1}= \int _{x}^{y} \int _{x}^{y} \,dx\,dx- \frac{x-y}{-y+300} \int _{y}^{300} \int _{x}^{y} dx\,dx. \end{aligned}$$

Thus, the solution is obtained as follows:

$$\begin{aligned} H_{C_{1}}=-\frac{3 x^{2}}{500\text{,}000}+\frac{21 x y}{500\text{,}000}+ \frac{13 x}{1875}- \frac{11 y^{2}}{250\text{,}000}+\frac{43 y}{15\text{,}000}+100,\quad (x,y) \in C_{1}. \end{aligned}$$

At this moment, the boundary error \(\widetilde{BE}=0\), so the calculation is stopped. The segment solution is obtained as follows:

$$\begin{aligned} H(x,y)= \textstyle\begin{cases} H_{A_{1}}(x,y), &300\leq x\leq 600, -x+600\leq y\leq x;\\ H_{B_{1}}(x,y), &300\leq x\leq 600, 0\leq y\leq -x+600;\\ H_{C_{1}}(x,y), &0\leq x\leq 300, 0\leq y\leq x. \end{cases}\displaystyle \end{aligned}$$
(26)

For the solution \(H(x,y)\), \(\widetilde{EE}=0\) and \(\widetilde{BE}=0\). Thus the solution \(H(x,y)\) is indeed the exact solution of the problem.

4.2 A heterogeneous aquifer model of the triangular groundwater flow region

The governing differential equation of the model is as follows:

$$\begin{aligned} \frac{\partial }{\partial x} \biggl[T(x,y)\frac{\partial h(x,y)}{ \partial x} \biggr]+\frac{\partial }{\partial y} \biggl[T(x,y)\frac{ \partial h(x,y)}{\partial y} \biggr]=-R_{g},\quad 0\leq x\leq 600,0 \leq y \leq x, \end{aligned}$$
(27)

where \(h(x,y)\) is the head function \([L]\); \(R_{g}=10^{-2}\) represents monthly average rainfall recharge \([LT^{-1}]\); \(T(x,y)=500-0.2x-0.1y\) represents aquifer permeability \([L^{2}T^{-1}]\). Boundary conditions (16)–(18) are also considered in this model.

Thus Eq. (28) is rewritten as follows:

$$\begin{aligned} \mathrm{L}_{x} h(x,y)+\mathrm{L}_{y}h(x,y)=- \frac{R_{g}}{T(x,y)}- \frac{1}{T(x,y)}\frac{\partial T}{\partial x} \frac{\partial h}{ \partial x}- \frac{1}{T(x,y)}\frac{\partial T}{\partial y} \frac{ \partial h}{\partial y}, \end{aligned}$$
(28)

where \(\mathrm{L}_{x}=\partial ^{2}/\partial x^{2}\), \(\mathrm{L}_{y}= \partial ^{2}/\partial y^{2}\).

The function \(1/T(x,y)\) is expanded at the origin according to Taylor’s formula as follows:

$$\begin{aligned} \frac{1}{T(x,y)}=t_{1}+\sum_{k=2}^{\infty }t_{k}, \end{aligned}$$
(29)

where

$$\begin{aligned}& t_{1}=\frac{1}{T(0,0)}+ \biggl(x\frac{\partial }{\partial x'}+y \frac{ \partial }{\partial y'} \biggr)\frac{1}{T(x',y')}\biggm|_{x'=0,y'=0}, \end{aligned}$$
(30)
$$\begin{aligned}& t_{k}=\frac{1}{k!} \biggl(x\frac{\partial }{\partial x'}+y \frac{ \partial }{\partial y'} \biggr)^{k}\frac{1}{T(x',y')}\biggm|_{x'=0,y'=0} ,\quad k\geq 2. \end{aligned}$$
(31)

The concrete process of the calculation for the model by the algorithm is as follows:

Step 1: Setting \(i=0\), \(x_{0}=0\), \(y_{0}=0\), \(x_{1}=600\), \(y_{1}=600\) and \(A_{i}=\varnothing \), \(B_{i}=\varnothing \), \(C_{i}=\{(x,y)|0 \leq x\leq 600, 0\leq y\leq x\}\).

Step 2: Setting \(\bar{x}=x_{1}/2\), \(l_{1}(x)=x_{1}-x\), \(l_{2}(x)=x\), \(\tilde{l}_{1}(y)=x_{1}-y\), \(\tilde{l}_{2}(y)=y\).

Step 3: Problem (28) with the boundary conditions \(h(x_{1},y)=f_{1}(y)\) and \(h(y,y)=f_{2}(y)\) is considered by the ADM. Applying \(\mathrm{L}_{C}^{-1}\) on the both sides of Eq. (28), we obtain

$$\begin{aligned} \begin{aligned}[b]\sum_{n=0}^{\infty }h_{n}={}&f_{2}(y)+ \frac{x-y}{600-y}\bigl(f_{1}(y)-f_{2}(y)\bigr)- \mathrm{L}_{C}^{-1}\mathrm{L}_{y} \sum _{n=0}^{\infty }h_{n} \\ & {} -\mathrm{L}_{C}^{-1} \biggl(\frac{R_{g}}{T(x,y)}+ \frac{1}{T(x,y)}\frac{\partial T}{\partial x}\frac{\partial h}{\partial x}+\frac{1}{T(x,y)} \frac{\partial T}{\partial y}\frac{\partial h}{ \partial y} \biggr), \end{aligned} \end{aligned}$$
(32)

where

$$\begin{aligned}& \frac{1}{T(x,y)}\frac{\partial h}{\partial x}=\sum_{i=1}^{\infty } \sum_{j=0}^{i-1}t_{i-j} \frac{\partial h_{j}}{\partial x}, \end{aligned}$$
(33)
$$\begin{aligned}& \frac{1}{T(x,y)}\frac{\partial h}{\partial y}=\sum_{i=1}^{\infty } \sum_{j=0}^{i-1}t_{i-j} \frac{\partial h_{j}}{\partial y}. \end{aligned}$$
(34)

From the aforementioned equation, the following recursion formulae are obtained:

$$\begin{aligned}& h_{0}=f_{2}(y)+\frac{x-y}{x_{1}-y} \bigl(f_{1}(y)-f_{2}(y)\bigr)-\mathrm{L}_{C} ^{-1}R_{g}t_{1}, \\& h_{n}=-\mathrm{L}_{C}^{-1}\mathrm{L}_{y} \,h_{n-1}- \mathrm{L}_{C}^{-1}R_{g}t_{n+1}- \mathrm{L}_{C}^{-1}\Biggl(\frac{ \partial T}{\partial x}\sum _{j=0}^{n-1}t_{n-j}\frac{\partial h_{j}}{ \partial x} + \frac{\partial T}{\partial y}\sum_{j=0}^{n-1}t _{n-j}\frac{\partial h_{j}}{\partial y}\Biggr),\\& \quad n=1,2,\ldots , \end{aligned}$$

where

$$\begin{aligned} \mathrm{L}_{C}^{-1}= \int _{y}^{x} \int _{y}^{x} \,dx\,dx- \frac{x-y}{x_{1}-y} \int _{y}^{x_{1}} \int _{y}^{x} \,dx\,dx. \end{aligned}$$

Thus, the n-term approximate Adomian solution of the problem on \(C_{i}\) is obtained as follows:

$$\begin{aligned} H_{C_{i}}(x,y)=\sum_{i=0}^{n}h_{i}. \end{aligned}$$
(35)

For the 3-term approximate solution \(H_{C_{0}}\), \(\widetilde{EE}=2.60546 \times 10^{-7}\) and the graph of the equation error function is as in Fig. 3.

Figure 3
figure 3

Error analysis function on \(A_{1}\)

Step 4: If \(\widetilde{BE}>\delta \) (for example, \(\delta =0.001\)), set \(i=i+1\), \(H_{A_{i}}(x,y)=H_{C_{i}-1}(x,y)\) and continue to the next step. Otherwise, the calculation is stopped, as one obtains the segmented approximate solution (8).

For the 3-term approximate solution \(H_{C_{0}}\), \(\widetilde{BE}=8.11375<0.01\), so set \(i=i+1\), \(H_{A_{1}}(x,y)=H_{C _{0}}(x,y)\) and continue to the next step.

Step 5: Using the lines \(x=\bar{x}\) and \(y=x_{1}-x\), the domain \(C_{i-1}\) is divided into three parts (see Fig. 2):

$$\begin{aligned} \begin{aligned} & A_{i}:\bar{x}\leq x\leq x_{1}, l_{1}(x)\leq y\leq l_{2}(x); \\ & B _{i}:\bar{x}\leq x\leq x_{1},y_{0}\leq y\leq l_{1}(x); \\ & C_{i}: x _{0}\leq x\leq \bar{x}, y_{0}\leq y \leq l_{2}(x). \end{aligned} \end{aligned}$$
(36)

Step 6: Solving the problem in \(B_{i}\) with the boundary conditions \(h(x,0)=f_{3}(x)\), \(h(x,x_{1}-x)=H_{A_{i}}(x,x_{1}-x)\). After applying \(\mathrm{L}_{B}^{-1}\) on both sides of Eq. (28), the following recursion formulae are constructed:

$$\begin{aligned}& h_{0}=f_{3}(x)+\frac{y}{x_{1}-x}\bigl(h(x,x_{1}-x)-f_{3}(x) \bigr)-\mathrm{L} _{B}^{-1}R_{g}t_{1}, \\& h_{n}=-\mathrm{L}_{B}^{-1}\mathrm{L}_{x} \,h _{n-1}-\mathrm{L}_{B}^{-1}R_{g}t_{n+1}- \mathrm{L}_{B}^{-1} \Biggl(\frac{ \partial T}{\partial x}\sum _{j=0}^{n-1}t_{n-j}\frac{\partial h_{j}}{ \partial x} + \frac{\partial T}{\partial y}\sum_{j=0}^{n-1}t _{n-j}\frac{\partial h_{j}}{\partial y}\Biggr),\\& \quad n=1,2,\ldots , \end{aligned}$$

where

$$\begin{aligned} \mathrm{L}_{B}^{-1}= \int _{0}^{y} \int _{0}^{y} \,dy\,dy-\frac{y}{x_{1}-x} \int _{0}^{x_{1}-x} \int _{0}^{y} \,dy\,dy. \end{aligned}$$

From the above recurrence formulae, the n-term approximate Adomian solution of the problem on \(B_{i}\) is obtained as follows:

$$\begin{aligned} H_{B_{i}}(x,y)=\sum_{i=0}^{n}h_{i}. \end{aligned}$$
(37)

For the 3-term approximate solution \(H_{B_{1}}(x,y)\), \(\widetilde{EE}=2.23031\times 10^{-7}\), and the graph of the equation error function is as in Fig. 4.

Figure 4
figure 4

Error analysis chart on \(B_{1}\)

Step 7: Set \(x_{1}=\bar{x}\), \(y_{1}=y_{1}/2\), \(f_{1}(y)=H_{B_{i}}(x _{1},y)\), then go to Step 2.

In the same way, the calculation is repeated. Since \(i=2\), \(\widetilde{BE}=0.007\), the calculation is stopped, we obtain the segmented approximate solution (as shown in Fig. 5) as follows:

$$\begin{aligned} H(x,y)= \textstyle\begin{cases} H_{A_{1}}(x,y), & (x,y)\in A_{1};\\ H_{B_{1}}(x,y), & (x,y)\in B_{1};\\ H_{A_{2}}(x,y), & (x,y)\in A_{2};\\ H_{B_{2}}(x,y), & (x,y)\in B_{2};\\ H_{C_{2}}(x,y), & (x,y)\in C_{2}. \end{cases}\displaystyle \end{aligned}$$
(38)
Figure 5
figure 5

The segmented solution \(H(x,y)\), where \((x,y)\in D\)

5 Discussion and conclusions

Through the proposed algorithm, we can make the boundary error of the BVP smaller than any positive number. As for the model for the effect of regional recharge on the plane triangle groundwater flow region, we have obtained the segmented exact solution of the problem by our new algorithm, which satisfies the governing equation and all of the boundary conditions of the boundary value problem.

Though the proposed algorithm combined with Taylor’s formula, the heterogeneous aquifer model on the plane triangle groundwater flow region is considered, we have obtained the segmented high-precision approximate solution of this problem. In the solving process, while \(i=0\), \(\widetilde{BE}=8.11375\); while \(i=1\), \(\widetilde{BE}=0.34675\); when \(i=2\), \(\widetilde{BE}=0.007\). Those results are compared with the results in [23], the boundary has been controlled to smaller than any real number, but not in [23]. From those processes, we can validate the effectiveness of the algorithm.

If the remainder operator R in Eq. (1) were to include a nonlinear operator, then our proposed algorithm would become an algorithm for solving of a second-order nonlinear partial differential equation on a triangle domain. Thus the proposed method can be used to solve either a general second-order nonlinear or a linear partial differential equation on a plane triangle domain.

We will consider modifying the ADM with supplemental algorithms depending on whether it is an IVP, or various types of BVPs, e.g., whether it is a Dirichlet BVP, Neumann BVP, Robin BVP, or possible combinations of mixed boundary conditions. Furthermore, we will always need to consider modifying the ADM with supplemental algorithms depending on the shape of the boundary contours, i.e., rectangular boundary contours are usually simpler; for highly irregular boundary contours, we can do so because of the versatility of the ADM.

In addition, based on the idea of the algorithm, other methods (such as homotopy perturbation method, the variational iteration method, the homotopy analysis method [6, 11,12,13, 27, 28], and the segmented technique are used to solve the boundary value problem of a second-order partial differential equation on a plane triangle area. Now, we take the homotopy perturbation method as an example to consider the model for the effect of regional recharge of the triangle groundwater flow region. Specific steps are as follows.

Step 1: Problem (15) with boundary conditions (16) and (17) is considered. First, the homotopy equations of Eq. (15) are constructed as follows:

$$\begin{aligned} \mathrm{L}_{x} h(x,y)+p \mathrm{L}_{y}h(x,y)=- \frac{R_{g}}{T}. \end{aligned}$$
(39)

Then, substituting \(h(x,y)=\sum_{i=0}^{\infty } p^{i} u_{i}(x,y)\) into (39), then letting the coefficients of various powers of p be zero, we obtain a series of systems for \(u_{i}\) as follows:

$$\begin{aligned}& \mathrm{L}_{x} u_{0}(x,y)+\frac{1}{10\text{,}000}=0, \end{aligned}$$
(40)
$$\begin{aligned}& \mathrm{L}_{y}u_{i-1}(x,y)+\mathrm{L}_{x} u_{i}(x,y)=0,\quad i=1,2,\ldots . \end{aligned}$$
(41)

Solving this system, we obtained \(h_{n}=0\) \((n\geq 2)\), and the solution \(H_{A_{1}}(x,y)\) of (15) with conditions (16) and (17) is obtained again as follows:

$$\begin{aligned} H_{A_{1}}(x,y)=-\frac{43 x^{2}}{900\text{,}000}+\frac{21 x y}{500\text{,}000}+\frac{4 x}{125}- \frac{y^{2}}{450\text{,}000}-\frac{111 y}{5000}+100,\quad (x,y)\in C_{0}. \end{aligned}$$
(42)

Step 2: Solving the problem in the domain \(B_{1}\) in Fig. 2 with the boundary conditions \(h(x,0)=f_{3}(x)\), \(h(x,600-x)=H_{A_{1}}(x,600-x)\). There the homotopy equations of Eq. (15) are constructed as follows:

$$\begin{aligned} p \mathrm{L}_{x} h(x,y)+\mathrm{L}_{y}h(x,y)=- \frac{R_{g}}{T}. \end{aligned}$$
(43)

Then, substituting \(h(x,y)=\sum_{i=0}^{\infty } p^{i} u_{i}(x,y)\) into (43), then letting the coefficients of various powers of p be zero, we obtain a series of systems for \(u_{i}\). Solving this system, we obtained \(h_{n}=0\) \((n\geq 2)\), and the solution \(H_{B_{1}}(x,y)\) of (15) with conditions (16) and (17) is obtained again.

Step 3: Solving the problem on \(C_{1}\) in Fig. 2 with the boundary conditions \(h(y,y)=f_{2}(y)\), \(h(300,y)=H_{B_{1}}(300,y)\).There the homotopy equations of Eq. (15) are constructed as follows:

$$\begin{aligned} \mathrm{L}_{x} h(x,y)+p \mathrm{L}_{y}h(x,y)=- \frac{R_{g}}{T}. \end{aligned}$$
(44)

Then, substituting \(h(x,y)=\sum_{i=0}^{\infty } p^{i} u_{i}(x,y)\) into (44), then letting the coefficients of various powers of p be zero, we obtain a series of systems for \(u_{i}\). Solving this system, we obtained \(h_{n}=0\) \((n\geq 2)\), and the solution \(H_{C_{1}}(x,y)\) of (15) with conditions (16) and (17) is obtained again. Thus, the segment solution (26) is obtained again. The result shows the effectiveness of the idea of the algorithm.