view source

...and Chaos

💡 Previously on...

Last week we saw how to translate a model defined in discrete time to one in continuous time, we considered the SIS model to show a simple stability analysis (and its formal equivalence to a one-species competitive Lotka-Volterra model), and we concluded by implementing code to both integrate a system of ODEs and to actually simulate the stochastic process our model wants to describe.

This week we look at examples of models with more than one effective dimension (recall that the closed-population SIS model is effectively one-dimensional) and learn to analyze them through the method of nullclines. Adding one or more dimensions, we will unlock more interesting behaviors other than attraction to or repulsion from fixed points. Things become rapidly cumbersome though, and since this is not a calculus or algebra course, we will mainly observe those behaviors by integrating our ODEs numerically. In doing so, we will even get a taste of chaos!

In the next clip, LHD provides a detailed analysis of a two-species competitive Lotka-Volterra model, showing how to anticipate the behavior of the system by finding the nullclines.

Next, LHD adds another species and considers a generalized three-species Lotka-Volterra model, where inter-species interaction can be either positive or negative, and not even symmetric. He shows how exploring the parameter space various bifurcations happen: from fixed points to periodic orbits to...chaos!

Why did we not find chaos in previous models? The reason is dimension. Previous models were one or two-dimensional and chaos is excluded in such a constraint space. In the previous clip, LHD mentioned the strange attractor on which chaotic trajectories live – an attractor where trajectories are quasi-periodic, passing through points which are infinitely close to each other but never the same (if they were, the orbit would be periodic). Requiring such a quasi-recurrency leads, in 2D, to a contradiction. Indeed, starting at a point A and tracing a trajectory that loops back arbitrarily close to A, the phase space you can explore next is either one of two disconnected regions: inside or outside the loop. In both cases, the orbit can never approach A so close as it did the first time without crossing the previous quasi-loop (which can't, otherwise the system would not be deterministic!), but it will diverge from it, either spiraling in to a fixed point or out to a limit cycle, thus violating quasi-periodicity. Try to prove it with a draw – it's fun!

In 3D, a trajectory has an infinite number of possible ways to pass closeby a point, not just on the left or right of it as in 2D. This is why chaos in continuous models can be found for phase spaces of three or more dimensions. Notice that this is not the case for discrete systems: there is no problem of crossing there, for a trajectory is a sequence of jumps. The logistic map is perhaps the most famous example of 1D system able to show chaotic behavior. Starting with and taking , it maps the interval to itself. There are infinite many points in such interval, so that the system can keep jumping to a new one for the eternity – as it does when is high enough.

Next video wraps up our Module 1: Dynamics.

Next week we start looking at spatially-structured systems!

Things to do by Thursday at noon


Bonus content

Maximal Lyapunov exponent

One of the characteristic features of a chaotic system is its sensitivity to initial conditions. If in a chaotic regime (notice that the phase space of a system can both have chaotic and regular regions), no matter how close two initial conditions are, their following trajectories will diverge from each other. A way to quantify how fast such divergence happens is computing the set of Lyapunov exponents. For a system leaving in an -dimensional phase space, you get exponents, one for each direction you can shift from a point. Nonetheless, to know whether two trajectories are going to diverge or not, it is enough to know the value of the maximal Lyapunov exponent (MLE): if this is positive, there exists at least one direction along which the trajectories will depart from each other.

The MLE is defined as follows. Consider a continuous map , and two close initial () points and , with arbitrarily small but nonzero. (Notice that in general is a vector of dimension ; and remember is a necessary condition for chaos in continuous systems.) After a time , is mapped to , and to . Suppose now to relate the difference between the two trajectories at time , , with the initial difference at time , , through

The parameter is the MLE: if positive, the two trajectories depart (exponentially fast); if negative, they converge (exponentially fast). Equation (1) assumes a steady behavior for the difference . However, due to the nonlinearity of the dynamics, that difference will sometime shrink and sometimes grow. What Lyapunov exponents measure is the average behavior over large time scales. We thus want to take two limits: – arbitrarily close initial points – and – long-time behavior. Inverting Equation (1), we thus have

In the case of a discrete map , taking integer values, we can easily make Equation (2) a bit more explicit. Remember that chaos is possible even in one dimension for discrete systems, so for simplicity let us assume to be just a scalar. Observe that is given by applying times the map to :

where , and we defined the function as being the composition of functions . Repeating the same for , we can write . Expanding the latter according to its Taylor series around the point and repeatedly using the relation , we get

An analogous equation to Equation (1) thus leads to

From Equation (5) we can see that the MLE is a temporal average.

If looking at your system you are not sure whether the cycles you see are actually periodic or not, compute the MLE, and if it's positive then there is no real periodicity, but quasi-periodicity – chaos. However, remember that a positive MLE is not sufficient to guarantee chaos! There are no sufficient conditions for chaos, only necessary ones (although there is currently no universally accepted list of such conditions). Together with sensitivity to initial conditions, chaotic behavior also requires that the trajectories evolve within a bounded region of the phase space (or all of it, if it is bounded). Each of these trajectories, being aperiodic, then explores almost all the points in the region, implying the so-called topological mixing: for any two open sets of points you can choose in the region, one set will evolve to intersect the other set. As an exercise, compute the MLE of the discrete maps or . You should find positive MLEs (at least for certain initial conditions), but the trajectories are not chaotic, they just keep increasing in a fully predictable way.