1. Introduction
The essential role of numerical analysis is to give good insight to a practitioner to find the approximate solutions, especially when an exact solution is required, but is very difficult to obtain. This can be done using a variety of numerical techniques as an alternative to an analytical method. In the beginning, the physical applications will be transformed into a mathematical model in differential equation form before being solved numerically. The differential equations can be expressed as initial or boundary value problems that are subject to the initial conditions for the former type and boundary conditions for the latter type that governs the mathematical model. However, most application areas with equations involving higher order problems need to be reformulated in boundary value problems like electrical analysis, heat transfer phenomena, and deflection of a beam in civil engineering. Its importance has brought researchers to focus actively on an investigation that involves the improvement of their numerical scheme for solving two point boundary value problems (BVPs), giving a notable contribution for a more accurate result.
Generally, two point second order BVPs are given as:
subject to boundary conditions:
where
, and
for
are all constants. Furthermore,
and
are not all zeroes, as well as both
and
. The Lipschitz condition has been considered to ensure the uniqueness of a real function,
F, as follows:
for all points
in the region:
Theorem 1. (Atkinson et al. [1]) The problem given in Equations (1) and (2) assumes to be continuous on the region R and to satisfy the Lipschitz condition as stated in Equation (3). On the region R, F also satisfies the following conditions: ,
for some constant, ,
For the boundary conditions of Equation (2), assume:
Then, the BVPs in Equations (1) and (2) have a unique solution. Numerous methods in the literature have been introduced to obtain the solution of two point BVPs associated with the mixed conditions between Dirichlet and Neumann conditions that are prescribed at the boundary. Among them, some implemented the finite difference method, as in Cuomo and Marasco [
2], the modified Adomian decomposition method, as in Duan et al. [
3], and the Galerkin method, as in Anulo et al. [
4]. However, as far as the authors are aware, not many researchers have given attention to solving Equation (
1) directly with the Robin boundary condition that exist on one side of the conditions in Equation (
2) and combining with either the Dirichlet or Neumann boundary conditions. Therefore, this study sheds light on the approach for solving both the linear and nonlinear Equation (
1) that encompasses two types of mixed sets of boundary conditions, which are stated as follows
Type 1: The mixed boundary conditions of Dirichlet and Robin:
correspond to the case of
in Equation (
2).
Type 2: The mixed boundary conditions of Robin and Neumann:
correspond to
in Equation (
2).
The direct approach to obtain the solution of the two point second order problems using the block method can overcome the setback of the conventional approach due to its efficiency and ability to diminish the computational cost of the numerical results. This implementation has been used to accommodate second order problems with non-Robin boundary conditions directly as proposed by many scholars, including Awoyemi et al. [
5] with the modified block method, Adams–Moulton with the type block method in Phang et al. [
6], and Waeleh and Majid [
7] with the four-point multi-step block method. Recently, the direct integration method was conducted in the research studies by Nadirah et al. [
8], Nadirah et al. [
9], Ramos and Rufai [
10], and Ramos and Rufai [
11] to tackle second order problems with Robin type conditions occurring at both endpoints.
In numerical analysis, finding roots of a nonlinear equation,
, using the iterative scheme of Newton’s method:
required the calculation of the first derivative. By applying Steffensen’s method,
in Equation (
6) will be approximated with the divided difference:
Subsequently, Steffensen’s formula has the following form:
with the first derivative absent in the respective formula. In previous works [
12,
13], scholars employed Newton’s method together with the nonlinear shooting technique in their implementation and demonstrated that their proposed iterative schemes required the knowledge of the partial derivative. Thus, our preference iterative scheme is Steffensen’s method because we want to avoid the evaluation of the partial derivative throughout the procedure.
To support this issue, this study aims to improve the ideas from [
8] and [
9] for solving Equation (
1) that imposed the conditions of Type 1 and Type 2 directly using the newly derived two point diagonal multi-step block method. In addition to that, our work also highlights Steffensen’s method, which is a derivative free method, as an iterative scheme to estimate and correct the guessed value while performing the shooting methods.
The remaining sections of the manuscript are arranged in the following order. In
Section 2, we bring the reader to explore the derivation for the main formulas of the proposed two point diagonal block multi-step method. The important analysis describing some characteristics of the developed method will be elaborated in
Section 3.
Section 4 focuses mainly on the implementation part. Then,
Section 5 presents four numerical examples and major results in order to measure and validate the performances of the proposed diagonal block method. Final, the last section gives the main findings from this study.
2. Methodology
The two point block method divides the interval represented by a discrete set of nodes:
into several blocks, with each block generating two approximate values,
and
, concurrently at an even step size,
h, as manifested in
Figure 1. Numerical integration was applied to Equation (
1) in order to obtain the approximate formula of
and
by evaluating the integral twice.
Integrating once the first and second point yields:
where the notation
denotes the numerical approximation to the true solution of
for
.
Integrating twice the first and second point yields:
The derivation of the corrector formula is carried out by approximating the integrand function,
, in Equations (
9)–(
12) using a standard technique from the theory of the Lagrange interpolation polynomial of degree
k. Define
in general form as follows:
For the first point (
), consider
. Let
and
be substituted into the integral part. Hence, evaluating and simplifying the integral from
to 0 of the first point corrector formula,
, using MAPLE yields the following:
Next, we take
for the second point (
) and introduce the variable of substitution as
and
. We repeat the step by evaluating and simplifying the integral from
to 0 using MAPLE. Consequently, the following second point corrector formula,
, can be attained:
In other words, the diagonal formula proposed in this study uses a different degree of Lagrange interpolating polynomial for the first and second point. The development of the predictor two point block method can be obtained using the same approach as the corrector part. However, a way to predict
and
is to use an explicit multi-step method. Therefore, the number of interpolated points used in the predictor derivation will be one less than the corrector, which satisfies the explicit form. Therefore, the following predictor formulas for the first and second point can be attained:
and:
Since the proposed direct block method of order six (2PDD6) was categorized under the multi-step method and not a self-starting method, then 2PDD6 uses the available values generated at several previous nodes to initiate the computation process. In this study, the one step method will be used at the earlier stage of algorithm in order to give the exact number of starting values before continuing with the multi-step part. It is imperative to note that our 2PDD6 method follows the PE(CE) modes where P and C denote the evaluation of the approximation using the predictor and corrector formulas, respectively, whilst E is the evaluation of function F.
4. Implementation
Our interest is to apply the shooting technique to solve Equation (
1) together with the 2PDD6 method proposed in this study. The systematic procedure lies as a ground idea in the shooting methods starting by converting the BVPs into a couple of initial value problems (IVPs). Then, the appropriate initial values are chosen or guessed so that the approximate solutions are satisfied as close as possible to the required right boundary conditions either concomitantly in the Type 1 or Type 2 form.
For Type 1, the boundary conditions in Equation (
4) will be transformed to the initial conditions with initial estimates,
, as follows:
whereas for Type 2, the given boundary conditions translate to:
where
and
.
The specific steps for producing a numerical solution to the BVPs of either imposing Type 1 or Type 2 by the shooting method are given as follows
Set , and compute the numerical solution using the 2PDD6 formulae.
At , verify if nearly satisfies or not within the specified set of tolerance, TOL.
for Type 1 and Type 2 are represented as and , respectively.
If the prescribed stopping condition, TOL, is satisfied, then the required numerical solution is achieved. Otherwise, set the new guessing value, , for using Steffensen’s method. The entire process is repeated.
This iterative process is continued by revising the new estimate of
for
using Steffensen’s approach as follows:
where for Type 1:
and for Type 2:
, until a satisfactory stopping criterion is achieved.
The previous initial guesses, the associated
, and the required right boundary condition will be involved in the calculation to generate the new
. The value for
chosen in this study was based on the consideration in Burden and Faires [
19] and Roberts [
20] for
and
, respectively. The details approach on our method is presented in Algorithm 1.
Algorithm 1. The 2PDD6 method. |
Step 1: | Set TOL, step size, h, and initial estimate, |
Step 2: | Calculate for . |
Step 3: | For , calculate the starting values using the one step method. |
Step 4: | For , and to 2, do |
| , and compute , and using the predictor and corrector formulas |
| with PE(CE) modes where until convergence. |
| The calculation of the corrector formula as in Equations (13) to (14) involved in the convergence test. |
Step 5: | For , set |
| , , , . |
Step 6: | If , then repeat Step 4. Else, go to Step 7. |
Step 7: | At , verify the stopping condition, . If satisfied, then go to Step 9. |
| Else, continue Step 8. |
Step 8: | Correct a new set of guessing values, , for using the formula in Equation (25). |
| Repeat Step 2. |
Step 9: | Compute the results. Complete. |
The accuracy of the method is defined by the magnitude of the numerical error that is obtained using the following formula:
At the same time, our algorithm also involves the convergence test for a better accuracy result, and the respective formula is given by:
The values assigned for A and B correspond to three different types of error, which are the absolute error test for , the mixed error test for , and the relative error test for . The coding was written using the C language, and the computational procedure was computed using the Code::Blocks 16.01 platform.
5. Results and Discussion
This section is devoted to demonstrating the accuracy, efficiency, and applicability of the proposed 2PDD6 method in solving four numerically tested problems in the form of Equation (
1) associated with either Type 1 or Type 2 boundary conditions. Problems 1 to 3 used the absolute error test, while Problem 4 used the mixed error test. Tolerance,
, was set as the stopping criterion throughout the calculation in order to obtain the required solutions.
Problem 1. Given differential equations:with Type 1: and The exact solution is
Problem 2. Given differential equations:with Type 1: and The exact solution is Problem 3. Given differential equations:with Type 2: and The exact solution is Problem 4. Given differential equations:with Type 2: and The exact solution is For a comparable comparison, the numerical results generated by the 2PDD6 method were compared with the results generated by the DAM6 and 2PDAM6 methods, where all the methods satisfied the method of order six. However, the 2PDAM6 method fulfilled the fully implicit features. In addition to that, all the numerical results in
Table 1,
Table 2,
Table 3 and
Table 4 were computed using the same shooting strategy as discussed in Section Four.
As we can see in
Table 1, at
, 2PDD6 converged faster than the other methods because 2PDD6 acquired the least initial estimates, which resulted in fewer iterations. In solving Problem 2, at
and
, 2PDD6 obtained better accuracy results than the other methods as depicted in
Table 2. This reflects that 2PDD6 achieved the smallest magnitude of error when comparing the numerical outputs with the true solution. The accuracy and total guessing values were comparable between 2PDD6 and the other methods when solving Problem 3 at all step sizes, except for
; the accuracy of DAM6 was slightly better than 2PDD6, as presented in
Table 3. Nevertheless, 2PDD6 dominated other methods in terms of timing.
Table 4 demonstrates that 2PDD6 obtained superiority in terms of accuracy compared to the DAM6 and 2PDAM6 methods at
. In addition to that, 2PDD6 acquired one less guessing value than DAM6.
Overall, 2PDD6 reached the end interval much faster than DAM6 because two numerical values were generated at one time in the 2PDD6 scheme. This was expected since the total steps taken by 2PDD6 were less than DAM6 by almost half. Beside that, 2PDD6 accumulated less total function calls than 2PDAM6 because diagonal formulas are inexpensive in terms of function evaluations than full formulas. These performances signify that 2PDD6 required less consumption of time when solving all the tested problems, as tabulated in
Table 1,
Table 2,
Table 3 and
Table 4. The performance graphs in
Figure 4,
Figure 5,
Figure 6 and
Figure 7 visualize the best performances of the 2PDD6 method subject to accuracy and execution speed for a clear comparison with the 2PDAM6 and DAM6 methods.