New Algorithm of Two-Point Block Method for Solving Boundary Value Problem with Dirichlet and Neumann Boundary Conditions

Two-point block method with variable step-size strategy is presented to obtain the solutions for boundary value problems directly. Dirichlet type and Neumann type of boundary conditions are studied in this paper. Multiple shooting techniques adapted with the three-step iterative method are employed for generating the guessing value. Six boundary value problems are solved using the proposed method, and the numerical results are compared to the existing methods. The results suggest a significant improvement in the efficiency of the proposed methods in terms of the number of steps, execution time, and accuracy.


Introduction
Numerical solutions for boundary value problem have great importance in scientific computation, as they were widely used to model the real-world problems.There are several methods that can be used to solve the two-point boundary value problems such as the Adomian decomposition method modified by Duan and Rach [1] and Ebaid [2] to solve boundary value problem.Based on the Adomian decomposition method, a new analytical and numerical treatment is introduced to investigate linear and nonlinear two-point boundary value problems.Lang and Xu [3] studied a new quintic B-spline collocation method for linear and nonlinear second-order boundary value problems.Islam and Shirin [4] used Bernoulli polynomials to find the numerical solutions of the second-order linear and nonlinear boundary value problems.Besides that, Liu [5] had solved the boundary value problem with Neumann type using polynomial spline approach.The numerical solutions of second-order boundary value problems by collocation method with the Haar wavelets were presented by Siraj-ul-Islam et al. [6].A new kind of finite difference scheme presented for special second-order nonlinear two-point boundary value problem has been proposed by Erdogan and Ozis [7], while Prentice [8] considered the error control in a finite difference solution of a two-point boundary value problem.
In this paper, we are concerned for solving two-point second-order boundary value problems (BVPs) with two types of boundary condition, that is, Dirichlet and Neumann type.Two-point second-order boundary value problem is as follows: =  (, ,   ) ,  ≤  ≤ . ( Dirichlet boundary condition is as follows: Neumann boundary condition is as follows: () = ,   () = .
The BVPs as (1) will be solved using two-point block method with variable step size.The block methods are commonly used to solve the ODEs such as in Majid et al. [9].The authors have used the two-point block one-step method of Runge-Kutta type to solve the general second-order ODEs with variable step-size strategy.
In Majid et al. [10], the authors have solved the BVPs of Dirichlet type only by two-point block method with constant step size.Hence, in this paper, we aim to extend the work in Majid et al. [10] for solving BVPs of Dirichlet and Neumann type using variable step size.This block method has the advantage to solve the second-order differential equation directly and obtain two approximate solutions simultaneously in block.We adapted the multiple shooting techniques to obtain the missing initial value, and the three-step iterative method proposed by Yun [11] was employed to generate the missing guessing value.The numerical computations have been performed using the C language.

Formulation of the Two-Point Block Method
In Figure 1 Second point is The method is derived using Lagrange interpolation polynomial and the five interpolating points; that is, ( −2 ,  −2 ), ( −1 ,  −1 ), (  ,   ), ( +1 ,  +1 ), and ( +2 ,  +2 ) are involved in the corrector formulae of the two-point block method.The function (, ,   ) in ( 4) and ( 5) will be replaced by Lagrange interpolating polynomial.Let  = (−  +2 )/ℎ, replacing  = ℎ and changing the limit of integration from −2 to −1 for the first point and changing the limit of integration to −2 and 0 for the second point.Evaluate these integrals using MAPLE, the corrector formulae of the two-point block method will be obtained as follows.
First point is Second point is The method is the combination of predictor which is one order less than the corrector.The two-point block method with variable step-size strategy will be implemented for solving the boundary value problems via multiple shooting techniques.

Analysis of the Method
In this section, stability analysis, stability region, order of the method, and error constant of the two-point block method are discussed.

Stability Analysis
Definition 1.The method is zero stable provided the roots   of the first characteristic polynomial () specified as () = det[∑  =0  ()  − ] = 0 satisfy |  | ≤ 1. Substitute  = 1 into (7), and rewrite in matrix from: The first characteristic polynomial of the two-point block method is given as follows: where From Definition 1 and ( 9) the two-point one block method is zero stable.

Stability Region.
The stability polynomial of the twopoint block method applied to the test equation is as follows: The stability polynomials of two-point block method are as follows.
Figure 2 shows the regions of absolute stability for the two-point block method when the step-size ratio  = 0.5, 1.0, and 2.0.The stability region is the bounded shaded region and the region is larger as the step-size ratio increases.This is expected since smaller step-size will give larger step size ratio.

Order and Error Constant
Definition 2. The block method is where is the order of the LMM method, and (ℎ +2 ) is the local truncation error.Substituting  = 1 into (7) and apply the formulae, we obtaining From Definition 2, the order of two-point block method is five with error constant

Implementation of the Method
with conditions Therefore, we obtain the th stopping conditions as follows: The iteration is repeated until we reached the stopping conditions, and the value of  V will be generated by the threestep iterative method as follows: where (,  V ) is the solution of (22)

Neumann-Type Boundary Condition.
The missing initial condition is ().Equation (1) can be written as with conditions given as in ( 19), but condition 1 will be replaced by The stopping conditions are The three-step iterative method is where the value of   (,  V ) can be obtained from solving the   as follows: (27)

Variable
Step-Size Strategy.The choices of the next step size will be restricted to half, doubled or the same as the current step size.The adjustment is based on the local truncation error (LTE).If the local truncation error is less or equal to the tolerance (TOL), the choice for the next step will be double or remain the same.In the code developed, when the next step size is doubled, the ratio  is 0.5, while the step size remains constant, r is 1.If this condition fails, the current step size will be halved from the previous step size; that is, r is 2, and the approximate solutions in the block will be recalculate.
set   =  + ℎ, and evaluate the approximate values   and   with direct Adams-Bashforth method.
Compute functions   and    .
Evaluate the approximate values  + and  + with two-point block method.
Step 5.If fulfill stopping condition, go to Step 8.
Step 6. Generate the new guessing values  V by three-step iterative method.Set V = V + 1.
This algorithm was developed in C language.

Problem Tested
In this section, we have tested the algorithm 2P1BVS to six numerical examples to illustrate its accuracy and efficiency.
Troesch's problem comes from the investigation of the confinement of a plasma column under radiation pressure.The closed form solution to this problem has been given in terms of Jacobian elliptic function by Lin et al. [12].

Numerical Result and Discussion
The following notations are used in the tables: TOL: Tolerance TS: Total number of steps MAXE: Maximum error Time (sec): Execution time in second TFC: Total function calls 2P1BVS: Two-point block method with variable step size via multiple shooting technique adapted with three-step iterative method MLAM: Multilevel augmentation method proposed by Chen [13] COLHW: Collocation method with Haar wavelets proposed by Siraj-ul-Islam [6] FDM: Finite different method proposed by Erdogan and Ozis [7].
In Problems 1 and 2, we solved the boundary value problem with Dirichlet-type boundary conditions by 2P1BVS and compare our result with MLAM.In Table 1, the 2P1BVS has superiority in terms of accuracy and execution time when compared to MLAM.For example, the maximum error for the 2P1BVS and MLAM with 15 steps is 1.94−16 and 2.42−4 respectively.This result is expected since 2P1BVS solves the second-order BVPs directly and obtains two approximate solutions simultaneously.In Table 2, we observed that the 2P1BVS can obtain the maximum error 1.07 − 10 with  3 and 4 are comparable to COLHW for the larger tolerance.For example, in Table 3, the maximum error for 2P1BVS with 12 steps and COLHW with 16 steps is 3.64 − 4 and 2.91 − 4, respectively.As the tolerance is getting smaller, the maximum error and total number of steps for 2P1BVS  are setting better than COLHW.In Table 4, the maximum error for 2P1BVS with 108 steps and COLHW with 512 steps is 3.47 − 12 and 6.34 − 7, respectively.Table 5 displays the numerical results for Problem 5 with larger interval at  = 5 and  = 10 for solving Problem 5.The 2P1BVS managed to obtain the accuracy within the given tolerances.We also observed that the 2P1BVS manages to converge rapidly for the larger interval, for example, at TOL =  10 −10 , the execution time is 0.000551 and 0.001083 seconds when  = 5 and  = 10, respectively.We consider the cases when  = 0.5 and  = 1.0 to solve the Troesch problem at TOL = 10 −5 .The numerical results in Tables 6 and 7 show that the 2P1BVS manage to solve the problem as accurate as or better than FDM.Figures 3, 4, 5, and 6 display the comparison of the maximum errors versus the total steps for the numerical results in Tables 1-7.

Conclusion
In this paper, we have shown that the proposed two-point block method using variable step size (2P1BVS) is suitable for solving directly two-point second-order boundary value problems in Dirichlet-and Neumann-type-boundary conditions.

Figure 2 :
Figure 2: Stability region of the two-point block method.

Figure 3 :
Figure 3: Comparison of maximum error and total step for Problem 1.

Figure 4 :
Figure 4: Comparison of maximum error and total step for problem 2.

Figure 5 :
Figure 5: Comparison of maximum error and total step for problem 3.
Multiple shooting techniques are indeed a combination of several shooting techniques by dividing the given interval  ≤  ≤  into th subinterval.4.1.1.Dirichlet-Type Boundary Condition.The missing initial condition is   ().Equation (1) can be written as  2    2 =   (,   ,    ) , 4.1.Multiple Shooting Technique.The initial conditions being imposed at the same point in the independent variable , but the boundary conditions are imposed at different values of the independent variable.The idea of shooting technique is to form the initial condition from the boundary condition with the guessing value.

Table 1 :
Comparison of the numerical result for solving Problem 1.

Table 2 :
Comparison of the numerical result for solving Problem 2.

Table 3 :
Comparison of the numerical result for solving Problem 3.

Table 4 :
Comparison of the numerical result for solving Problem 4.

Table 5 :
Numerical result for solving Problem 5 with different endpoint, .

Table 6 :
Comparison of the numerical result for solving Troesch's Problem with  = 0.5.

Table 7 :
Comparison of the numerical result for solving Troesch's Problem with  = 1.0.