1. Introduction
In this study, we focus on finding numerically close solutions to first-order initial-value problems (IVPs) for ordinary differential equations (ODEs) of the type
where
d is the dimension of the system. With an initial value of
and a continuous function
f that meets Lipchitz’s condition, we can check that the existence and uniqueness theorem holds for this problem (see [
1]). The numerical value of the theoretical solution at
is denoted by
. In order to obtain a theoretical solution to ODEs in a computationally efficient manner, numerical methods are necessary [
2,
3] because they may be used to describe physical events, such as the movement of objects in space or the flow of liquids through pipes. ODEs find extensive applications in the fields of engineering, physics, logistic damping effect in chemotaxis models, epidemiology, applied microbiology and biotechnology [
4,
5,
6,
7]. In this way, numerical approaches give us the tools we need to solve ODEs quickly and accurately. The primary advantage of numerical methods is that they provide solutions to ODEs that may be implemented rapidly and without the requirement for integration over extended periods of time. Because numerical approaches can account for the effects of a variable’s values over time, they are often more accurate than analytical methods. In general, numerical approaches are crucial for solving ODEs because they permit more rapid and precise solution derivation. Engineers and scientists can examine the behavior of a system in many scenarios much more rapidly and precisely when they use numerical approaches [
8,
9].
It is of the utmost importance to develop numerical approaches that are both exact and efficient for tackling the challenges that are related to ordinary differential equations. This is due to the fact that ordinary differential equations find widespread applicability in the current world. In this particular setting, the body of previous research provides a variety of distinct numerical methods as viable answers to the problem at hand. Many different domains, including chemistry, flame propagation, computational fluid dynamics, population dynamics, engineering, microbiology and mathematical biology, require approximate solutions to challenging issues; nevertheless, the bulk of available numerical methods do not meet the requirements. In order for models to have adequate rigidity in terms of having non-linearity and stiffness, numerical methods that are not only computationally expensive but also need to have unbounded stability areas must be used [
10,
11].
One of the main weaknesses of numerical methods for solving ODEs is that they can be computationally expensive. Numerical methods require the use of large amounts of data to create a solution, and this requires a significant amount of computing power and time to calculate. Additionally, numerical methods can be inaccurate if the data used are not precise enough or if the steps taken in the numerical solution are too small. Another limitation of numerical methods is that they typically rely on approximations of the true solution, and this can lead to inaccuracies in the results. Additionally, numerical methods can produce a limited number of solutions, as they are often designed to solve specific types of ODEs. Finally, numerical methods can be difficult to debug and modify, as they involve complex algorithms and equations. Overall, numerical methods for solving differential equations have their strengths and weaknesses, and it is important to consider both when deciding which method to use. With careful consideration and proper implementation, numerical methods can provide accurate and efficient solutions to ODEs [
12].
Due to high computing cost (extremely tiny step size
) or limited stability region, most conventional methods, such as explicit Runge–Kutta, the Lobatto family, the multi-step Adams family, and higher-order multi-derivative types, are not employed. However, the implicit block procedures are recommended since they can begin by themselves, are computationally robust (cheap), are extremely accurate, converge quickly, and are mathematically stable (with
or
stability features). The most significant advantages of block approaches are their ability to initiate themselves and prevent overlapping between different parts of solutions. However, the stability areas of some block approaches are extremely small, and that is a drawback of the methodology suggested here [
13,
14]. In future research work, this shortcoming will be removed.
By applying multiple formulas to the IVP at once, as in the block strategy, they are able to improve upon one another and provide a more accurate estimate. ODEs of the form (
1) have been tackled using block methods in a number of publications [
15,
16], and there are block methods with several features for tackling higher-order problems as described in [
17,
18]. Modern computer algebra systems (CASs), such as MAPLE and MATHEMATICA, provide a plethora of pre-built numerical code functions that simplify the process of getting numerical approximations to the theoretical solution. These programs are optimized for solving problems with variable step sizes that can have a wide variety of solutions, including those that are stiff, non-stiff, singular, etc. Due to the numerical instability of some numerical approaches, stiff systems are among the most difficult systems to solve. Notable academics have expended a lot of effort to develop more effective means of addressing such problems. There are already numerical approaches for solving (
1), but utilizing a variable step-size formulation with an appropriate error estimation can increase the accuracy and rate of convergence. In this study, we also aim to find a new one-step way to find the approximate solution to first-order IVPs of the type given in (
1), using both fixed and adaptive step-size formulations.
The remaining sections of the paper are as follows: The next part (
Section 2) of the present article will discuss the new technique’s creation. In
Section 3, we analyze the proposed procedure. The suggested technique’s adaptive step-size formulation is described in
Section 4, and its implementation is covered in
Section 4.1. In
Section 5, we provide several real-world examples drawn from the natural sciences to demonstrate the effectiveness and accuracy of the proposed approach. Finally, a brief conclusion is provided in
Section 6, which also includes suggestions for moving forward.
2. Mathematical Formulation
In this part, we derive the one-step optimized block method with two off-grid points, while considering
in (
1) to facilitate the derivation. The off-grid points are optimized by using the main formula’s local truncation error denoted by
. Let us take into consideration the partition
on the integration interval
, with constant step-length
,
. Taking this into consideration, we assume an approximation to the theoretical solution of (
1) by an appropriate interpolating polynomial of the form as given below:
where
represent real unknown parameters. Differentiating (
2) with respect to
x, one obtains
Similarly, differentiating (
3) with respect to
x, one obtains
Take into consideration the two off-grid points as
and
with
in order to calculate the estimated solution of the IVP (
1) at the point
under the assumption that
. It is crucial to note at this point that the local truncation error of the main formula will be used to compute the optimal values of these two off-grid points. Consider that the polynomial
in (
2) and its first derivative in (
3) are evaluated at the point
, while the second derivative of
in (
4) is evaluated at the points
as follows:
This above setting results in a system of five equations with five real unknown parameters
. These equations can be arranged in matrix form as follows:
The five unknown coefficients (
), which are computed by solving the above linear system, are not, for the sake of conciseness, shown here. However, substituting the values of these five parameters in (
2) while utilizing the variable change
, we reach the following:
where,
We examine the one-step block approach to obtain
at the collocation points
, and
. In (
6), we take
. The resulting three formulas are as follows:
where
are approximations of the true solution
, and
for
. The aforementioned approximations use two unknown parameters
and two off-grid points
. We set the first two terms of the local truncation error
from (
10) to zero to acquire suitable values for these parameters (
u and
v). By doing so, optimal parameters will be acquired, and at the end of the generic subinterval
, the only value needed to advance the integration is
. Taylor expansion allows us to calculate the following local truncation error (
) of the main formula given in (
10):
The coefficients of
and
are equated to zero and the following optimal values of the parameters (
u and
v) are obtained from the resulting algebraic system, as is similar to what occurs while utilizing numerous other approaches to solving with numerical solutions of partial differential equations (see [
19,
20]):
Substituting the above optimal values into the local truncation errors of the formulae (
8) to (
10), we obtain the following:
Putting the optimal values given in (
12) into formulae (
8) to (
10), the following one-step optimized block method with two off-grid points is produced, whereas the pseudo-code for the method (fixed stepsize) is provided in Algorithm 1.
Algorithm 1: Pseudo-code for the optimized hybrid block technique with two intra-step points with a fixed stepsize approach. |
Data: (integration interval), N (number of steps), , |
(initial values), |
Result: sol (discrete approximate solution of the IVP (1)) |
1 Let |
2 Let |
3 Let sol |
4 Solve (14) to get where |
5 Let sol = sol |
6 Let |
7 Let |
8 if then |
9 go to 13 |
10 else |
11 go to 4; |
12 end |
13 End |
4. Adaptive Stepsize Approach
In this section, we present an adaptive step-size formulation for the one-step optimal approach that was given earlier. This will make it possible for us to obtain an effective formulation that will supply accurate numerical approximations to the IVP, as we will see in the following section. In the introduction, it is mentioned that in order to make efficient use of numerical methods, one must adjust the step size according to the way the solution behaves locally. An embedding strategy is typically used for this purpose, which means that in addition to the approximation for
, an additional lower-order technique must be obtained to estimate the local error (LE) at the final point of each integration step. This is because the approximation for
is a higher-order technique. The estimate of the LE can be found by taking the difference between the two approximations. For the considered second-order explicit method given in [
29], this choice does not cost any additional computational burden while simulating the differential systems:
and the local truncation error, LTE, is employed to estimate the local error through the following difference equation:
If
, where TOL stands for the tolerance predefined by the user, then this is the point where we agree with the results and select the next step as
, to minimize the computational burden and continue the integration process with
with the assumption that
. However, if
, then we need to reject the achieved results by reducing them and repeating the calculations with the new step as follows:
Here, the order of the lower-order technique (
32) is denoted by the value
, while the value
denotes a safety factor whose purpose is to circumvent the steps that were unsuccessful. In the part devoted to numerical examples, we took into consideration both a very modest initial step size as well as a strategy for modifying the step size that, if required, will cause the algorithm to alter the step size. Algorithm 2, in the form of pseudo-code, explains the implementation of the adaptive stepsize version of the proposed optimized block method.
Algorithm 2: Pseudo-code for the two-step optimized hybrid block method with two intra-step points under variable stepsize approach. |
Data: Initial stepsize: , ; Integration interval: ; Initial value: ; Function f: ; Given tolerance: TOL Result: Approximations of the problem ( 1) at selected points. 1 if then 2 end 3 if then 4 end 5 while , then solve system of equations in (14) to get the values do6 compute to get EST. 7 end 8 if TOL then accept the results and substitute then 9 end 10 Set , and use the formula in ( 32) to determine the new stepsize. 11 if TOL, then reject the results and repeat the calculations using (32) and go to step (6) then12 end 13 end |
4.1. Implementation Steps
The proposed method NPOBM given in (
14) is implicit, which means that on each step, a system of equations must be solved. Those systems, which provide the values
at each step, are usually solved using Newton’s method or its variants. Here, we adopted in the numerical realization of the scheme the solution provided by the command FindRoot in Mathematica
, which uses a Newton damped method. As it is well known, this kind of procedure presents local convergence, which means that good starting values must be provided. In what follows, we summarize below how NPOBM is applied to solve IVPs.
Step 1. Choose N, , on the partition .
Step 2. Using (
15),
, solve for the values of
and
simultaneously on the sub-interval
, as
and
are known from the IVP (
1).
Step 3. Next, for , the values of and are simultaneously obtained over the sub-interval , as and are known from the previous block.
Step 4. The process is continued for
to obtain the numerical solution to (
1) on the sub-intervals
.
5. Biological Models for Numerical Simulations
This section discusses the numerical simulations of the proposed block method given in (
14) on the basis of accuracy via error distributions (absolute maximum global error
, absolute error computed at the last mesh point over the chosen integration interval
, norm
, and root mean square error
, precision factor (scd
), and time efficiency (CPU time measured in seconds). In order to acquire
after successfully solving the system, we took advantage of the well-known and widely used second-order convergent Newton–Raphson approach. The next step in the process involves determining the value
by using the value
. As the starting value, we use the value from the preceding block. This process is repeated until the destination point (
) is reached. We determined that the length of the integration interval is
because the suggested methodology is a one-step method and some of the methods used for comparisons are one- and two-step. The Newton–Raphson method was implemented using the FindRoot command, which is provided in Mathematica
. It is important to mention that all of the numerical calculations are carried out using Mathematica
, which is installed on a personal computer that is powered by Windows OS and has an Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz 1.50GHz processor with 24.0 GB of installed RAM. It is also worth noting that we employed one sixth-order approach and two, at least, fifth-order ones for the purpose of comparison. Included are the following methods for the numerical comparative analysis:
NPOBM: New proposed optimal block method given in (
14).
MHIRK: Multi-derivative hybrid implicit Runge–Kutta method with fifth-order convergence, which appeared in [
30].
RADIIA and IRK: Fully implicit RK-type fifth-order methods, which appeared in [
31]
Sahi:
-stable hybrid block method of order six, which appeared in [
32].
LPHBM: Laguerre polynomial hybrid block method of sixth-order convergence, which appeared in [
33].
Different kinds of biological models based on differential equations are taken into consideration to analyze the performance of the proposed block technique presented in Equation (
14). For the numerical simulations, the following notations were used:
: step-size.
: initial step-size.
LE: local error estimate.
LTE: Local truncation error.
MaxErr: Maximum error on the selected grid points over the chosen integration interval.
RMSE: Root mean square error on the selected grid points over the chosen integration interval.
FFE: Total number of function evaluations.
NS: Total number of steps.
TOL: Predefined tolerance.
CPU: Computational time in seconds.
Problem 1 (Susceptible–Infected–Recovered (SIR) Model [
34]).
The SIR model is an epidemiological model that computes the theoretical number of people infected with an infectious illness in a closed community over the course of time. This number is based on the assumption that the disease spreads from person to person. This category of models gets its name from the fact that they use coupled equations to relate the numbers of sensitive individuals to one another. The total number of susceptible people is , the total number of infected people is , and the total number of people who have recovered is . This is a useful and simple way to explain a wide range of diseases that spread from person to person. Included are diseases such as measles, mumps, and rubella that can be explained via this well-known model. The flowchart of the model is given in Figure 3. The nonlinear differential system describing the SIR model is shown below:
where
and
are positive parameters. Define
to be:
By adding all equations in (
33), we obtain
Taking into consideration
with initial condition
, the exact solution is as follows:
. The SIR model is simulated with different techniques, and the results are tabulated. Both constant and adaptive stepsize approaches are used. It can be seen in
Table 1,
Table 2 and
Table 3 that the proposed technique (
14) not only yields the minimum errors, but it also goes with the highest scd factor, thereby proving the much better performance of (
14) in comparison to other well-known block techniques. In addition, the superiority of the proposed technique is maintained, even when the adaptive stepsize approach is utilized with varying values of the tolerance as shown in
Table 4. Finally, the efficiency curves produced with each technique under consideration speak volumes in favor of (
14) since they take the shortest time to yield the smallest maximum absolute global error as shown in
Figure 4.
Problem 2 (Application on Irregular Heartbeats and Lidocaine model [
35]).
Clinically, the condition known as ventricular arrhythmia, also known as an irregular heartbeat, may be treated with the medication lidocaine. The medicine must be kept at a bloodstream concentration of 1.5 milligram per liter in order for it to be effective. However, concentrations of the drug in circulation that are over 6 milligram per liter are believed to be deadly in certain people. The exact dose is determined by the body weight of the patient. It has been stated that the highest adult dose for ventricular tachycardia is 3 milligrams per kilogram. The medicine comes in 0.5%, 1%, and 2% concentration solutions that can be kept at room temperature. A model based on differential equations that captures the dynamic nature of pharmacological treatment was designed in [36], whose flowchart (Figure 5) is given as follows: The set of linear equations describing the above phenomenon is given as follows:
The physically significant initial data are zero drug in the bloodstream
and the injection dosage is
. The exact solution for IVP given in (
36) is computed as follows:
The irregular heartbeats and lidocaine model is simulated with different techniques, and the results are tabulated. Both constant and adaptive stepsize approaches are used. It can be seen in
Table 5,
Table 6 and
Table 7 that the proposed technique (
14) not only yields minimal errors, but it also goes with the highest scd factor, thereby proving the much better performance of (
14) in comparison to other well-known block techniques. In addition, the superiority of the proposed technique is maintained, even when the adaptive stepsize approach is utilized with varying values of the tolerance as shown in
Table 8. Finally, the efficiency curves produced with each technique under consideration speak volumes in favor of (
14) since they take the shortest time to yield the smallest maximum absolute global error as shown in
Figure 6.
Problem 3 (Nutrient Flow in an Aquarium [
37]).
This flow is important for maintaining a healthy and balanced aquatic environment, as it supports the growth and survival of plants and animals in the aquarium. Imagine there is a body of water that has a radioactive isotope that is going to be utilized as a tracer for the food chain. The food chain is made up of several types of aquatic plankton, such as A and B. Plankton are defined as creatures that live in water and move with the flow of the water, and may be found in such places as the Chesapeake Bay. There are two different kinds of plankton, which are known as phytoplankton and zooplankton. The phytoplankton are plant-like organisms that float across the water, including diatoms and other types of algae. Animal-like organisms that float in the water known as zooplankton include copepods, larvae, and small crustaceans. Figure 7 explains the phenomenon. More complex models might consider additional factors, such as the interactions between different types of plants and animals, the effects of different types of filtration systems, and the influence of water temperature and light intensity on the rate of photosynthesis. By considering these relationships, a differential equation model can provide a more comprehensive description of the nutrient flow in an aquarium and help to understand how changes in one aspect of the system might affect other parts of the system. The state variables
are explained as follows:
represents the concentration of an isotope in the water;
represents the concentration of an isotope in A; and
represents the concentration of an isotope in B. They are used in the following coupled linear system of differential equations:
with initial condition is
,
and
. The exact solution is as follows:
Model (
37) is simulated with different techniques, and the results are tabulated. Both constant and adaptive stepsize approaches are used. It can be seen in
Table 9,
Table 10 and
Table 11 that the proposed technique (
14) not only yields the minimum errors, but it also goes with the highest scd factor, thereby proving the much better performance of (
14) in comparison to other well-known block techniques. In addition, the superiority of the proposed technique is maintained, even when the adaptive stepsize approach is utilized with varying values of the tolerance as shown in
Table 12. Finally, the efficiency curves produced with each technique under consideration speak volumes in favor of (
14) since they take the shortest time to yield the smallest maximum absolute global error as shown in
Figure 8.
Problem 4 (Biomass Transfer [
38]).
Take, for example, a forest in Europe that only has one or two different kinds of trees. We begin by selecting some of the oldest trees, those that are forecast to pass away during the next several years, and then we trace the progression of live trees into dead ones. The dead trees will gradually rot and collapse due to the various biological and seasonal occurrences. In the end, the trees that have fallen form humus. Define the variables x, y, z, and t by the following: equals the biomass that has decomposed into humus;
represents the biomass of dead trees;
represents the biomass of live trees;
equals the amount of time in decades (one decade equals ten years).
The differential equations for the above scenario are given below:
with initial condition
,
and
. The exact solution is as follows:
Model (
38) is simulated with different techniques, and the results are tabulated. Both constant and adaptive stepsize approaches are used. It can be seen in
Table 13,
Table 14 and
Table 15 that the proposed technique (
14) not only yields the minimum errors, but it also goes with the highest scd factor, thereby proving the much better performance of (
14) in comparison to other well-known block techniques. In addition, the superiority of the proposed technique is maintained, even when the adaptive stepsize approach is utilized with varying values of the tolerance as shown in
Table 16. It is also worth noting that method MHIRK could not produce promising results even utilizing 88 steps, whereas, in comparison, NPOBM outperforms. Finally, the efficiency curves produced with each technique under consideration speak volumes in favor of (
14) since they take the shortest time to yield the smallest maximum absolute global error as shown in
Figure 9.
Problem 5. We consider the following two-dimensional nonlinear system taken from Ref. [39]:while the exact solution is with Model (
39) mentioned in Problem 5 is simulated with different techniques, and the results are tabulated. It can be seen in
Table 17,
Table 18 and
Table 19 that the proposed technique (
14) not only yields the minimum errors, but it also goes with the highest scd factor, thereby proving the much better performance of (
14) in comparison to other well-known block techniques. It is also worth noting that method IRK failed to produce promising results even utilizing
steps, whereas, in comparison, NPOBM outperforms.