- Research
- Open Access
- Published:

# Boundary shape function method for nonlinear BVP, automatically satisfying prescribed multipoint boundary conditions

*Boundary Value Problems*
**volume 2020**, Article number: 139 (2020)

## Abstract

It is difficult to exactly and automatically satisfy nonseparable multipoint boundary conditions by numerical methods. With this in mind, we develop a novel algorithm to find solution for a second-order nonlinear boundary value problem (BVP), which automatically satisfies the multipoint boundary conditions prescribed. A novel concept of boundary shape function (BSF) is introduced, whose existence is proven, and it can satisfy the multipoint boundary conditions a priori. In the BSF, there exists a free function, from which we can develop an iterative algorithm by letting the BSF be the solution of the BVP and the free function be another variable. Hence, the multipoint nonlinear BVP is properly transformed to an initial value problem for the new variable, whose initial conditions are given arbitrarily. The BSF method (BSFM) can find very accurate solution through a few iterations.

## Introduction

Many engineering problems can be modeled by ordinary differential equations (ODEs). When they are subjected to prescribed boundary conditions, we encounter the boundary value problems (BVPs), which manifest themselves in many applications, for instance, engineering, control theory, and optimization. For the details of the conditions for the existence and uniqueness of solutions of second-order BVPs, we refer to [1–3].

The multipoint BVPs arise when the states of an ODE system are measured at many points, which are important in many areas of engineering applications. The multipoint BVPs have attracted a lot of researchers. For three-point BVP of the second-order ODE, Ahmad et al. [4] adopted the quasilinearization method to obtain a monotone sequence, which converged quadratically to a solution. After that, Henderson [5] developed a double fixed-point theorem, applied to yield the existence of at least two nonnegative solutions for the second-order three-point BVP. Then, Sun and Liu [6] investigated the existence of a nontrivial solution for the three-point BVP. Several sufficient conditions for the existence of nontrivial solution were obtained by using Leray–Schauder nonlinear alternative. Yao [7] studied the existence of positive solution for two classes of nonlinear second-order three-point BVPs by utilizing some monotone iterative schemes; however, this approach was complex. Then, Luo and Ma [8] extended Anderson’s results to the more general BVP on time scales. They used Guo–Krasnoselskii’s fixed-point theorem and Leggett–Williams fixed-point theorem to investigate the existence and multiplicity of positive solutions for the generalized second-order three-point BVP. Nevertheless, their main results only extended the main results of the past literature.

Apart from that, Calvert and Gupta [9] forwent the previous approach for the shooting method, which gave a drastically simpler existence theory with less assumptions, and easy calculation of solutions; however, they only acquired the uniqueness in the simplest case. Zhou and Xu [10] studied the three-point BVPs for systems of nonlinear second-order ODEs and shown the existence and multiplicity of positive solutions of the above problem by applying the fixed point index theory in cones. After that, the shooting technique was used by the authors of [11, 12] to study the solution. By using fixed-point theorems in cones, Yaslan [13, 14] demonstrated the existence of at least one, two, and three positive solutions of a nonlinear second-order three-point boundary value problem for dynamic equations on time scales. Then, by using the theory of coincidence degree, Gao and Pei [15] established the existence results of positive solutions for higher-order multipoint BVPs at resonance for ODE. They also gave six examples to demonstrate and obtained good results.

Later, by using the global bifurcation techniques, An and Ma [16] studied the global behavior of the components of nodal solutions of the second-order *m*-point BVPs. Then, by using Krasnoselskii’s fixed-point theorem in a cone, Sun and Zhang [17] acquired some existence results of symmetric positive solutions of the second-order *m*-point BVPs. In addition, using fixed-point index theory, Jiang and Li [18] obtained several sufficient conditions of the existence of at least one positive solution for third-order *m*-point BVPs. Later, Liu [19] has developed a two-stage Lie-group shooting method to solve the three-point second-order BVP, which fulfilled three properties: accuracy, effectiveness, and stability. After that, Kwong and Wong [20] were interested in the existence of nontrivial solutions to the three-point BVP. Fixed-point theorems and degree theory were frequently used to study such problems.

Recently, the researchers have demonstrated that, in many situations, the shooting method is an effective approach, often leading to better results with shorter proofs. Then, an algorithm was presented for solving second-order nonlinear multipoint BVPs by Geng [21]. The method was based on an iterative technique and the reproducing kernel method. Besides, he claimed that the present method was reliable and efficient. Later, Lin et al. [22] constructed a new reproducing kernel space and gave the way to express the reproducing kernel function, whose numerical algorithm was presented. Through some numerical experiments, they demonstrated the efficiency and superiority of this proposed algorithm. Besides, Abbasbandy et al. [23] introduced a practical algorithmic method for studying the existence and multiplicity, and of all branches of solutions for nonlinear BVPs it may be successful in cases where purely analytic methods have failed. The method is implemented successfully for four examples (e.g., Bratu problem, steady reaction–diffusion regime in porous slab) of nonlinear second-order two- and three-point BVPs.

Previously, the most works were focused on the existence and uniqueness of solutions for the nonlinear multipoint boundary conditions problems. The researches related to the numerical approximation of solutions are relatively rare [24–27]. It is desired that the numerical solution of the nonlinear multipoint BVP can exactly satisfy the prescribed boundary conditions, but in the case of nonseparable multipoint boundary conditions, it might be a difficult task. A common disadvantage of the above-mentioned literature is that it did not investigate the robustness of proposed schemes. Moreover, they are not guaranteed to satisfy the multipoint boundary conditions, automatically.

In the paper, a novel method based on the new concept of shape function and boundary shape function is derived for solving the second-order nonlinear BVP under nonseparable multipoint boundary conditions. We arrange the paper as follows. In Sect. 2, we introduce two shape functions and a boundary shape function, which is designed for automatically satisfying the boundary conditions prescribed at several points, where some main results are shown. In Sect. 3, an iterative algorithm, namely the boundary shape function method (BSFM), is developed, and some examples are given in Sect. 4. The conclusions are described in the last section.

## Boundary shape function

For the solution of the following nonlinear second-order boundary value problem (BVP), endowed with prescribed nonseparable multipoint boundary conditions:

we propose a new iterative method. In above, \(u(x_{1}), u'(x_{1}), \ldots , u(x_{m}), u'(x_{m})\) are respectively the values of \(u(x)\) and \(u'(x)\) at *m* different points \(x_{1}<\cdots <x_{m}\). Here, \([x_{1},x_{m}]\) is an interval of our problem. Since the boundary conditions are specified at *m* distinct points, this problem is called an *m*-point BVP; \({\mathcal{L}}_{1}\) and \({\mathcal{L}}_{2}\) are linear operators, acting on \([u(x_{1}),u'(x_{1}),\ldots ,u(x_{m}),u'(x_{m})]\) by

where \(c_{ij}\), \(i=1, 2\), \(j=1,\ldots ,2m\) are given constant coefficients, not all being zeros.

### Theorem 2.1

*There exist two shape functions* \(s_{1}(x), s_{2}(x) \in {\mathcal{C}}^{1}[x_{1},x_{m}]\), *which satisfy*

### Proof

Beginning with

we prove the existence of \(s_{1}(x)\). From Eqs. (4)–(6) and (8), *a* and *b* are determined by

Obviously, when the rank of the coefficient matrix is two, there exists a unique solution for *a* and *b*.

In the situation when the rank of the above coefficient matrix is one, we can, instead of Eq. (8), take

which results to a consistent system:

such that we have a unique solution for *a* and *b*.

Therefore, there exists a solution \((a,b)\), and hence the solution \(s_{1}(x)\) in Eq. (8) or Eq. (10) exists. Similarly, we can do it for \(s_{2}(x)\). □

### Theorem 2.2

*For a given free function* \(f(x)\in {\mathcal{C}}^{1}[x_{1},x_{m}]\), *if* \(s_{1}(x)\)*and* \(s_{2}(x)\)*satisfy Eqs*. (6) *and* (7), *then*

*can be defined and satisfies*

### Proof

In Theorem 2.1, the existence of \(s_{1}(x)\) and \(s_{2}(x)\) renders the existence of \(B(x)\), wherein \(f(x)\in {\mathcal{C}}^{1}[x_{1},x_{m}]\) is a given free function.

Applying the linear operator \({\mathcal{L}}_{1}\) to Eq. (12) on both sides and using the linearity property, we have

which, with the help from Eqs. (6) and (7), becomes

Similarly, applying the linear operator \({\mathcal{L}}_{2}\) on both sides of Eq. (12) and using the linearity property, we have

which, with the help from Eqs. (6) and (7), becomes

Thus, the proof of Eqs. (13) and (14) is completed. □

Theorem 2.2 is crucial, from which the treatment of very complex nonseparable multipoint boundary conditions for the nonlinear BVP becomes easy because the boundary shape function \(B(x)\) is guaranteed to satisfy the multipoint boundary conditions exactly and automatically.

## The numerical algorithm

Utilizing the boundary shape function (BSF), the developed iterative algorithm to solve Eqs. (1)–(3) is given below. According to Theorem 2.2, \(B(x)\) given in Eq. (12) satisfies the multipoint boundary conditions in Eqs. (2) and (3). Thus, we may transform \(u(x)\) to \(y(x)\) by

For any function \(y(x)\in {\mathcal{C}}^{2}[x_{1},x_{m}]\), \(u(x)\) automatically satisfies the multipoint boundary conditions (2) and (3).

Inserting Eq. (15) for \(u(x)\) into Eq. (1), we achieve

which can be viewed as an initial value problem (IVP), whose initial values are given arbitrarily, say, \(y(x_{1})=y'(x_{1})=0\). The function *H* is given by

where

There are a number of unknown parameters \(y(x_{2}), y'(x_{2}), \ldots , y(x_{m}), y'(x_{m})\), which are collected as \({\mathbf{z}}:=[y(x_{2}),y'(x_{2}),\ldots ,y(x_{m}),y'(x_{m})]^{ \mathrm{T}}\).

Letting

from Eq. (16) it follows that

which are subjected to the given initial conditions \(y_{1}(x_{1})\) and \(y_{2}(x_{1})\). However, \({\mathbf{z}}:=[y_{1}(x_{2}),y_{2}(x_{2}), \ldots ,y_{1}(x_{m}), y_{2}(x_{m})]^{\mathrm{T}}\) is an unknown vector. If **z** is available, we can apply the fourth-order Runge–Kutta method (RK4), as shown in the Appendix, to integrate the ODEs in Eq. (20) to obtain \(y(x)=y_{1}(x)\), and then \(u(x)\) is obtained from Eq. (15) by inserting \(y(x)\).

We depict the iterative boundary shape function method (BSFM) for finding \(u(x)\) in Eqs. (1)–(3):

(i) Derive \(s_{1}(x)\), \(s_{2}(x)\), give \(y_{1}(x_{1})\), \(y_{2}(x_{1})\), \({\mathbf{z}}_{0}\), *ϵ*, and \(\Delta x=(x_{m}-x_{1})/N\) with *N* given.

(ii) For \(k=0,1,2,\ldots \) , applying RK4 to integrate the following ODEs with \(N_{1}\) steps to \(x=x_{2}\), \(N_{2}\) steps to \(x=x_{3}, \ldots \) , and *N* steps to \(x=x_{m}\), where \(N_{1}=(x_{2}-x_{1})/\Delta x, N_{2}=(x_{3}-x_{1})/\Delta x, \ldots , N=(x_{m}-x_{1})/\Delta x\):

Taking

if the stopping criterion \(r_{k}:=\|{\mathbf{z}}_{k+1}-{\mathbf{z}}_{k}\|< \epsilon \) is satisfied, then we stop the iteration; otherwise, for the next iteration go to step (ii). When \(y(x)=y_{1}(x)\) is solved for, \(u(x)\) is obtained from Eq. (15) by inserting \(y(x)\).

For the details of the algorithm, we use the following four-point \((x_{1}=0< x_{2}< x_{3}< x_{4}=1)\) boundary conditions as a demonstrative example to find \(s_{1}(x)\) and \(s_{2}(x)\):

Upon letting

it follows that

which can be arranged into

and further changed to

Thus, we can derive

The variable transformation is

where \({\mathbf{z}}:=[y(x_{2}),y(x_{3}),y(x_{4})]^{\mathrm{T}}\) are unknown values. If the original ODE in Eq. (1) is

then the transformed ODE is

Starting from the given initial conditions \(y(x_{1})=y'(x_{1})=0\), we can apply RK4 as shown in the Appendix to integrate the above ODE. With the initial guesses \(y(x_{2})=y(x_{3})=y(x_{4})=0\), integrating with \(N_{1}\) steps to \(x_{2}\), we can obtain the new value \(y(x_{2})\); then \(N_{2}\) steps to \(x_{3}\) gives the new value \(y(x_{3})\), and *N* steps to \(x_{4}\) provides the new value \(y(x_{4})\), where \(N_{1}=(x_{2}-x_{1})/\Delta x\), \(N_{2}=(x_{3}-x_{1})/\Delta x\), and \(N=(x_{4}-x_{1})/\Delta x\). Substituting the new values \(y(x_{2})\), \(y(x_{3})\), \(y(x_{4})\) into the ODE through \(G(x;{\mathbf{z}})\), we integrate it again. The process is continued, until the old values and the new values of \(y(x_{2})\), \(y(x_{3})\), \(y(x_{4})\) are very close to satisfy the specified convergence criterion.

### Remark 1

Liu [28] has pointed out the drawback of the shooting method, which assumes some unknown initial conditions \(u(0)\) and \(u'(0)\) for Eq. (1) to convert the BVP into an IVP. It often requires many iterations to match the targets defined by the multipoint boundary conditions (2) and (3) through trial and error. In general, it is very difficult to find the exact values \(u(0)\) and \(u'(0)\) for the nonlinear BVP with nonseparable and multipoint boundary conditions. Strictly speaking, the IVP used in the shooting method is not an exact one because its initial conditions are unknown. The current IVP being obtained exactly by using the variable transformation from \(u(x)\) to \(y(x)\) is different from the IVP that appeared in the shooting method in two aspects: the governing equation is Eq. (16) instead of Eq. (1), and the initial conditions \(y(0)\) and \(y'(0)\) are given arbitrarily, not unknown values.

## Numerical tests

In order to investigate the stability of the BSFM, the data \(b_{1}\) and \(b_{2}\) in Eqs. (2) and (3) are polluted by noise as

where *s* is the intensity of noise and \(R(i)\) are random numbers between \([-1,1]\). Hence, sometimes we use \(\hat{b}_{i}\), instead of \(b_{i}\), in the computations.

### Example 1

We consider

with the exact solution being

Through some operations, we can obtain \(s_{1}(x)=4/3-x/3\) and \(s_{2}(x)=x/3-1/3\). There are two unknown parameters, \({\mathbf{z}}:=[y'(2),y(3)]^{\mathrm{T}}\).

For the following parameters \(y_{1}(1)=y_{2}(1)=0\), \({\mathbf{z}}_{0}=(0,0)^{\mathrm{T}}\), \(N=200\), and \(\epsilon =10^{-10}\), the iterative algorithm BSFM converges after 80 iterations as shown in Fig. 1(a). From Fig. 1(b), the numerical \(u(x)\) almost coincides with the exact one, with the maximum error (ME) being \(7.16\times 10^{-9}\). Although the nonlinear nonseparable three-point BVP is difficult to be treated by numerical methods, the accuracy of this problem is good, which is much better than that computed in [29] by about five orders.

In order to test the influence of the noise on the numerical solution, in Table 1 we compare the the ME and iterations number (IN) for different noise levels. Upon comparing with the maximum value 17 of \(u(x)\), these MEs are acceptable.

We can observe in Table 1 that the IN is not sensitive to the noise level *s*.

Instead of RK4, we have employed the fourth-order group preserving scheme [30] to integrate the resulting IVP with nonzero initial conditions \(y_{1}(1)=1\), \(y_{2}(1)=0\). With the same initial conditions, the BSFM converges with 81 iterations and the ME is \(7.15\times 10^{-9}\). For the same parameter values, the fourth-order group preserving scheme converges with 81 iterations; however, the ME increases to \(5.24\times 10^{-4}\). Due to the serious loss of the accuracy of about five orders, below we will merely use RK4 to integrate the ODEs.

Next, we consider more complex boundary conditions:

Similarly, we can derive \(s_{1}(x)=1-x/3\) and \(s_{2}(x)=x/3-1/2\), and there are three unknown parameters, \({\mathbf{z}}:=[y(2),y(3),y'(3)]^{\mathrm{T}}\). For the following parameters \(y_{1}(1)=y_{2}(1)=0\), \({\mathbf{z}}_{0}=(0,0,0)^{\mathrm{T}}\), \(N=400\), and \(\epsilon =10^{-10}\), the BSFM converges after 133 iterations as shown in Fig. 2(a). As observed in Fig. 2(b), the solution \(u(x)\) obtained almost coincides with the exact one, with the ME being \(3.04\times 10^{-10}\). Although the nonseparable three-point BVP is more complex, the accuracy is much better than that computed in [29] by about eight orders.

Then, we consider a larger interval \(x\in [1,5]\) with complex boundary conditions:

The exact solution \(u(x)\) is still given in Eq. (23).

We can derive \(s_{1}(x)=9/10-x/5\) and \(s_{2}(x)=x/5-2/5\). For the following parameters \(y_{1}(1)=y_{2}(1)=0\), \({\mathbf{z}}_{0}=(0,0,0)^{\mathrm{T}}\), \(N=400\), and \(\epsilon =10^{-10}\), the BSFM converges after 373 iterations as shown in Fig. 3(a). The numerical solution \(u(x)\) as shown in Fig. 3(b), almost coincides with the exact one, with the ME being \(5.82\times 10^{-9}\).

In order to test the influence of the noise on the numerical solution and the effect of large spatial range, in Table 2 we compare the ME and iterations number (IN) for different noise levels.

### Example 2

We adopt an example from Kwong and Wong [12]:

under the following boundary conditions:

For this problem, we can derive \(s_{1}(x)=5/9-4x/9\) and \(s_{2}(x)=2/3+2x/3\), and \({\mathbf{z}}:=[y(1/2),y(1)]^{\mathrm{T}}\) are unknown parameters. For the following parameters \(y_{1}(0)=1\), \(y_{2}(0)=0\), \({\mathbf{z}}_{0}=(0,0)^{\mathrm{T}}\), \(N=200\), and \(\epsilon =10^{-10}\), the BSFM converges after 20 iterations as shown in Fig. 4(a).

The fictitious time integration method (FTIM) was first developed by Liu and Atluri [31] to solve the following nonlinear algebraic equations:

where \(u_{1},\ldots ,u_{n}\) are unknown variables, and \(F_{i}\) are given functions. After introducing the fictitious time *τ*, Eq. (28) is recast by Liu and Atluri [31] as a system of ODEs:

They employed the forward Euler scheme to integrate the above ODEs, until the steady solution of \(u_{1},\ldots ,u_{n}\) was obtained:

According to Liu [29], FTIM for Eqs. (26) and (27) is given by

where \(u_{i}\) are the nodal values of *u* at the points \(x_{i}=(i-1)/(n-1)\), and \(k=1/(2\Delta \tau )+1\).

In Fig. 4(b), we compare the numerical solution \(u(x)\) with that computed by Liu [29] using FTIM, which are very close. In FTIM, we must choose some suitable values of \(\nu _{i}\), Δ*τ*, the terminal fictitious time, and guess the initial values of \(u_{1},\ldots ,u_{n}\) at \(\tau =0\). In contrast, BSFM merely solves much lower-dimensional ODEs with \(n=2\), and no parameter values need to be guessed.

Liu [19] also applied the two-stage Lie-group shooting method (TSLGSM) to solve this problem, whose result is close to that obtained from FTIM and BSFM, and we do not plot it in Fig. 4(b). As shown in [19], one needs to solve four nonlinear algebraic equations derived from the Lie-group shooting equations to determine six unknown variables. The process of the TSLGSM is complex and is hard to be extended to an *m*-point BVP with \(m>3\).

### Example 3

Let us consider the following BVP [27]:

whose exact solution is

For this problem, we can derive \(s_{1}(x)=4/5-12x/5\) and \(s_{2}(x)=8x/5-1/5\), and there are three unknown parameters, \({\mathbf{z}}=[y(1/4),y(1/2),y(1)]^{\mathrm{T}}\).

For the following parameters \(y_{1}(0)=-1\), \(y_{2}(0)=-1\), \({\mathbf{z}}_{0}=(0,0,0)^{\mathrm{T}}\), \(N=400\), and \(\epsilon =10^{-10}\), the BSFM converges after 16 iterations as shown in Fig. 5(a). In Fig. 5(b), we compare the numerical solution \(u(x)\) with the exact one in Eq. (33), whose ME is \(2.63 \times 10^{-9}\). The accuracy is very good, although the presented problem is nonlinear and is subjected to the nonseparable four-point boundary conditions.

In order to test the influence of the noise on the numerical solution, in Table 3 we compare the the ME and iterations number (IN) for different noise levels. Upon comparing with the maximum value 16 of \(u(x)\), these MEs are acceptable.

### Example 4

Let us consider the following BVP [32]:

The exact solution is

We recast the above problem as a four-point BVP, which is subjected to the following nonseparable four-point boundary conditions:

where \(b_{1}\) and \(b_{2}\) can be computed by inserting \(u(x)\) of Eq. (35) into the above two equations.

For this problem, we can derive \(s_{1}(x)=9/14-4x/7\) and \(s_{2}(x)=4x/7-1/7\), and there are four unknown parameters, \({\mathbf{z}}=[y(1/4),y(1/2),y'(1/2),y(1)]^{\mathrm{T}}\).

For the following parameters \(y_{1}(0)=-1\), \(y_{2}(0)=0\), \({\mathbf{z}}_{0}=(0,0,0,0)^{\mathrm{T}}\), \(N=200\), and \(\epsilon =10^{-10}\), BSFM converges after 40 iterations as shown in Fig. 6(a). In Fig. 6(b), we compare the numerical solution \(u(x)\) with the exact one in Eq. (35), whose ME is \(3.26 \times 10^{-10}\). The accuracy is very good, although the presented problem is nonlinear and is subjected to the nonseparable four-point boundary conditions.

### Example 5

Let us consider the following BVP [26, 27]:

whose exact solution is

The above \(h(x)\), \(b_{1}\), and \(b_{2}\) can be computed by inserting \(u(x)\) of Eq. (39) into Eq. (38).

For this problem, we can derive \(s_{1}(x)=54x/67-102/67\) and \(s_{2}(x)=-160/201-90x/67\), and there are three unknown parameters, \({\mathbf{z}}=[y(2/9),y(7/9),y(1)]^{\mathrm{T}}\).

For the following parameters \(y_{1}(0)=0\), \(y_{2}(0)=0\), \({\mathbf{z}}_{0}=(0,0,0)^{\mathrm{T}}\), \(N=180\), and \(\epsilon =10^{-10}\), the BSFM converges after 10 iterations as shown in Fig. 7(a). In Fig. 7(b), we compare the numerical solution \(u(x)\) with the exact one in Eq. (39), whose ME is \(1.15 \times 10^{-9}\). The accuracy is very good, which is better than that computed in [26] and competitive with that in [26, 27], as shown in Table 4.

### Example 6

We consider the following three-point BVP [19]:

where \(b_{1}\) and \(b_{2}\) can be computed from the exact solution \(u(x)=\sin (\alpha \pi x)\).

For this problem, we can derive \(s_{1}(x)=5/4-x\) and \(s_{2}(x)=x-3/4\), and there are four unknown parameters, \({\mathbf{z}}=[y(1/2),y'(1/2),y(1),y'(1)]^{\mathrm{T}}\).

For the following parameters \(y_{1}(0)=0\), \(y_{2}(0)=0\), \({\mathbf{z}}_{0}=(0,0,0,0)^{\mathrm{T}}\), \(N=200\), and \(\epsilon =10^{-10}\), BSFM converges after 27 iterations as shown in Fig. 8(a). In Fig. 8(b), we compare the numerical solution with the exact one \(u(x)=\sin (\alpha \pi x)\) with \(\alpha =1\), whose ME is \(3.15 \times 10^{-10}\). The accuracy is very good, which is much better than that computed in [19].

### Example 7

Let us consider the following BVP in a large spatial range:

whose exact solution is still given by Eq. (39). The above \(h(x)\), \(b_{1}\), and \(b_{2}\) can be computed by inserting \(u(x)\) of Eq. (39) into Eq. (41).

Letting \(x_{1}=0\), \(x_{2}=1\), \(x_{3}=2\), and \(x_{4}=3\), we can derive

There are three unknown parameters, \({\mathbf{z}}=[y(x_{2}),y(x_{3}),y(x_{4})]^{\mathrm{T}}\). For the following parameters \(y_{1}(0)=0\), \(y_{2}(0)=0\), \({\mathbf{z}}_{0}=(0,0,0)^{\mathrm{T}}\), \(N=300\), and \(\epsilon =10^{-10}\), BSFM converges after 29 iterations as shown in Fig. 9(a). In Fig. 9(b), we compare the numerical solution with the exact one in Eq. (39), whose ME is \(2.86 \times 10^{-9}\). The accuracy is very good.

In Table 5, we compare the ME and iterations number (IN) for different noise levels.

### Remark 2

As shown in Examples 1, 3–7, where exact solutions are available, the accuracy obtained by BSFM is quite well, on the order of 10^{−9} and 10^{−10}. Because we have exactly transformed the multipoint BVP to the corresponding IVP, and integrated it by using RK4, the accuracy is on the order of \((\Delta x)^{4}\). For example, with \(\Delta x=0.01\), we have the error bound of 10^{−8}. Therefore, we can estimate the ME by

where \(M_{0}\) is some positive constant. If the input data are noised by *s*, from Tables 1–3 and 5, we can observe that

We also compare Examples 3 and 5 with that obtained from Abd-Elhameed et al. [27]. For Example 3, Abd-Elhameed et al. [27] can obtain the exact solution with the ME being zero. On the other hand, BSFM led to the ME being \(9.38\times 10^{-8}\). For Example 5, the accuracies obtained from BSFM and Abd-Elhameed et al. [27] are competitive. The wavelets collocation method with Chebyshev polynomials as the bases [27] led to residual algebraic equations to be solved to determine the coefficients. For some cases, the accuracy is very high. As shown by Example 3 in [27], the wavelets collocation method can also be applied to solve the singular nonlinear BVP as

and with high accuracy as shown in Table 5 there. However, BSFM cannot treat this problem due to the left-hand side being zero at \(x=0\) and \(x=1\) when we apply RK4 to integrate the resultant IVP. The BSFM without needing to solve algebraic equations is an alternative candidate to solve the multipoint BVP efficiently.

## Conclusions

In the paper, the boundary shape function was derived, which exactly and automatically satisfies the prescribed multipoint boundary conditions. It is of utmost importance that we can design the numerical method to exactly match the given multipoint boundary conditions. According to the new idea of boundary shape function, we have developed an iterative numerical algorithm used in solutions of the second-order nonlinear multipoint BVPs. The main contributions are introducing the boundary shape function, deriving a variable transformation, and then transforming the nonlinear BVP to the initial value problem (IVP). The resulting iterative algorithm resorting on the boundary shape function method (BSFM) is convergent very fast to a solution, and automatically satisfies the prescribed multipoint boundary conditions. Numerical examples confirmed that the BSFM is highly accurate and efficient. Even for some problems with large interval and subjected to the noise imposed on the boundary data, the presented new method is still workable to provide quite accurate solutions. The current idea of boundary shape function has been extended to multidimensional boundary value problems, for example, 2D problem [33, 34] and 3D problem [35]. There, the higher-dimensional homogenization functions are constructed in a similar manner as the construction of BSF from the free function and with simple shape functions.

## References

- 1.
Agarwal, R.P.: Boundary Value Problems for High Order Differential Equations. World Scientific, Singapore (1986)

- 2.
Kubicek, M.: Numerical Solution of Nonlinear Boundary Value Problems with Applications. Prentice-Hall, New York (1983)

- 3.
Keller, H.B.: Numerical Methods for Two-Point Boundary Value Problems. Dover, New York (1992)

- 4.
Ahmad, B., Ali Khan, R., Eloe, P.W.: Generalized quasilinearization method for a second-order three point boundary-value problem with nonlinear boundary conditions. Electron. J. Differ. Equ.

**2002**, 90 (2002) - 5.
Henderson, J.: Double solutions of three-point boundary-value problems for second-order differential equations. Electron. J. Differ. Equ.

**2004**, 115 (2004) - 6.
Sun, Y.P., Liu, L.: Solvability for a nonlinear second-order three-point boundary value problem. J. Math. Anal. Appl.

**296**, 265–275 (2004) - 7.
Yao, Q.: Successive iteration and positive solution for nonlinear second-order three-point boundary value problems. Comput. Math. Appl.

**50**, 433–444 (2005) - 8.
Luo, H., Ma, Q.: Positive solutions to a generalized second-order three-point boundary value problem on time scales. Electron. J. Differ. Equ.

**2005**, 17 (2005) - 9.
Calvert, B., Gupta, C.P.: Existence and uniqueness of solutions to a super-linear three-point boundary-value problem. Electron. J. Differ. Equ.

**2005**, 19 (2005) - 10.
Zhou, Y., Xu, Y.: Positive solutions of three-point boundary value problems for systems of nonlinear second order ordinary differential equations. J. Math. Anal. Appl.

**320**, 578–590 (2006) - 11.
Kwong, M.K.: The shooting method and multiple solutions of two/multi-point BVPs of second order ODE. Electron. J. Qual. Theory Differ. Equ.

**2006**, 6 (2006) - 12.
Kwong, M.K., Wong, J.S.: The shooting method and nonhomogeneous multipoint BVPs of second-order ODE. Bound. Value Probl.

**2007**, Article ID 64012 (2007) - 13.
Yaslan, I.: Existence of positive solutions for nonlinear three-point problems on time scales. J. Comput. Appl. Math.

**206**, 888–897 (2007) - 14.
Yaslan, I.: Multiple positive solutions for nonlinear three-point boundary value problems on time scales. Comput. Math. Appl.

**55**, 1861–1869 (2008) - 15.
Gao, Y., Pei, M.: Solvability for two classes of higher-order multi-point boundary value problems at resonance. Bound. Value Probl.

**2008**, Article ID 723828 (2008) - 16.
An, Y., Ma, R.: Global behavior of the components for the second order

*m*-point boundary value problems. Bound. Value Probl.**2008**, Article ID 254593 (2008) - 17.
Sun, Y., Zhang, X.: Existence of symmetric positive solutions for an

*m*-point boundary value problem. Bound. Value Probl.**2007**, Article ID 79090 (2007) - 18.
Jiang, W., Li, F.: Several existence theorems of monotone positive solutions for third-order multipoint boundary value problems. Bound. Value Probl.

**2007**, Article ID 17951 (2007) - 19.
Liu, C.-S.: A two-stage LGSM for three-point BVPs of second-order ODEs. Bound. Value Probl.

**2008**, Article ID 963753 (2008) - 20.
Kwong, M.K., Wong, J.S.: Solvability of second-order nonlinear three-point boundary value problems. Nonlinear Anal.

**73**, 2343–2352 (2010) - 21.
Geng, F.Z.: A numerical algorithm for nonlinear multipoint boundary value problems. J. Comput. Appl. Math.

**236**, 1789–1794 (2012) - 22.
Lin, Y., Niu, J., Cui, M.: A numerical solution to nonlinear second order three-point boundary value problems in the reproducing kernel space. Appl. Math. Comput.

**218**, 7362–7368 (2012) - 23.
Abbasbandy, S., Azarnavid, B., Alhuthali, M.S.: A shooting reproducing kernel Hilbert space method for multiple solutions of nonlinear boundary value problems. J. Comput. Appl. Math.

**279**, 293–305 (2015) - 24.
Tatari, M., Dehghan, M.: The use of the Adomian decomposition method for solving multipoint boundary value problems. Phys. Scr.

**73**, 672–676 (2006) - 25.
Doha, E.H., Bhrawy, A.H., Hafez, R.M.: On shifted Jacobi spectral method for high-order multi-point boundary value problems. Commun. Nonlinear Sci. Numer. Simul.

**17**, 3802–3810 (2012) - 26.
Saadatmandi, A., Dehghan, M.: The use of sinc-collocation method for solving multi-point boundary value problems. Commun. Nonlinear Sci. Numer. Simul.

**17**, 593–601 (2012) - 27.
Abd-Elhameed, W.M., Doha, E.H., Youssri, Y.H.: New wavelets collocation method for solving second-order multipoint boundary value problems using Chebyshev polynomials of third and fourth kinds. Abstr. Appl. Anal.

**2013**, Article ID 542839 (2013) - 28.
Liu, C.-S.: The Lie-group shooting method for nonlinear two-point boundary value problems exhibiting multiple solutions. Comput. Model. Eng. Sci.

**13**, 149–163 (2006) - 29.
Liu, C.-S.: A fictitious time integration method for solving

*m*-point boundary value problems. Comput. Model. Eng. Sci.**39**, 125–154 (2009) - 30.
Lee, H.C., Liu, C.-S.: The fourth-order group preserving methods for the integrations of ordinary differential equations. Comput. Model. Eng. Sci.

**41**, 1–26 (2009) - 31.
Liu, C.-S., Atluri, S.N.: A novel time integration method for solving a large system of non-linear algebraic equations. Comput. Model. Eng. Sci.

**31**, 71–83 (2008) - 32.
Ha, S.N., Lee, C.R.: Numerical study for two-point boundary value problems using Green’s functions. Comput. Math. Appl.

**44**, 1599–1608 (2002) - 33.
Liu, C.-S., Chang, C.W.: Solving the inverse conductivity problems of nonlinear elliptic equations by the superposition of homogenization functions method. Appl. Math. Lett.

**94**, 272–278 (2019) - 34.
Liu, C.-S., Qiu, L., Lin, L.: Simulating thin plate bending problems by a family of two-parameter homogenization functions. Appl. Math. Model.

**79**, 284–299 (2020) - 35.
Liu, C.-S., Chang, C.W.: Solving the 3D Cauchy problems of nonlinear elliptic equations by the superposition of a family of 3D homogenization functions. Eng. Anal. Bound. Elem.

**105**, 122–128 (2019)

### Acknowledgements

We are thankful to the editor and the anonymous reviewers for many valuable suggestions to improve this paper.

### Availability of data and materials

Data sharing is not applicable to this article as no datasets were generated or analyzed during the current study.

### Authors’ information

Not applicable.

## Funding

There is no funding.

## Author information

### Affiliations

### Contributions

The authors declare that the study was realized in collaboration with the same responsibility. Both authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Declarations

We confirm that there are no known conflicts of interest associated with this publication and there has been no significant financial support for this work that could have influenced its outcome.

### Competing interests

The authors declare that they have no competing interests.

## Appendix

### Appendix

In the appendix we list the fourth-order Runge–Kutta method (RK4) to integrate the following *n*-dimensional ODEs:

where the initial condition is given by \({\mathbf{x}}(0)={\mathbf{x}}_{0}\). From the *N*th time step to the \((N+1)\)th time step, the RK4 reads as

where \(\Delta t=t_{N+1}-t_{N}\), and

in which \(\tau =\Delta t/2\).

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Liu, CS., Chang, CW. Boundary shape function method for nonlinear BVP, automatically satisfying prescribed multipoint boundary conditions.
*Bound Value Probl* **2020, **139 (2020). https://doi.org/10.1186/s13661-020-01436-y

Received:

Accepted:

Published:

### MSC

- 34B15
- 34B10
- 34B18

### Keywords

- Nonlinear nonseparable multipoint boundary value problem
- Boundary shape functions
- Boundary shape function method
- Iterative method