Solving nonlinear third-order three-point boundary value problems by boundary shape functions methods

For nonlinear third-order three-point boundary value problems (BVPs), we develop two algorithms to find solutions, which automatically satisfy the specified three-point boundary conditions. We construct a boundary shape function (BSF), which is designed to automatically satisfy the boundary conditions and can be employed to develop new algorithms by assigning two different roles of free function in the BSF. In the first algorithm, we let the free functions be complete functions and the BSFs be the new bases of the solution, which not only satisfy the boundary conditions automatically, but also can be used to find solution by a collocation technique. In the second algorithm, we let the BSF be the solution of the BVP and the free function be another new variable, such that we can transform the BVP to a corresponding initial value problem for the new variable, whose initial conditions are given arbitrarily and terminal values are determined by iterations; hence, we can quickly find very accurate solution of nonlinear third-order three-point BVP through a few iterations. Numerical examples confirm the performance of the new algorithms.


Introduction
Boundary value problems (BVPs) have a lot of applications, like engineering technique, control theory and optimization, the boundary layer of fluid mechanics, aero-elasticity, sandwich beam analysis and beam deflection theory, electromagnetic waves, theory of thin film and incompressible flows. While for the conditions for the existence and uniqueness of solutions of third-order BVPs one may refer to [1][2][3], for the existence and uniqueness of third-order three-point BVPs one can read [4][5][6].
For the third-order three-point nonlinear BVP, it is difficult to exactly satisfy the boundary conditions, unless one designs the algorithm to exactly satisfy all the boundary conditions. In the paper we propose new numerical methods for solving the nonlinear thirdorder three-point BVPs, designing the algorithms to automatically satisfy the three-point boundary conditions, which are based on a novel concept of boundary shape function.
We arrange the paper as follows. In Sect. 2, we introduce third-order three-point nonlinear BVP with separated boundary conditions and general non-separated boundary conditions. In Sect. 3, we construct a boundary shape function and prove that it can automatically satisfy the specified three-point boundary conditions, where an arbitrary free function is existent in the boundary shape function. In Sect. 4, we develop the first numerical algorithm based on the collocation technique and the trial functions, which are generated from the boundary shape functions by asking the bases of solution to satisfy the three-point boundary conditions automatically. The shooting method is introduced in Sect. 5, where two examples are given to compare the numerical results computed by the boundary shape function method (BSFM) in Sect. 4 to that obtained by the shooting method. Taking advantage of the new concept of boundary shape function, it is easy to develop the second iterative algorithm to solve the third-order nonlinear BVPs with three-point boundary conditions in Sect. 6, where two numerical examples are tested. In Sect. 7, we extend the idea of boundary shape function to the nonlinear third-order BVP with general non-separated three-point boundary conditions. Finally, some conclusions are drawn in Sect. 8.

The boundary shape function
The boundary shape function (BSF) is such a function that it satisfies the prescribed boundary conditions automatically. Apparently, the exact solution of the considered BVP is one member of the BSF, since it must satisfy the boundary conditions. In general, the numerical method used to approximate the exact solution cannot guarantee to automatically satisfy the boundary conditions exactly. We are going to devise a powerful method to solve Eqs. (1)-(4) based on the boundary shape functions. The idea of boundary shape function was used to solve the BVP with multipoint boundary conditions [22] and the singularly perturbed BVP with Robin boundary conditions [23]. The present problem with third-order nonlinear ODE (1), which is endowed with three-point boundary conditions (2)-(4) or the general non-separated three-point boundary conditions (5)- (7), is more difficult to be solved than the second-order BVPs in [22,23]. We pursue this issue by the newly constructed BSF, which is a novel method for solving Eqs. (1)- (4), not yet reported in the literature. We seek the polynomial type shape functions s k (x), k = 1, 2, 3, satisfying Depending on the values of the coefficient matrix c ij , i, j = 1, 2, 3, there are many solutions of s k (x), k = 1, 2, 3. However, we prefer the lower orders shape functions and do not go into the details to the derivations of s k (x), k = 1, 2, 3. For each example, we will list s k (x), k = 1, 2, 3, explicitly. (10), then the boundary shape function B(x), given by

Theorem 1 For any free function f
is existent and satisfies the separated boundary conditions: Proof The existence of B(x) is guaranteed by the existence of s k (x), k = 1, 2, 3, and the existence of a free function f (x) ∈ C 2 [0, ]. We prove Eq. (12) at first. Inserting x = 0 into Eq. (11), we have Taking the differential of Eq. (11) and then inserting x = 0 leads to Similarly, taking twice differentials of Eq. (11) and then inserting x = 0 yields From Eqs. (15)- (17) it follows that Thus, Eq. (12) was proven. The proofs of Eqs. (13) and (14) can be done similarly.
In Theorem 1, there exists a free function f (x), which will be very useful for the development of the novel algorithms to solve the nonlinear third-order three-point BVPs.
We have to stress that the shape functions s 1 (x), s 2 (x), s 3 (x) are not unique; however, the lower-order shape functions are preferred.

First numerical algorithm
Based on the concept of boundary shape functions, we can develop a new algorithm of the boundary shape function method (BSFM) to solve Eq. (1) under three-point boundary conditions (2)-(4).
For Eq. (1), we first choose some suitable basis functions φ j (x), j ∈ N, which are linearly independent and complete. Then we have the following result.

Theorem 2 For any function
Proof It is a direct extension of Theorem 1 to the basis function f (x) = φ j (x) and the new basis Now we describe a simple method to solve y(x) in Eqs. (1)-(4). We assume that the solution y(x) can be expanded by a set of trial functions E j (x): where a j are unknown coefficients to be determined, and m j=1 a j = 1 (23) guarantees that y(x), expressed by Eq. (22), automatically satisfies three-point boundary conditions (2)-(4). Due to this reason, we only need to consider Eq. (1) being satisfied by Let a := {a j } whose dimension is m. The algorithm of the boundary shape function method (BSFM) for solving y(x) in Eqs. (1)-(4) is summarized as follows.
give m, n c , the initial guess of a 0 and the convergence criterion , and then compute x i = i /(n c + 1), i = 1, . . . , n c .
(ii) For k = 0, 1, 2, . . . , we repeat the following steps: Solving the following algebraic equations system to obtain a: Then we have a k+1 . If a k+1 converges according to a given stopping criterion r k := a k+1a k < , then stop; otherwise, go to step (ii). When a := {a j } is found, y(x) is obtained from Eq. (22).

Shooting method
The shooting method is well known and well established to solve BVPs [24]. We briefly sketch the shooting method to solve Eqs. For the purpose of demonstration, we assume that c 12 = 0 in Eq. (2) and let denote two unknown initial values. Then, by Eq. (2), we can derive another unknown initial value Then we apply the fictitious time integration method (FTIM) developed by Liu and Atluri [25] to find α and β to match other two boundary conditions in Eqs. (3) and (4), which is obtained by the following iterations: where t k = k t is a fictitious time and t is a time increment, and R 1 and R 2 denote the residuals in terms of boundary conditions (3) and (4): where R 1 and R 2 are implicit functions of α and β. The iterative algorithm, by using the shooting method to solve y(x) of Eqs. (1)-(4), is given as follows. (i) Give t, ν, the initial guesses of α 0 and β 0 and the convergence criterion ε 0 , and x = /N . (ii) Repeat k = 0, 1, 2, . . . , integrating Eq. (1) by the fourth-order Runge-Kutta method (RK4) with y(0) = α k , y (0) = y 0 , y (0) = β k and with N 1 = /a steps from x = 0 to x = a and with N steps from x = 0 to x = . Taking if α k+1 and β k+1 converge according to a given stopping criterion then terminate the iteration; otherwise, go to (ii) for the next iteration.
Example 1 We first consider the following three-point BVP [26]: whose exact solution is For this problem, we take the following trial functions: Through some operations, we can obtain s 1 (x) = x -11x 2 /4 + 3x 3 /2, s 2 (x) = 6x 2 -4x 3 and s 3 (x) = x 3 /2x 2 /4. Under the following parameters a 0 = 2, b 0 = -3, m 1 = 5 (m = 11), n c = 100, and = 10 -8 the algorithm converges after 153 steps as shown in Fig. 1(a). From Fig. 1(b) we can find that the numerical solution y(x) is very close to the exact one with the maximum error (ME) being 2.23 × 10 -11 . The comparison of the errors in absolute values between the BSFM and other methods shows that the accuracy is much better than that computed in [27,28] with about three orders, and than that computed by Li and Wu [29] with about five orders. In Table 1, we list the numerical solutions and the absolute errors at different positions, where 1.31E(-11) means that the absolute error is 1.31 × 10 -11 , etc.  If we adjust the parameters to a 0 = 5, b 0 = 1 as those employed by Pandey [8], the algorithm BSFM converges after 55 steps and the ME is 2.6 × 10 -11 , which is also much better than that computed in [8].
By using the shooting method presented above, we take a 0 = 2, b 0 = -3, t = 0.01, ν = 50, N = 100, R 1 = y(1/2), R 2 = y (1), and the initial guesses α = 0 and β = 0, which is convergence with 43 iterations under ε 0 = 10 -10 and the maximum error is 1.51 × 10 -2 . It can be seen that the convergence speed of the shooting method is faster than that of the BSFM; however, the accuracy of the BSFM with ME = 2.23 × 10 -11 is much better than that of the shooting method with about nine orders as shown in Fig. 2(a). Example 2 Then we consider the following three-point BVP [28,30]: whose exact solution is We apply the BSFM to solve this problem with the following trial functions: and the solution is expressed by where E j (x) were given by Eq. (20).
We can obtain s 1 (x) = 1 -3x + 2x 2 , s 2 (x) = 4x -4x 2 , and s 3 (x) = 2x 2x. Under the following parameters m = 4, n c = 50, and = 10 -10 , the algorithm converges after two steps as shown in Fig. 3(a). From Fig. 3(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 7.69 × 10 -13 . The accuracy is much better than that computed in [28,30] with about six orders.
By using the shooting method, we take t = 0.01, ν = 300, N = 100, R 1 = y(1/2), R 2 = y(1), and the initial guesses α = 0 and β = 0, which is convergence with 80 iterations under  0 = 10 -10 and the maximum error is 5.17 × 10 -5 . It can be seen that both the convergence speed of the BSFM is faster than that of the shooting method and the accuracy of the BSFM with ME = 7.69 × 10 -13 is much better than that of the shooting method with about eight orders as shown in Fig. 2(b).

Second numerical algorithm
On the other hand, based on the concept of boundary shape function, we can develop another iterative algorithm to solve Eqs. (1)-(4). According to Theorem 1, B(x) given in Eq. (11) satisfies the three-point boundary conditions in Eqs. (2)-(4). Thus, when we consider the variable transformation from y(x) to a new variable u(x), for any function u(x) ∈ C 3 [0, ], the above y(x) automatically satisfies boundary conditions (2)-(4).
(ii) For k = 0, 1, 2, . . . , we repeat the following iterations: Applying the RK4 to integrate the following ODEs with N 1 = a/ x steps to x = a, and N steps to x = : Taking if z k+1 converges according to a given stopping criterion r k := z k+1 -z k < , then stop; otherwise, go to step (ii). When u(x) = u 1 (x) is solved, y(x) is obtained from Eq. (36).
Example 3 We recast Example 2 to a nonlinear one: whose exact solution is given by Eq. (33). We apply the above iterative algorithm BSFM to solve this problem with s 1 (x) = 1 -3x + 2x 2 , s 2 (x) = 4x -4x 2 , and s 3 (x) = 2x 2x. Under the following parameters u 1 (0) = u 2 (0) = u 3 (0) = 0, z 0 = (0, 0) T , N = 500, and = 10 -10 , the algorithm converges after 1148 iterations as shown in Fig. 4(a). From Fig. 4(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 7.42 × 10 -11 . Although the nonlinear three-point BVP is considered here, the accuracy is much better than that computed in [28,30] with about four orders. In Table 2, we list the numerical solutions and the absolute errors at different positions.
By using the shooting method, we take t = 0.01, ν = 200, N = 100, R 1 = y(1/2), R 2 = y(1), and the initial guesses α = 0 and β = 0, which is convergence with 71 iterations under ε 0 = 10 -10 and the maximum error is 1.8 × 10 -2 . It can be seen that both the convergence speed of the BSFM is faster than that of the shooting method and the accuracy of the BSFM with ME = 7.42 × 10 -11 is much better than that of the shooting method with about nine orders as shown in Fig. 5(a).
Example 4 We consider the following nonlinear three-point BVP:   We apply the BSFM to solve this problem with s 1 (x) = 1-x/2-x 2 /2, s 2 (x) = x/2-x 2 /2 and s 3 (x) = x/2 + x 2 /2. Under the following parameters u 1 (0) = u 2 (0) = u 3 (0) = 0, z 0 = (0, 0, 0) T , N = 200, and = 10 -10 the algorithm converges after 31 iterations as shown in Fig. 6(a). From Fig. 6(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 6.24 × 10 -10 . Although the nonlinear three-point BVP is considered here, the accuracy is very good. In Table 3, we list the numerical solutions and the absolute errors at different positions.
By using the shooting method, we take t = 0.01, ν = 90, N = 100, R 1 = y(1/2)y (1/2)π 2 e 1/2 , R 2 = y(1), and the initial guesses α = 0 and β = 0, which is convergence with 85 iterations under ε 0 = 10 -10 and the maximum error is 1.72 × 10 -3 . It can be seen that both the convergence speed of the BSFM is faster than that of the shooting method and the accuracy of the BSFM with ME = 6.24 × 10 -10 is much better than that of the shooting method with about seven orders as shown in Fig. 5(b).

Non-separated three-point BVP
In this section we extend Theorem 1 to the non-separated three-point boundary conditions. The following example is used to demonstrate the new idea.
Example 5 We first consider the following non-separated three-point BVP [28] as a demonstrative case to introduce the concept of boundary shape function for the nonseparated three-point boundary conditions:  whose exact solution is We can apply the algorithm BSFM in Sect. 4 to solve this problem, where we can find Now, letting we can prove the following result.
which, due to Eq. (47), reduces to Taking the differential of Eq. (46) and inserting x = 0, we have which, due to Eq. (47), reduces to Taking the differential of Eq. (46) and inserting x = 1/2 and x = 1, we have

Subtracting the first equation by the second equation leads to
which, due to Eq. (47), reduces to Thus, we end the proof of Eq. (48).
Now we apply the BSFM in Sect. 4 to solve Example 5 with the following trial functions: and the solution is expressed by where E j (x) were given by Eq. (46). The above y(x) automatically satisfies the boundary conditions in Eq. (43), due to Eq. (48) and m j=1 a j = 1. Under the following parameters m = 4, n c = 100, and = 10 -10 , the algorithm converges after eight steps as shown in Fig. 7(a). From Fig. 7(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 1.67 × 10 -11 . The accuracy is much better than that computed in [28] with about four orders. In Table 4, we list the numerical solutions and the absolute errors at different positions.
Inspired by Lemma 1, we can prove the following result for Eq. (1), which is subjected to the non-separated three-point boundary conditions (5)- (7).  satisfies the non-separated three-point boundary conditions: This ends the proof of Eq. (55). The proofs of Eqs. (56) and (57) can be done similarly.
The above theorem is crucial for treating very complex non-separated three-point boundary conditions of third-order nonlinear BVP and for guaranteeing that the boundary conditions are satisfied exactly. Now we apply the iterative algorithm BSFM in Sect. 6 to the following problem, which has transformed the BVP to the corresponding IVP.
Under the following parameters u 1 (0) = u 2 (0) = u 3 (0) = 0, z 0 = (0, 0, 0, 0) T , N = 100, and = 10 -10 the algorithm converges after 56 iterations as shown in Fig. 8(a). From Fig. 8(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 1.4 × 10 -8 . Although the non-separated three-point nonlinear BVP is difficult to be treated by the numerical method, the accuracy of the problem we considered is very good. In Table 5, we list the numerical solutions and the absolute errors at different positions.  Example 7 We consider the following cubic nonlinear non-separated three-point BVP: y(0)y (0) + y(1/2) = e 1/2 4 , y (0) + y (1) = 1e, whose exact solution is given by y(x) = e x (xx 2 ) such that h(x) can be computed by inserting y(x) = e x (xx 2 ) into Eq. (59).
Under the following parameters u 1 (0) = u 2 (0) = u 3 (0) = 0, z 0 = (0, 0, 0, 0) T , N = 100, and = 10 -10 , the algorithm converges after 21 iterations as shown in Fig. 9(a). From Fig. 9(b) we can find that the numerical solution y(x) is very close to the exact one with ME being 8.91 × 10 -9 . Although the non-separated three-point nonlinear BVP is difficult to be treated by the numerical method, the accuracy of the problem we considered is very good. In Table 6, we list the numerical solutions and the absolute errors at different positions.  For Examples 6 and 7, we find that although the shooting method in Sect. 5 is modified, it cannot be applied to solve them, because there exist three unknown initial values y(0), y (0), and y (0) to be determined. In contrast, the presented BSFM can provide very accurate solutions of Examples 6 and 7. Although in the BSFM we also transformed the BVP to the corresponding IVP, the major difference is that the initial values are given with known values, say u(0) = u (0) = u (0) = 0, and we adjust the unknown terminal values at x = a and x = through the integrations of the new ODEs. The process in the BSFM is much more stable than that in the shooting method with unknown initial values y(0), y (0), and y (0).

Conclusions
The paper is witnessed to derive the boundary shape functions to exactly satisfy the given separated three-point boundary conditions and general non-separated three-point boundary conditions of the third-order nonlinear BVP. According to the new idea of boundary shape functions, we have developed two novel numerical algorithms used in the solutions of the third-order three-point nonlinear BVPs. The main contributions are the introduction of a new concept of boundary shape functions and then deriving the new bases and a new variable transformation, which automatically satisfy all the boundary conditions specified. In the first algorithm, since the bases have already satisfied the three-point boundary conditions, we only need to collocate points inside the domain to satisfy the governing equation, which is easily performed by solving the resulting algebraic equations system to determine the expansion coefficients. On the other hand, in the second algorithm we have transformed the nonlinear third-order three-point BVP to the initial value problem of a new nonlinear ODE, which is convergent very fast, to find solution. Numerical examples confirmed and showed that the two novel algorithms based on the boundary shape functions are highly accurate and stable.