Abstract
We analyze a set of explicit Runge–Kutta pairs of orders six and five that share no extra properties, e.g., long intervals of periodicity or vanishing phase-lag etc. This family of pairs provides five parameters from which one can freely pick. Here, we use a Neural Network-like approach where these coefficients are trained on a couple of model periodic problems. The aim of this training is to produce a pair that furnishes best results after using certain intervals and tolerance. Then we see that this pair performs very well on a wide range of problems with periodic solutions.
MSC:
65L05; 65L06; 90C26; 90C30
1. Introduction
The Initial Value problem (IVP) is
with a real number, and
Runge–Kutta (RK) pairs are the most widely used numerical schemes for tackling problems (1). Their coefficients are usually tabulated with Butcher tableaus [1,2], given as follows.
with and The tableau above indicates that the method shares s stages and A is a strictly lower triangular matrix. These stages are computed explicitly. RK pairs produce two approximations for in the point after advancing each time from available data . These approximations and are computed by
and
where
for The two estimations of the true solution, namely and share algebraic orders and , respectively. Then we may have an estimation of the local error as
Then we artificially force , i.e., the same as the global error of the higher-order formula (here ). Additionally, we expressed no reliability issues, e.g., tolerance proportionality is attained. Estimate (2) here reduces to , which is computed in every step and is used for guessing the next step size forward using the formula [3]
with tolerance t a low positive number set by the user. In case , we do not allow the solution to be advanced. Then, we again use (3) but now we set as a new value of the current step . These pairs are named RK as an abbreviation.
Runge–Kutta procedures were first introduced in the late 19th century [4,5]. RK pairs were introduced about 60 years ago. Erwin Fehlberg issued the first well-known pairs of orders 8(7), 6(5) and 5(4), refs. [6,7]. Dormand and Prince continued in the early 1980s [8,9].
RK pairs are well-suited to efficiently solve any non-stiff problem of the type (1). The precision of demand explains the wide range of pairings. As a result, the lower the accuracy of demand, the more efficient the lowest RK pairings. A high-order pair, on the other hand, should be chosen for demanding accuracies at quadruple precision.
In this work, we concentrate on RK6(5) pairings, which are chosen for intermediate to high accuracies. Problems (1) with periodic/oscillatory solutions interest us here. As a result, we shall offer a specific RK6(5) pair for dealing with such problems.
2. Theory of Runge–Kutta Pairs of Orders 6(5)
A Runge–Kutta method applied to a system of differential equations of the type (1) is said to be of algebraic order q if and only if
where is the set of i-th order rooted trees and
, are integral functions of (symmetry and density function respectively, in the terminology introduced by Butcher [2]) and is a certain composition of A, b, c. In the following, the symbol denotes a vector with all the elements of the set in some arbitrary order.
In the case of a pair, Equation (4) is expanded in 37 nonlinear algebraic equations that must be satisfied by its higher-order method and 17 equations by its lower-order method [2]. Meanwhile, we mention that all methods of order higher than five that have been constructed so far, as well as those that we consider in this article, obey the simplifying assumption
Otherwise, the number of conditions is 224; for details see [10].
All currently known pairs (except those derived by Sharp and Smart [11]) effectively use eight stages (i.e., they use eight stages, with or without the first stage of the next step). In such a case, the number of available free coefficients in A, b, , c, is 44 or 45, depending on whether the FSAL (First Stage As Last) device is employed or not.
The number of unknowns is less than the number of equations. Most of these equations are strongly nonlinear with respect to the elements of A. It is common in Runge–Kutta literature to apply for their solution some sort of simplifying assumptions. In the following, we focus on a special kind of simplifying assumption that forms a family of solutions for the order conditions. This family of solutions (and in consequence RK pairs) was proposed simultaneously by Dormand et al. [12] and Verner [13]. The coefficients for pairs coming from this family can be derived explicitly. Thus, we set initially
and assume the FSAL property .
In the following, whenever c is a vector, we denote by componentwise multiplication
(we assume ). Here we set
where I is an identity matrix of suitable dimension and . Observe that the first of the above simplifications (7) holds for indexes greater than 2. The second assumption holds for indexes greater than 3, i.e., .
After making the simplifying assumptions (6) and (7), the equations of order condition to be solved are less than the parameters of the method. See [14] for more details. The remaining equations are
The above order conditions along with (6) and (7) form a set of equations that are six less than the parameters. Thus, we choose arbitrarily the parameters best in the interval and This family’s pairs have been shown to perform best in a variety classes of problems [14].
We may proceed by evaluating successively the coefficients. Thus, we initially take (6). Then we compute successively and explicitly
and lastly the FSAL device holds
This means that even though , the family only spends eight stages every step, since the ninth stage is employed as the initial stage of the following step.
The next question is how to choose the free parameters. We have traditionally attempted to reduce the norm of the primary term of the local truncation error, i.e., the coefficients in the residual of Taylor error expansions corresponding to the underlying RK pair’s sixth-order method [14]. Another choice is to reduce the phase-lag. This means that we strive to narrow the angle between the numerical and analytical solutions in a free oscillator [15]. Methods with small phase-lag are ideal for use in situations with periodic solutions.
3. Training the Coefficients
We intend to extract a specific RK6(5) pair from the above-mentioned family. The pair to be constructed must outperform existing methods on harmonic oscillators and other problems with oscillatory solutions. Thus, we concentrate on the following couple of harmonic oscillators
with analytical solutions being and , respectively. These problems can be transformed to the following first-order systems,
and
respectively.
Let us approximate their solutions by an arbitrary RK6(5) pair taken from the family in question. After solving (8) with tolerance , we record the number of stages (i.e., function evaluations) needed and the global error observed over the grid (mesh) in the integration interval. As partially noticed in [16], a single-step efficiency may be given as
Here, we intend to run the methods over a whole interval and record the function evaluations spent and the global error observed. Thus, in [17] the efficiency of a method run for a certain problem is defined
i.e., for problem (8) the efficiency is . Ideally this number remains constant for all tolerances. Thus, for more stages, we obtain smaller global error and the efficiency measure remains the same.
Analogously, we solved (9) using as tolerance and recorded the corresponding values and . Then we define the efficiency metric
as fitness function and try to minimize it. Thus, the fitness function is two whole runs of an Initial Value Problem. The value u varies with respect to the free coefficients and We now fix , since this coefficient mainly influences tolerance. Indeed, we may set
and obtain a new Since , this is equivalent of tolerance becoming (see [16] for details in the issue).
The idea applied here originates in the work on neural networks done in [17]. For the minimization process, we used the Differential Evolution technique [18,19]. We have already tried this approach and obtained some interesting results in producing pairs from the family of interest here for integrating orbits [20]. In this latter work we trained the coefficients of a RK6(5) pair on a couple of Kepler orbits. Then we observed very pleasant results over a set of Kepler orbits as well as other known orbital problems.
The optimization furnished five values for the parameters. The result is rather robust, i.e., we obtain almost the same optimal value for u even for neighboring parameters. Thus, we present the selected parameters in 6 significant decimal digits below:
The resulting pair is presented in Table 1.
Table 1.
Coefficients of the proposed here NEW6(5) pair, accurate for double precision computations.
The norm of the principal truncation error coefficients is (see [21] for details on order conditions of Runge–Kutta methods and their truncation error coefficients)
which is much greater than the corresponding value for DLMP6(5) presented in [13]. The interval of absolute stability is which is rather small. No extra phase-lag order is observed since [15].
In conclusion, no extra attribute appears to exist. The pair in Table 1 does not have anything noteworthy. After observing its usual traits, it is difficult to expect a particular performance.
4. Numerical Tests
We tested the following pairs chosen from the family studied above.
- DLMP6(5) pair appeared in [13].
- PTP6(5) pair given in [15].
- NEW6(5) presented here.
All the pairs were run for tolerances and the efficiency measures (10) were recorded.
The problems we tested are the following.
1–5. The model problem
with analytical solution . This problem was run for five different selections of , namely Thus, we obtain five problems 1–5.
6. The inhomogeneous problem
with theoretical solution .
7. The Bessel equation
The well-known Bessel equation
is verified by an analytical solution of the form [15],
with the zeroth-order Bessel function of the first kind. This equation also integrated in the interval .
8. The Duffing equation
Next, we choose the equation
with an approximate analytical solution shown in [22,23],
We again solved the above equation in the interval .
9. semi-Linear system
The nonlinear problem proposed by Franco and Gomez [24] is as follows.
with analytical solution
We estimated 63 (i.e., 9 problems times 7 tolerances) efficiency measures for each pair. We set NEW65 as reference pair. Then we divided each efficiency measure of DLMP6(5) with the corresponding efficiency measure of NEW6(5). The results can be found in Table 2.
Table 2.
Efficiency measures ratios of DLMP6(5) vs. NEW6(5).
For the above selection of free parameters, we obtained while for DLMP6(5) pair found in [13] we observe , i.e.,
meaning that the latter pair is about more expensive than delivering the same accuracy. By contrast, we experience about digits of accuracy less for the same costs. The figure underlined in the first row of results is the number we found at the original training with problem-1 and tolerance . In the same sense
and it is represented in Table 2 with an underlined figure also.
It is obvious that positive results are in favor of the second pair. On average, we observed a ratio of , meaning that DLMP6(5) is about more expensive. This is quite remarkable since much effort has been made over the years for achieving 10–20% efficiency [21,25]. By contrast, this means that about digits were gained on average at the same costs.
In Table 3, we present the ratios in efficiency measures of PTP6(5) with the corresponding efficiency measures of NEW6(5). On average we observed a ratio of , meaning that PTP6(5) is about more expensive. By contrast, this means that about digits were gained on average at the same costs. The result is also remarkable. In [15], a high phase-lag order pair named PTP6(5) was designed for addressing problems with periodic solutions. This required the satisfaction of two extra conditions for the coefficients. NEW6(5) outperformed other pairs even in the clearly nonlinear problems. Finally, we mention that we obtained more or less similar results for longer integrations.
Table 3.
Efficiency measures ratios of PTP6(5) vs. NEW6(5).
The results are very promising. Some future research may use optimization on a wider range of tolerances and model problems. Perhaps a pair spending two parameters for fulfilling the phase-lag property and then trained for periodic problems would furnish even more interesting results. Of course application of this technique on other classes of problems is also possible, e.g., orbits.
5. Conclusions
Training the coefficients of a Runge–Kutta pair for addressing problems with oscillatory solutions. We concentrated on an extensively studied family of Runge–Kutta pairs of orders six and five. All the coefficients of this pair are expressed with respect to a set of free parameters. We optimized the results of this pair in a couple of runs of a harmonic oscillator changing the free parameters. Thus, we concluded that a certain pair is found to outperform other representatives from this family in a wide range of relevant problems.
Author Contributions
All authors have contributed equally. All authors have read and agreed to the published version of the manuscript.
Funding
The Deanship of Scientific Research (DSR) at King Abdulaziz University, Jeddah, Saudi Arabia has funded this project, under grant no. (FP-057-43).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Butcher, J.C. On Runge-Kutta processes of high order. J. Austral. Math. Soc. 1964, 4, 179–194. [Google Scholar] [CrossRef] [Green Version]
- Butcher, J.C. Numerical Methods for Ordinary Differential Equations; John Wiley & Sons: Chichester, UK, 2003. [Google Scholar]
- Hairer, E.; Nørsett, S.P.; Wanner, G. Solving Ordinary Differential Equations I; Springer: Berlin, Germany, 1987. [Google Scholar]
- Runge, C. Ueber die numerische Auflöung von Differentialgleichungen. Math. Ann. 1895, 46, 167–178. [Google Scholar] [CrossRef] [Green Version]
- Kutta, W. Beitrag zur naherungsweisen Integration von Differentialgleichungen. Z. Math. Phys. 1901, 46, 435–453. [Google Scholar]
- Fehlberg, E. Klassische Runge-Kutta-Formeln fiinfter und siebenter Ordnung mit Schrittweiten-Kontrolle. Computing 1969, 4, 93–106. [Google Scholar] [CrossRef]
- Fehlberg, E. Klassische Runge-Kutta-Formeln vierter und niedriger ordnung mit Schrittweiten-Kontrolle und ihre Anwendung auf Warmeleitungsprobleme. Computing 1970, 6, 61–71. [Google Scholar] [CrossRef]
- Dormand, J.R.; Prince, P.J. A family of embedded Runge-Kutta formulae. J. Comput. Appl. Math. 1980, 6, 19–26. [Google Scholar] [CrossRef] [Green Version]
- Prince, P.J.; Dormand, J.R. High order embedded Runge-Kutta formulae. J. Comput. Appl. Math. 1981, 7, 67–75. [Google Scholar] [CrossRef] [Green Version]
- Tsitouras, C. Explicit Runge–Kutta methods for starting integration of Lane–Emden problem. Appl. Math. Comput. 2019, 354, 353–364. [Google Scholar] [CrossRef]
- Sharp, E.W.; Smart, E. Explicit Runge-Kutta pairs with one more derivative evaluation than minimum. SIAM J. Sci. Statist. Comput. 1993, 14, 338–348. [Google Scholar] [CrossRef]
- Verner, J.H. Some Runge-Kutta formula pairs. SIAM J. Numer. Anal. 1991, 28, 496–511. [Google Scholar] [CrossRef]
- Dormand, J.R.; Lockyer, M.A.; McGorrigan, N.E.; Prince, P.J. Global error estimation with Runge-Kutta triples. Comput. Math. Appl. 1989, 18, 835–846. [Google Scholar] [CrossRef] [Green Version]
- Tsitouras, C. A parameter study of explicit Runge-Kutta pairs of orders 6(5). Appl. Math. Lett. 1998, 11, 65–69. [Google Scholar] [CrossRef] [Green Version]
- Papageorgiou, G.; Tsitouras, C.; Papakostas, S.N. Runge-Kutta pairs for periodic initial value problems. Computing 1993, 51, 151–163. [Google Scholar] [CrossRef]
- Shampine, L.F. Some practical Runge-Kutta formulas. Math. Comp. 1986, 46, 135–150. [Google Scholar] [CrossRef]
- Tsitouras, C. Neural Networks With Multidimensional Transfer Functions. IEEE Trans. Neural Netw. 2002, 13, 222–228. [Google Scholar] [CrossRef]
- Storn, R.M.; Price, K.V. Differential evolution—A simple and efficient heuristic for global optimization over continuous spaces. J. Glob. Optim. 1997, 11, 341–359. [Google Scholar] [CrossRef]
- Price, K.V.; Storn, R.M.; Lampinen, J.A. Differential Evolution, a Practical Approach to Global Optimization; Springer: Berlin, Germany, 2005. [Google Scholar]
- Shen, Y.C.; Lin, C.L.; Simos, T.E.; Tsitouras, C. Runge-Kutta Pairs of Orders 6(5) with Coefficients Trained to Perform Best on Classical Orbits. Mathematics 2021, 9, 1342. [Google Scholar] [CrossRef]
- Papageorgiou, G.; Papakostas, S.N.; Tsitouras, C. A general family of explicit Runge-Kutta pairs of orders 6(5). SIAM J. Numer. Anal. 1996, 33, 917–936. [Google Scholar]
- Chawla, M.M.; Rao, P.S. An exDlicit sixth-order method with phase-iag of order eight for y″ = f(t, y). J. Comput. Appl. Math. 1987, 17, 365–368. [Google Scholar] [CrossRef] [Green Version]
- Wu, D.; Wang, Z. A Mathematica program for the approximate analytical solution o a nonlinear undamped Duffing equation by a new approximate approach. Comput. Phys. Commun. 2006, 174, 447–463. [Google Scholar] [CrossRef]
- Franco, J.M.; Gomez, I. Trigonometrically fitted nonlinear two-step methods for solving second order oscillatory IVPs. Appl. Math. Comput. 2014, 232, 643–657. [Google Scholar] [CrossRef]
- Papakostas, S.N.; Papageorgiou, G. A family of fifth order pairs. Math. Comput. 1996, 65, 1165–1181. [Google Scholar] [CrossRef] [Green Version]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).