# From quasiperiodicity to chaos

Apart from fixed points, closed trajectories and strange attractors, there is a fourth major type of attractor, namely a torus (generalization of a circle) on which solutions may wrap densely. This phenomenon is called quasiperiodicity. We shall start with the simplest example of quasiperiodicity before studying the planar double pendulum which exhibits periodicity, quasiperiodicity and chaos.

A toy example: a pair of undamped harmonic oscillators

At the beginning of this ebook, we considered an undamped harmonic oscillator. We consider now a pair of undamped harmonic oscillators:

$$\begin{cases} \ddot{x}_1= -\omega_1^2 x_1\\ \ddot{x}_2= -\omega_2^2 x_2 \end{cases}$$

where $\omega_1,\omega_2$ are parameters (frequencies). Even if these oscillators are uncoupled, we are going to see that, nevertheless, this is an interesting system displaying a phenomenon that we have not met so far: quasiperiodicity.

As we’ve done for a single oscillator, we set

$$y_1=\dot{x}_1\quad\text{and}\quad y_2=\dot{x}_2$$

to transform the above two-dimensional second-order system into the four-dimensional, first-order, linear system

$$\dot{\boldsymbol{x}}=A \boldsymbol{x}$$

where $\boldsymbol{x}=(x_1,y_1,x_2,y_2)$ and

$$A= \begin{pmatrix} 0 & 1 & 0 & 0 \\ -\omega_1^2 & 0 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & -\omega_2^2 & 0 \end{pmatrix}.$$

These equations can be easily solved and we get (this is no surprise) periodic solutions that are linear combinations of sine and cosine functions. We have, for $j=1,2$,

$$\begin{cases} x_j(t)=x_j(0) \cos(\omega_j t)+y_j(0) \sin(\omega_j t)\\ y_j(t)=-x_j(0) \sin(\omega_j t)+y_j(0) \cos(\omega_j t). \end{cases}$$

One can check easily that this the solution of the system given $x_j(0),y_j(0)$, $j=1,2$. Thus, each pair $(x_j(t),y_j(t))$ for $j=1,2$ is a periodic function with period $2\pi/\omega_j$, but this does not mean that the full four-dimensional solution is a periodic function. Indeed, the full solution is periodic with period $\tau$ if and only if there exist integers $p$ and $q$ such that

$$\omega_1\tau=p\cdot 2\pi\quad\text{and}\quad \omega_2 \tau=q\cdot 2\pi.$$

Thus, for periodicity to occur, we must have

$$\tau=\frac{2\pi p}{\omega_1}=\frac{2\pi q}{\omega_2},$$

that is,

$$\frac{\omega_1}{\omega_2}=\frac{p}{q}.$$

Thus, the ratio of the two frequencies of the oscillators must be a rational number. What happens when this ration is not a rational number? To geometrically, and thus visually, understand what is going on, let’s pass to polar coordinates $(r_j,\theta_j)$ in place of the $x_j$ and $y_j$ variables. We have already done this kind of change several times. We obtain

$$\begin{cases} \dot{r}_1=0\\ \dot{\theta}_1=-\omega_1\\ \dot{r}_2=0\\ \dot{\theta}_2=-\omega_2. \end{cases}$$

The first and third equations tell us that both $r_1$ and $r_2$ remain constant along any solution. Moreover, no matter what we choose for our initial $r_1$ and $r_2$ values, the $\theta_j$ equations remain the same. Given $r_1(0)$ (that is, the radius $r_1$ at time $t=0$), the first oscillator can be represented as a point rotating at constant speed along a circle of radius $r_1(0)$. The same holds for the second oscillator with a circle of radius $r_2(0)$ and with a different angular speed. For a given pairs $(r_1(0),r_2(0)$, the whole system can be visualized as a single point tracing out a trajectory on a torus (the surface of a doughnut) with $\theta_1,\theta_2$ coordinates. The coordinates are analogous to latitude and longitude.

In other words, restricted to the torus determined by the initial radii $r_1(0)$ and $r_2(0)$, the equations of the system now

$$\begin{cases} \dot{\theta}_1=-\omega_1\\ \dot{\theta}_2=-\omega_2 \end{cases}.$$

Assume that $\omega_1/\omega_2$ is a rational number, i.e., there exist some integers $p,q$ with no common factors. It should be intuitively clear that all trajectories are closed on the tours, because the point complete $p$ revolutions in the $\theta_1$-direction in the same time that it completes $q$ revolutions in the same time. For example, when $p=3$, $q=2$, we get a trefoil knot. In general, if $p,q\geq 2$ have no common factors, the resulting curves are called $p:q$ torus knots.

Assume now that $\omega_1/\omega_2$ is an irrational number, e.g., $\sqrt{2}$. We observe that every trajectory winds around endlessly on the torus, intersecting itself and yet never quite closing. This is called a quasiperiodic motion. In fact, one can prove that each trajectory is dense on the torus: in other words, each trajectory comes arbitrarily close to any given point on the torus. (Warning: this is not the same as saying that it passes through each point, which is false.)

Quasiperiodicity is a new type of long-term behavior. Our example can be generalized to higher dimension (by taking more oscillators) and the different $\theta_j$ equations can be coupled. Quasiperiodicity (and chaos) appears in a natural system: the solar system. We are going to see a much simpler system, namely the planar double pendulum.

The double pendulum

The idealized planar pendulum was studied at the beginning of this ebook. The planar double pendulum consists of two coupled pendula, i.e., two point masses $m_1$ and $m_2$ attached to massless rigid rods of fixed lengths $L_1$ and $L_2$ moving in a constant gravitational field. We neglect all frictional effects.

For simplicity, only a planar motion of the double pendulum is considered: the two masses swing in a fixed common vertical plane. As we shall see, despite its apparent simplicity, this model has already a very rich and complicated behavior. The single pendulum was described by a two-dimensional system evolving in the phase plane defined by $x=\theta$ (the angle between the rod and the downward vertical) and $y=\dot{\theta}$ (the angular velocity of the bob). Introducing the four variables

$$x_1=\theta_1,\; y_1=\dot{\theta}_1,\; x_2=\theta_2,\; y_2=\dot{\theta}_2,$$

one can show that the dynamics of the double pendulum can be represented by these four variables which satisfy the equations

$$\begin{cases} \dot{x}_1=y_1\\ \dot{y}_1= \frac{-g(2m_1+m_2)\sin(x_1)-m_2 g\sin(x_1-2x_2)-2m_2\sin(x_1-x_2)[L_2 y_2^2 + L_1y_1^2\cos(x_1-x_2)]} {L_1[2m_1+m_2-m_2\cos(2x_1-2x_2)]}\\ \dot{x}_2=y_2\\ \dot{y}_2= \frac{2\sin(x_1-x_2)[L_1 (m_1+m_2) y_1^2+g(m_1+m_2) \cos(x_1)+L_2 m_2 y_2^2\cos(x_1-x_2)]} {L_2[2m_1+m_2-m_2\cos(2x_1-2x_2)]}\, . \end{cases}$$

It is not easy to visualize a four-dimensional phase space, that is why we look at two projections: one in the $x_1x_2$-plane, the other one in the $y_1y_2$-plane in the interactive digital experiment.

In the digital experiment below, you can observe sensitive dependence on initial conditions, the main feature of deterministic chaos: when you launch the pendulum, another one is launched with slightly different initial angles.