[Math] Why does this recurrence relation generate a sinusoidal curve

recurrence-relationstrigonometry

I came across the following coupled recurrence relation while watching this
video
called Media for Thinking the Unthinkable:

$a_{n+1} = a_n – 0.069\cdot b_n$

$b_{n+1} = b_n + 0.069\cdot a_{n+1}$

This (with an initial condition $a_0 = 1$, $b_0 = 10$) seems to generate a sinusoidal curve:

Plot of a(n) and b(n)

A plot of $b_n$ vs. $a_n$ looks like a circle with an approximate radius of 10
units:

Plot of b(n) vs. a(n)

Is there a general solution to this recurrence relation?

Best Answer

I will approach this from a more general perspective. Your specific question will be answered at the end of this post. Let $\lambda \in \mathbb{R}$ be a real parameter. The choice $\lambda = 0.069$ will correspond to your sequence. The general recurrence can be written as

$$ \begin{pmatrix} a_{n+1} \\ b_{n+1} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ \lambda & 1 \end{pmatrix} \begin{pmatrix} a_{n+1} \\ b_n \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ \lambda & 1 \end{pmatrix} \begin{pmatrix} 1 & -\lambda \\ 0 & 1 \end{pmatrix}\begin{pmatrix} a_n \\ b_n \end{pmatrix} = \begin{pmatrix} 1 & -\lambda \\ \lambda & 1-\lambda^2 \end{pmatrix} \begin{pmatrix} a_n \\ b_n \end{pmatrix}. $$

Define the $2\times 2$ matrix $$M_{\lambda} = \begin{pmatrix} 1 & -\lambda \\ \lambda & 1-\lambda^2 \end{pmatrix}.$$ Then starting from a given point $(a_0, b_0)$ we find $$\begin{pmatrix} a_n \\ b_n \end{pmatrix} = M_{\lambda}^n \begin{pmatrix} a_0 \\ b_0 \end{pmatrix}.$$ Consider the quadratic polynomial $P_\lambda(x, y) = x^2+y^2 - \lambda\, x y$. A straightforward computation shows that this polynomial is invariant under the substitution $$\begin{pmatrix} x \\ y \end{pmatrix} \leftarrow M_{\lambda} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x - \lambda\,y \\ \lambda\,x+(1-\lambda^2)\,y \end{pmatrix}. $$ This means that for all $n \in \mathbb{N}$ we have the equality $P_{\lambda}(a_n,b_n) = P_{\lambda}(a_0, b_0)$. In other words, all points $(a_n,b_n)$ lie on the same level set of $P_{\lambda}$. For $\lambda=0.069$ and starting point $(a_0, b_0) = (1, 10)$ this means that for all $n \in \mathbb{N}$ $$a_n^2+b_n^2 - 0.069 a_n b_n = 100.31.$$

In this case $P_{0.069}(x,y)=100.31$ defines an ellipse. For $\lambda=0$ a non-zero level set of $P_{\lambda}$ is a circle (though the sequence is stationary in this case so not very exciting). For $|\lambda|<2$ a level set is an ellipse, for $\lambda = \pm 2$ it is a pair of parallel lines and for $|\lambda|>2$ it is a hyperbola.

The recurrence relation has a nice solution in closed form. Take $\lambda \in (-2,2)$ so that the points follow an elliptical orbit. Let the parameter $s$ be such that $\sin(s) = \lambda/2$. Define

$$ \begin{eqnarray} a_n &=& \cos(2 s \,n) \\ b_n &=& \sin(2 s \,n + s). \end{eqnarray} $$

One can verify that $a_n, b_n$ satisfy the recurrence relation for the parameter $\lambda$. Any solution of the recurrence with any starting point can be obtained from this fundamental solution by a change of phase and amplitude. See here for an approximation for $\lambda=0.069$ and $(a_0,b_0) = (1,10)$.