# Geometric Numerical Integration of Liénard Systems via a Contact Hamiltonian Approach

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. A Contact Hamiltonian Formulation of Liénard Systems

#### 2.1. A Brief Review of Liénard Systems

**Example**

**1**

**.**Perhaps the most famous example of the family of Liénard systems is the van der Pol oscillator, which can be written using dimensionless variables as follows

**Theorem**

**1**

**.**Under the conditions

- $F,g\in {C}^{1}\left(\mathbb{R}\right)$,
- $xg\left(x\right)>0$if$x\ne 0$,
- $F\left(0\right)=0$and$f\left(0\right)<0$,
- $F\left(x\right)$has exactly one positive zero at$x=a$, is monotone increasing for$x>a$and$\underset{x\to +\infty}{lim}F\left(x\right)=+\infty$;

#### 2.2. A Brief Review of Contact Hamiltonian Systems

#### 2.3. A Contact Hamiltonian Formulation of Liénard Systems

**Theorem**

**2**

**.**Liénard systems are contact Hamiltonian systems, with a Hamiltonian of the form

**Example**

**2**

**.**As we have already seen in Section 2.1 the van der Pol equation is a particular case of a Liénard system, which is obtained by choosing $f\left(x\right)$ and $g\left(x\right)$ as

**Remark**

**1.**

**Remark**

**2.**

## 3. Geometric Numerical Integration of Liénard Systems

#### 3.1. Contact Splitting Integrators

**Proposition**

**1**

**.**In the hypotheses above, let ${e}^{t{X}_{{h}_{j}}}$ denote the map given by the time-t exact flow of each vector field ${X}_{{h}_{j}}$, for $j=1,\dots ,N$. Then

**Proposition**

**2**

**.**If ${S}_{2n}\left(\tau \right)$ is an integrator of order $2n$, then the map

**Proposition**

**3**

**.**There exist $m\in \mathbb{N}$ and a set of real coefficients ${\left\{{w}_{j}\right\}}_{j=0}^{m}$ such that the map

**Remark**

**3.**

#### 3.2. Modified Hamiltonian and Error Analysis

#### 3.3. Geometric Numerical Integration of Liénard Systems

**Example**

**3**

**.**Applying the above splitting to the Hamiltonian (20) we obtain

**Remark**

**4.**

#### 3.4. A Remark on Variational Integrators

## 4. Geometric Numerical Integration of the van der Pol Oscillator: Numerical vs. Analytical Results

#### 4.1. Numerical Results

#### 4.1.1. $\u03f5=0$ (Harmonic Oscillator)

#### 4.1.2. $\u03f5\ll 1$ and $\u03f5\sim 1$ (Non-Stiff Regime)

#### 4.1.3. $\u03f5\gg 1$ (Stiff Regime)

#### 4.2. Analytical Results

**Proposition**

**4.**

**Proof.**

**Proposition**

**5.**

**Proof.**

**Case****(I)**- ${\lambda}_{1,2}\in \mathbb{C}$: The eigenvalues are complex conjugates, therefore $|{\lambda}_{1}|=|{\lambda}_{2}|$. Since $detJ={\lambda}_{1}{\lambda}_{2}={e}^{\u03f5\tau}$, we have $|{\lambda}_{1}|=|{\lambda}_{2}|={e}^{\frac{\u03f5\tau}{2}}>1$.
**Case****(II)**- ${\lambda}_{1,2}\in \mathbb{R}$: This happens when $\beta \ge 0$, that is

#### 4.2.1. $\u03f5=0$ (Harmonic Oscillator)

#### 4.2.2. $\u03f5\ll 1$ (Non-Stiff Regime)

**Proposition**

**6.**

**Proof.**

#### 4.2.3. $\u03f5\gg 1$ (Stiff Regime)

**Proposition**

**7.**

**Proof.**

## 5. Geometric Numerical Integration of Forced Liénard Systems

`SciPy`[36], a robust adaptive solver with automatic and dynamic selection of the applied stiff or nonstiff methods, with a relative accuracy parameter of ${10}^{-13}$ and an absolute accuracy parameter of ${10}^{-15}$.

**Remark**

**5.**

#### The Forced van der Pol Oscillator

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Acknowledgments

## Conflicts of Interest

## References

- Liénard, A. Etude des oscillations entretenues. Revue Générale L’électricité
**1996**, 23, 901–912. [Google Scholar] - Van der Pol, B. A theory of the amplitude of free and forced triode vibrations. Radio Rev. 1
**1920**, 701–710, 754–762. [Google Scholar] - Nucci, M.C.; Tamizhmani, K.M. Lagrangians for Dissipative Nonlinear Oscillators: The Method of Jacobi Last Multiplier. J. Nonlinear Math. Phys.
**2021**, 17, 167. [Google Scholar] [CrossRef][Green Version] - Cariñena, J.F.; Guha, P. Nonstandard Hamiltonian structures of the Liénard equation and contact geometry. Int. J. Geom. Methods Mod. Phys.
**2019**, 16, 1940001. [Google Scholar] [CrossRef] - Choi, J.S.; Tapley, B.D. An extended canonical perturbation method. Celest. Mech.
**1973**, 7, 77–90. [Google Scholar] [CrossRef] - Shah, T.; Chattopadhyay, R.; Vaidya, K.; Chakraborty, S. Conservative perturbation theory for nonconservative systems. Phys. Rev. E
**2015**, 92. [Google Scholar] [CrossRef][Green Version] - Chen, Z.; Raman, B.; Stern, A. Structure-Preserving Numerical Integrators for Hodgkin–Huxley-Type Systems. SIAM J. Sci. Comput.
**2020**, 42, B273–B298. [Google Scholar] [CrossRef][Green Version] - Geiges, H. An Introduction to Contact Topology; Cambridge University Press: Cambridge, UK, 2008; Volume 109. [Google Scholar]
- Mrugala, R.; Nulton, J.D.; Schön, J.C.; Salamon, P. Statistical approach to the geometric structure of thermodynamics. Phys. Rev. A
**1990**, 41, 3156–3160. [Google Scholar] [CrossRef] - Van der Schaft, A.; Maschke, B. Geometry of Thermodynamic Processes. Entropy
**2018**, 20, 925. [Google Scholar] [CrossRef][Green Version] - Bravetti, A. Contact geometry and thermodynamics. Int. J. Geom. Methods Mod. Phys.
**2019**, 16, 1940003. [Google Scholar] [CrossRef] - Bravetti, A.; Tapias, D. Thermostat algorithm for generating target ensembles. Phys. Rev. E
**2016**, 93. [Google Scholar] [CrossRef][Green Version] - Bravetti, A.; Cruz, H.; Tapias, D. Contact Hamiltonian mechanics. Ann. Phys.
**2017**, 376, 17–39. [Google Scholar] [CrossRef][Green Version] - Liu, Q.; Torres, P.J.; Wang, C. Contact Hamiltonian dynamics: Variational principles, invariants, completeness and periodic behavior. Ann. Phys.
**2018**, 395, 26–44. [Google Scholar] [CrossRef] - Bravetti, A.; Seri, M.; Vermeeren, M.; Zadra, F. Numerical integration in Celestial Mechanics: A case for contact geometry. Celest. Mech. Dyn. Astron.
**2020**, 132. [Google Scholar] [CrossRef][Green Version] - Vermeeren, M.; Bravetti, A.; Seri, M. Contact variational integrators. J. Phys. A Math. Theor.
**2019**, 52, 445206. [Google Scholar] [CrossRef][Green Version] - Gaset, J.; Gràcia, X.; Muñoz-Lecanda, M.C.; Rivas, X.; Román-Roy, N. New contributions to the Hamiltonian and Lagrangian contact formalisms for dissipative mechanical systems and their symmetries. Int. J. Geom. Methods Mod. Phys.
**2020**, 17, 2050090. [Google Scholar] [CrossRef] - Gaset, J.; Gràcia, X.; Muñoz-Lecanda, M.C.; Rivas, X.; Román-Roy, N. A contact geometry framework for field theories with dissipation. Ann. Phys.
**2020**, 414, 168092. [Google Scholar] [CrossRef][Green Version] - Ciaglia, F.; Cruz, H.; Marmo, G. Contact manifolds and dissipation, classical and quantum. Ann. Phys.
**2018**, 398, 159–179. [Google Scholar] [CrossRef][Green Version] - Simoes, A.A.; Martín de Diego, D.; Lainz Valcázar, M.; de León, M. On the Geometry of Discrete Contact Mechanics. J. Nonlinear Sci.
**2021**, 31. [Google Scholar] [CrossRef] - Goto, S.i.; Hino, H. Fast symplectic integrator for Nesterov-type acceleration method. arXiv
**2021**, arXiv:2106.07620. [Google Scholar] - Zadra, F.; Seri, M.; Bravetti, A. Support Code for Geometric Numerical Integration of Liénard Systems via a Contact Hamiltonian Approach (v2.0). Zenodo. Available online: https://research.rug.nl/en/publications/support-code-for-geometric-numerical-integration-of-l%C3%ACenard-syste (accessed on 10 August 2021). [CrossRef]
- Perko, L. Differential Equations and Dynamical Systems; Springer: New York, NY, USA, 1991. [Google Scholar] [CrossRef]
- Arnol’d, V.I. Mathematical Methods of Classical Mechanics; Springer: New York, NY, USA, 2010. [Google Scholar]
- De León, M.; Lainz Valcázar, M. Contact Hamiltonian systems. J. Math. Phys.
**2019**, 60, 102902. [Google Scholar] [CrossRef] - Pihajoki, P. Explicit methods in extended phase space for inseparable Hamiltonian problems. Celest. Mech. Dyn. Astron.
**2014**, 121, 211–231. [Google Scholar] [CrossRef][Green Version] - Blair, D.E. Riemannian Geometry of Contact and Symplectic Manifolds; Birkhäuser: Boston, MA, USA, 2010. [Google Scholar] [CrossRef]
- Liu, Q.; (Guilin University of Electronic Technology, Guilin, China). Personal communication, 2020.
- Yoshida, H. Construction of higher order symplectic integrators. Phys. Lett. A
**1990**, 150, 262–268. [Google Scholar] [CrossRef] - Marsden, J.E.; West, M. Discrete mechanics and variational integrators. Acta Numer.
**2001**, 10, 357–514. [Google Scholar] [CrossRef][Green Version] - Hairer, E.; Wanner, G.; Lubich, C. Geometric Numerical Integration. Springer Ser. Comput. Math.
**2002**. [Google Scholar] [CrossRef] - Amore, P.; Boyd, J.P.; Fernández, F.M. High order analysis of the limit cycle of the van der Pol oscillator. J. Math. Phys.
**2018**, 59, 012702. [Google Scholar] [CrossRef][Green Version] - Andersen, C.M.; Geer, J.F. Power Series Expansions for the Frequency and Period of the Limit Cycle of the Van Der Pol Equation. SIAM J. Appl. Math.
**1982**, 42, 678–693. [Google Scholar] [CrossRef] - Parlitz, U.; Lauterborn, W. Period-doubling cascades and devil’s staircases of the driven van der Pol oscillator. Phys. Rev. A
**1987**, 36, 1428–1434. [Google Scholar] [CrossRef] - Hindmarsh, A. ODEPACK. A Collection of ODE System Solvers. In Scientific Computing; Stepleman, R.S., Ed.; North-Holland: Amsterdam, The Netherlands, 1983; pp. 55–64. [Google Scholar]
- Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nat. Methods
**2020**, 17, 261–272. [Google Scholar] [CrossRef] [PubMed][Green Version] - De León, M.; Lainz Valcázar, M. Singular Lagrangians and precontact Hamiltonian systems. Int. J. Geom. Methods Mod. Phys.
**2019**, 16, 1950158. [Google Scholar] [CrossRef]

**Figure 1.**Orbit of the van der Pol oscillator with $\u03f5=0$ (harmonic oscillator) with initial condition $({q}_{0},{p}_{0},{s}_{0})=(0,0,1)$ integrated for different values of the time step $\tau $. The dashed blue line shows the exact solution.

**Figure 2.**van der Pol oscillator with $\u03f5=0$ (harmonic oscillator). Dependence of the period of the numerical solution with respect to the time step. The inset plot is a close-up of the periods for $\tau \in [0.001,0.5]$.

**Figure 3.**Limit cycle of the van der Pol oscillator computed with the second-order contact integrator for values of $\u03f5=$ 0.1 (blue), 0.5 (orange), 1 (green), 2 (red), 4 (purple) and with different time steps.

**Figure 4.**Dependence of the period of the numerical solution of the van der Pol limit cycle with respect to the time step for $\u03f5\in \{0.1,0.5,0.9\}$ increasing from left to right.

**Figure 5.**Limit cycle of the van der Pol oscillator computed using the variational approach of Section 3.4 for values of $\u03f5=$ 0.1 (blue), 0.5 (orange), 1 (green), 2 (red), 4 (purple) and with different time steps.

**Figure 6.**Orbits for the stiff van der Pol oscillator obtained with the second-order contact integrator for different values of the coupling $\u03f5$ and of the time step $\tau $ after the Liénard transformation: With $\u03f5\in \{25,50,100\}$ increasing from top to bottom and $\tau \in \{{10}^{-2},5\times {10}^{-3},{10}^{-3},5\times {10}^{-4},{10}^{-4}\}$ decreasing from left to right.

**Figure 7.**Orbits for the stiff van der Pol oscillator obtained with the variational approach of Section 3.4 for different values of the coupling $\u03f5$ and of the time step $\tau $ after the Liénard transformation: With $\u03f5\in \{25,50,100\}$ increasing from top to bottom and $\tau \in \{{10}^{-2},5\times {10}^{-3},{10}^{-3},5\times {10}^{-4},{10}^{-4}\}$ decreasing from left to right.

**Figure 8.**Dependence of the period of the numerical solution for the harmonic oscillator ($\u03f5=0$) with respect to the time step. The numerically estimated period is compared with the period computed from the modified equations.

**Figure 9.**Comparison between the numerical and analytical results (using perturbation theory) for the period of the limit cycle. Each figure is an analogue of Figure 8 for the value of $\u03f5$ indicated in the top right corner.

**Figure 10.**Orbit of the forced van der Pol oscillator with $({x}_{0},{\dot{x}}_{0})=(2,2)$. The green dots correspond to the second order integrator and the orange dots to a sixth order approximate integrator (CBABC) with the coefficients taken from family A in Table 1. Left: Regular attractor. Right: Strange attractor. From top to bottom the time step is decreasing. The inset plots contain the corresponding trajectory computed with LSODA. It is plotted separately because, besides the first row, it is virtually indistinguishable from the one obtained with the sixth order integrator.

**Figure 11.**Numerical orbits of the forced van der Pol oscillator (75) with $A=\mu =5$, $\omega =2.463$ and $({x}_{0},{\dot{x}}_{0})=(2,2)$, with the reference contact integrators and LSODA.

**Figure 12.**Maximum absolute errors in x and $\dot{x}$ up to a given time for the reference contact integrators compared to the LSODA method along the orbit in Figure 11.

A | B | C | |
---|---|---|---|

${w}_{0}$ | $1.315186320683906$ | $2.37635274430774$ | $2.3894477832436816$ |

${w}_{1}$ | $-1.17767998417887$ | $-2.13228522200144$ | $0.00152886228424922$ |

${w}_{2}$ | $0.235573213359357$ | $0.00426068187079180$ | $-2.14403531630539$ |

${w}_{3}$ | $0.784513610477560$ | $1.43984816797678$ | $1.44778256239930$ |

**Table 2.**Execution time statistics for the integration of a van der Pol oscillator with initial conditions $({q}_{0},{p}_{0},{s}_{0})=(2,0,0)$, $\u03f5=3.5$ for $t\in [0,1000]$.

Integrator Type (Order) | Mean Running Time (ms) | Standard Deviation (over 10 Runs) | |
---|---|---|---|

$\tau =0.02$ | |||

Contact hamiltonian (2nd) | 729 | ±13.2 | |

Contact hamiltonian (6th) | 3940 | ±65.9 | |

Variational (2nd) | 8630 | ±149 | |

$\tau =0.2$ | |||

Contact hamiltonian (2nd) | 74 | ±1.6 | |

Contact hamiltonian (6th) | 404 | ±14.6 | |

Variational (2nd) | 972 | ±15.2 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 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/).

## Share and Cite

**MDPI and ACS Style**

Zadra, F.; Bravetti, A.; Seri, M.
Geometric Numerical Integration of Liénard Systems via a Contact Hamiltonian Approach. *Mathematics* **2021**, *9*, 1960.
https://doi.org/10.3390/math9161960

**AMA Style**

Zadra F, Bravetti A, Seri M.
Geometric Numerical Integration of Liénard Systems via a Contact Hamiltonian Approach. *Mathematics*. 2021; 9(16):1960.
https://doi.org/10.3390/math9161960

**Chicago/Turabian Style**

Zadra, Federico, Alessandro Bravetti, and Marcello Seri.
2021. "Geometric Numerical Integration of Liénard Systems via a Contact Hamiltonian Approach" *Mathematics* 9, no. 16: 1960.
https://doi.org/10.3390/math9161960