Examples

Some examples used in the tutorial and considered as benchmark systems in dynamical systems. At the end of each systems’s equations, there are links to Ipython notebook with implementation and visualization details.

Discrete systems

  1. Standard map

The standard map (kicked rotator) is a two-dimensional map used in dynamical systems to study a periodically kicked pendulum. Its equations of motion are given by the expressions:

\[\begin{align} x_{n+1} = x_{n} + y_{n} - \dfrac{K}{2\pi} \sin(2\pi x_{n)), y_{n+1} = y_{n} - \dfrac{K}{2\pi} \sin(2\pi x_{n)), \end{align}\]

where \(K\) is the parameter that controls the forcing strength of the perturbation.

The inverse map is described by:

\[\begin{align} x_{n} = x_{n+1} - y_{n+1}, y_{n} = y_{n+1} + \dfrac{K}{2\pi} \sin(2\pi (x_{n+1} - y_{n+1})). \end{align}\]
  1. Hénon map

The Hénon map was introduced by Michel Hénon as a simplified model of the Poincaré section of the Lorenz model. The map equations are as follows:

\[\begin{align} x_{n+1} = a - x_{n}^2 + b y_{n}, y_{n+1} = x_{n}, \end{align}\]

where \(a,b\) are the model parameters.

The inverse Hénon map is:

\[\begin{align} x_{n} = y_{n+1}, y_{n} = \dfrac{x_{n+1} - a + y_{n+1}^2}{b}. \end{align}\]

Ipython notebook for standard map and Hénon map

Continuous systems

One degree of freedom

  1. Hamiltonian center

The Hamiltonian function:

\[H(x,p_x) = \dfrac{\omega}{2} \left( p_x^2 + x^2 \right), \label{eqn:ham_center1dof}\]

defines the normal form of a 1 DoF system with a center equilibrium at the origin. The associated equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = \omega p_x, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = -\omega x. \end{align}\end{split}\]
  1. Hamiltonian saddle

The Hamiltonian function:

\[H(x,p_x) = \dfrac{\lambda}{2} \left( p_x^2 - x^2 \right), \label{eqn:ham_saddle1dof}\]

defines the normal form of a 1 DoF system with a saddle equilibrium at the origin. The associated equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = \lambda p_x, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = \lambda x. \end{align}\end{split}\]
  1. Duffing oscillator

  1. Unforced

The Hamiltonian function:

\[H(x,p_x,t) = \dfrac{1}{2}p_x^2 - \dfrac{\alpha}{2}x^2 + \dfrac{\beta}{4}x^4, \label{eqn:ham_duff}\]

with \(\alpha,\beta>0\) describes the Duffing oscillator with the associated equations of motion

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = \alpha x - \beta x^3. \end{align}\end{split}\]

b. Forced Time dependent Hamiltonian function

\[H(x,p_x,t) = \dfrac{1}{2}p_x^2 - \dfrac{\alpha}{2}x^2 + \dfrac{\beta}{4}x^4 - f(t) x, \label{eqn:ham_duff_forced}\]

defines the Duffing oscillator with time dependent forcing \(f(t)\). This package offers two predefined options for the external forcing, namely \(f(t) = A\mathrm{sech}(t)\sin(\omega t)\) and \(f(t) = A\sin(\omega t)\). Other versions can be added manually by the user in the forcing function of the vector_fields.py file.

The corresponding equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = \alpha x - \beta x^3 + f(t). \end{align}\end{split}\]
  1. Inverted

The inverted Duffing oscillator can be obtained from Hamiltonian ~eqref{eqn:eqn:ham_duff}, by setting the parameters \(\alpha = \beta = - 1\).

  1. Saddle-node Hamiltonian

This system is defined by the Hamiltonian:

\[H(x,p_x) = \dfrac{1}{2}p_x^2 + \dfrac{1}{2}x^2 + \dfrac{1}{3}x^3, \label{eqn:ham_saddnode}\]

and its associated equations of motion are:

\[\begin{split}\begin{align} \dot{x} = \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{p}_x = -\dfrac{\partial H}{\partial x} = -x - x^2. \end{align}\end{split}\]

Ipython notebook on saddle-node Hamiltonian and inverted Duffing oscillator

  1. Non-autonomous double-gyre flow

The double-gyre flow is a classical system popular in geophysical fluid dynamics. This non-autonomous two-dimensional dynamical system is defined by the equations:

\[\begin{split}\begin{align} \dot{x} &= -\pi A \sin\left(\dfrac{\pi f(x,t)}{s}\right) \cos\left(\dfrac{\pi y}{s}\right) - \mu x, \\[.2cm] \dot{y} &= \pi A \cos\left(\dfrac{\pi f(x,t)}{s}\right) \sin\left(\dfrac{\pi y}{s}\right) \dfrac{\partial f}{\partial x}\left(x,t\right) - \mu y, \end{align}\end{split}\]

where we have that \(f(x,t) = \varepsilon \sin(\omega t + \phi) x^2 + \left(1-2\varepsilon \sin(\omega t + \phi)\right) x\).

Ipython notebook on Hamiltonian center, saddle, and double gyre

Two degrees of freedom

  1. Saddle-center

The Hamiltonian function:

\[H(x,y,p_x,p_y) = \dfrac{1}{2} \left( p_x^2 + p_y^2 + y^2 - x^2) \right), \label{eqn:ham_saddle2dof}\]

is the normal form of a 2 DoF system with a saddle-center equilibrium point at the origin. The dynamics of any 2 DoF dynamical system near a potential index-1 saddle point is conjugate to this system. The associated equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{y} &= \dfrac{\partial H}{\partial p_y} = p_y, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = x, \\ \dot{p}_y &= -\dfrac{\partial H}{\partial y} = - y. \end{align}\end{split}\]
  1. Hénon-Heiles

The Hamiltonian for the Hénon-Heiles system is given:

\[H(x,y,p_x,p_y) = \dfrac{1}{2} \left( p_x^2 + p_y^2 \right) + \dfrac{1}{2} \left( x^2 + y^2 \right) + yx^2 - \dfrac{1}{3} y^3, \label{eqn:ham_hh}\]

and Hamilton’s equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{y} &= \dfrac{\partial H}{\partial p_y} = p_y, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = - x - 2xy, \\ \dot{p}_y &= -\dfrac{\partial H}{\partial y} = - x^2 - y + y^2. \end{align}\end{split}\]

This system is a fundamental system for studying complex dynamics. Depending on the value of total energy, it can exhibit different dynamical behaviour ranging from near-integrable to completely chaotic.

Three degrees of freedom

  1. Saddle-center-center

The Hamiltonian function:

\[H(x,y,z,p_x,p_y,p_z) = \dfrac{1}{2} \left( p_x^2 + p_y^2+ p_z^2 - x^2 + y^2 + z^2) \right), \label{eqn:ham_saddle3dof}\]

is the normal form of a 3 DoF system with a saddle-center-center equilibrium point at the origin (also referred to as an index-1 saddle). The associated equations of motion are:

\[\begin{split}\begin{align} \dot{x} &= \dfrac{\partial H}{\partial p_x} = p_x, \\ \dot{y} &= \dfrac{\partial H}{\partial p_y} = p_y, \\ \dot{z} &= \dfrac{\partial H}{\partial p_z} = p_z, \\ \dot{p}_x &= -\dfrac{\partial H}{\partial x} = x, \\ \dot{p}_y &= -\dfrac{\partial H}{\partial y}= - y, \\ \dot{p}_z &= -\dfrac{\partial H}{\partial z}= - z. \end{align}\end{split}\]

Ipython notebook on Hénon-Heiles Hamiltonian, two and three degrees of freedom quadratic normal form with index-1 saddle