Abstract
We have recently proposed a variational framework for the approximation of systems of differential equations. We associated, in a natural way, with the original problem, a certain error functional. The discretization is based on standard descent schemes, and we can use a variable-step implementation. The minimization problem has a unique solution, and the approach has a global convergence. The use of our error-functional strategy was considered by other authors, but using a completely different way to derive the discretization. Their technique was based on the use of an integral form of the Euler equation for a related optimal control problem, combined with an adapted version of the shooting method, and the cyclic coordinate descent method. In this note, we illustrate and compare our strategy to theirs from a numerical point of view.
1. Introduction
Ordinary differential equations (ODEs) can be used to model problems coming from all of science and engineering. The numerical approximation of their solutions is one of the fields within mathematics that has received more attention over the years. It is virtually impossible to solve in an exact way even the most innocent-looking examples. New studies arise because of new properties of systems of ODEs appear. For instance, when the problem is stiff, one should use, as a general rule, implicit integration schemes. For more details, we propose this incomplete list of references [1,2,3,4,5,6].
Several years ago, we started a new approach for the approximation and analysis of ODEs [7]. We start with a simple observation saying that the solution of the Cauchy problem:
where , , , and , should be understood as the unique optimal solution of the variational problem:
under the initial condition .
This initial article inspired [8] to set up an approximation scheme based on this optimization perspective. The authors of that contribution utilized this approach to reformulate it as an optimal control problem and then proposed an approximation technique for this related problem. They reported on some encouraging numerical experiments.
Later, including applications where implicit methods are used, we expanded and developed our variational technique in various directions [9,10,11,12,13,14]. In particular, we have paid special attention to stiff problems. The numerical scheme that stems from (2) is based on a typical descent procedure. Let us look at the variation of the functional:
when we perturb a given feasible path by some with so as to not change the initial condition . We compute:
We are interested to finding a procedure to produce such that the above derivative is negative:
except when is the solution of (1), and in that case, the derivative ought to vanish.
Using steepest-descent ideas, one first possibility is to select as the optimal solution of the variational problem:
under . Since it is a problem for ( is fixed here), the unique optimal solution of this problem is the unique solution of the optimality system, namely,
The condition at the right-end point T is the transversality condition. It is important to point out that the solution of this problem can be given in closed form in terms of several integrals, as we can find in [14].
Another possibility to find a good descent direction is to consider the linear, non-constant coefficient system:
again with . With this choice of , we have that:
a multiple of the value of the error functional E at . Thus, for the implementation of this second possibility, we will approximate only linear problems. For these linear problems, we can use robust implicit integrators like Runge–Kutta methods and apply their theoretical results avoiding the problem of the local convergence of Newton-type methods.
This iterative approach should be used for problems where implicit schemes are required, for instance: Stiff problems, algebraic-differential equations or Hamiltonian systems. In the classical implementation of the implicit schemes, we need to approximate systems of nonlinear equations via Newton-type methods. In particular, the computational costs of both approaches are similar. The advantage of our method is that we have global convergence. Thus, the selection of a good initial guess like Newton-type methods having only local convergence is not necessary. If for a given problem, we are able to use explicit schemes (without associated systems of equations to approximate), our approach makes no sense, since it will be clearly more expensive.
This note was motivated by [8], where inspired by our paper [7], the use of our error-functional strategy was considered but using a completely different way to derive the discretization. The particular transformation that the authors utilized to transform the variational problem into a control problem, in order to approximate the solution of the differential equation or system, seems a bit artificial, and nothing is missed if one deals directly with the variational problem to approximate the global minimizer numerically, i.e., the solution of the differential system (1). We present some comparisons in Section 3.
2. Preliminaries
We start with any initial approximation to the solution of our problem (1). In order to improve this approximation, we will decrease the error in going from to . We find the next iterate by adding to the solution of the linear problem:
The following result, taken directly from [9], very clearly supports this strategy.
Theorem 1.
The iterative procedure , starting from any approximation , where:
converges strongly, in and in , to the unique solution of the Cauchy problem (1).
An implicit fixed-step schemes computes the new state as a function of the state at the current time step. However, any variable-step solver dynamically varies the step size during the approximation. Using its local error control to achieve the tolerance that one specifies, these solvers increase or reduce the step size. The computation of the step size at each time step adds to the computational overhead, but can reduce the simulation time required to maintain a specified level of accuracy, reducing the number of steps.
The solution of a stiff differential equation should change on a time scale smaller in comparison to the discretization considered. Moreover, if we take a sufficiently small discretization parameter, the method will have a prohibitive computational cost. Thus, in general, step-variable implementations are necessary.
When we approximate a differential equation using a method of order p, the error can be written as:
where denotes the solution.
We can estimate the constant C using extrapolations methods. We should also consider schemes with bigger order q. In these cases, we have:
and then:
The embedded methods are constructed having the same Butcher tableau. Thus, the sub-stages of the lower order scheme are used in the higher order scheme. In particular, the extra computational cost derived by the use of two methods is reduced. Of course, we need to compute the rest of the functional evaluations used in the higher order scheme.
However, in our approach, we can use, as an estimation of the error, the norm of the direction . These numbers have a relation with the local error. We use this norm in the stop criterion; in particular, our variable step implementation can be implemented without any extra computation.
The variable step codes select the new step in such a way that the error is smaller than a prescribed tolerance , with any estimate of the error.
The desired error associated with a will be:
and the real error:
Thus, we compute:
For more details concerning the analytical aspect of our approach on several applications, we refer to our previous works [7,9,10,11,12].
3. Numerical Comparison
In this section, we compare our strategy using a fixed step implementation in the implicit Euler method, which is the simplest choice that we can consider, and the strategy used in [8]. We present the result of two examples studied in [8] (with a discretization of 1000 nodes), but similar conclusions are obtained for the other problems. At the end, we include an example to emphasize the additional advantages of our variable step implementation. The CPU time in seconds is calculated using the average of 50 computations in order to reduce the influence of other processes.
- Let us consider the following problem:We are interested in approximating the value . See Table 1 for an explicit comparison of our iterative scheme versus the approximation suggested in [8].
Table 1. Comparison of our approach using the implicit Euler method and the approach proposed in [8].
- For the problem:we are also interested in approximating the value . In Table 2, we can see the performance of both methods.
Table 2. Comparison of our approach using the implicit Euler method and the approach proposed in [8].
- Finally, we would like to emphasize that our approach can be implemented in an easy way using a variable step strategy. We include here an example to see the advantages of this adaptive implementation.We are interested in approximating , for different values of T, for the problem:We consider the trapezoid method:In Table 3, we can see the advantages of the step-variable approach.
Table 3. Comparison of the CPU-time in our approach, for different values of T and for , .
We refer to our paper [13] for more details.
Author Contributions
These authors contributed equally to this work.
Funding
Proyecto financiado por la Comunidad Autónoma de la Región de Murcia a través de la convocatoria de Ayudas a proyectos para el desarrollo de investigación científica y técnica por grupos competitivos, incluida en el Programa Regional de Fomento de la Investigación Científica y Técnica (Plan de Actuación 2018) de la Fundación Séneca-Agencia de Ciencia y Tecnología de la Región de Murcia 20928/PI/18, MTM2015-64382-P (MINECO/FEDER). This research was also funded by grants MTM2013-47053-P, PEII-2014-010-P of the Conserjería de Cultura (JCCM) and by grant GI20152919 of UCLM.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Adamu, G.; Sinha, P. Numerical simulation of thermal deformation of a rough slider bearing and its Asperities: Special reference on load generation in parallel sliders. Commun. Math. Model. Appl. 2018, 3, 1–15. [Google Scholar]
- Auzinger, W.; Frank, R.; Kirlinger, G. Modern convergence theory for stiff initial-value problems. J. Comput. Appl. Math. 1993, 45, 5–16. [Google Scholar] [CrossRef]
- Byrne, G.; Hindmarsh, A. Stiff ODE solvers: A review of current and coming attractions. J. Comput. Phys. 1987, 70, 1–62. [Google Scholar] [CrossRef]
- Hairer, E.; Wanner, G. Solving Ordinary Differential Equations II: Stiff and Differential Algebraic Problems; Springer-Verlag: Berlin, Gemany, 1991. [Google Scholar]
- Jay, L. Convergence of Runge-Kutta methods for differential-algebraic systems of index 3. Appl. Numer. Math. 1995, 17, 97–118. [Google Scholar] [CrossRef]
- Ramadan, M.A.; Ali, M.R. Application of Bernoulli wavelet method to solve a system of fuzzy integral equations. J. Mod. Methods Numer. Math. 2018, 9, 16–27. [Google Scholar] [CrossRef]
- Amat, S.; Pedregal, P. A variational approach to implicit ODEs and differential inclusions. ESAIM-COCV 2009, 15, 139–148. [Google Scholar] [CrossRef]
- Bayón, L.; Grau, J.M.; Ruiz, M.M.; Suárez, P.M. Numerical approximation to ODEs using the error functional. Proc. Am. Math. Soc. 2012, 140, 4295–4308. [Google Scholar] [CrossRef]
- Amat, S.; Pedregal, P. On a variational approach for the analysis and numerical simulation of ODEs. Discret. Contin. Dyn. Syst. 2013, 33, 1275–1291. [Google Scholar] [CrossRef]
- Amat, S.; López, D.J.; Pedregal, P. Numerical approximation to ODEs using a variational approach I: The basic framework. Optimization 2014, 63, 337–358. [Google Scholar] [CrossRef]
- Amat, S.; Legaz, M.J.; Pedregal, P. Linearizing stiff delay differential equations. Appl. Math. Inf. Sci. 2013, 7, 229–232. [Google Scholar] [CrossRef]
- Amat, S.; Legaz, M.J.; Pedregal, P. On a Newton-type method for differential-algebraic equations. J. Appl. Math. 2012, 2012, 1–15. [Google Scholar] [CrossRef]
- Amat, S.; Legaz, M.J.; Pedregal, P. A step variable implementation of a variational method for stiff differential equations. Math. Comput. Simul. 2015, 118, 49–57. [Google Scholar] [CrossRef]
- Pedregal, P. A variational approach to dynamical systems, and its numerical simulation. Numer. Funct. Anal. Opt. 2010, 31, 814–830. [Google Scholar] [CrossRef]
© 2019 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 (http://creativecommons.org/licenses/by/4.0/).