LDDS

Tutorial 3: Variable time integration

In this tutorial we will now set up the computation of LDs for a system that blows up in finite time, that is, trajectories when simulated will escape to infinity so fast that the numerically cannot be resolved after some finite simulation time.

The solution to this problem by LDDS is to use Variable Time integration , which given a bounding box of the domain, will turn the vector field off (equal to zero), only for those trajectories escpaing beyond the box_boundaries. This is equivalent to stopping integration only for escaping trajectories, such that LD values stop being updated for them.

To illustrate how to set up LDDS for LD calculations to deal with such situations, we study two systems: the Hamilton-Saddle Node and the Inverse Duffing oscillator. Both 1DoF autonomous Hamiltonian system, for which trajectories can escape to infinity within the finite time-interval of simulation.

Hamilton Saddle-Node

Energy

\begin{equation*} H(x, p_x) = \frac{1}{2} p_x^2 + \frac{1}{2}x^2 + \frac{1}{3} x^3 \end{equation*}

Vector field

\begin{align*} \dot{x} &= \frac{\partial H}{\partial p_x} = f_1(x, p_x) = p_x \\ \dot{p}_x &= -\frac{\partial H}{\partial x} = f_2(x, p_x) = - x - x^2 \end{align*}

The setup is initialised as before

BUT now, we need a new variable called box_boundaries, defined as below

which then, it's passed to compute_lagrangian_descriptor as an additional argument, to compute the forward and backward LDs for visualisation, as usual.

NOTE As an exercise, one can see that if box_boundaries are equal to False, which is set by default, the execution of compute_lagrangian_descriptor will throw an error message

ValueError: need at least one array to concatenate

This is the result of the integrator breaking after failing to numerically integrate vector_field, resulting in an empty solution array.

Inverted Duffing oscillator

Energy

\begin{equation*} H(x, p_x) = \frac{1}{2} p_x^2 + \frac{1}{2} x^2 - \frac{1}{4} x^4 \end{equation*}

Vector field

\begin{align*} \dot{x} &= \frac{\partial H}{\partial p_x} = f_1(x, p_x) = p_x \\ \dot{p}_x &= -\frac{\partial H}{\partial x} = f_2(x, p_x) = -x + x^3 \end{align*}