Why does this recurrence relation generate a sinusoidal curve? 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:

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

Is there a general solution to this recurrence relation?
 A: 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)$.
A: The key is that one possible definition for the trig functions is that they are particular solutions to the differential equation:
$$f''=-f$$
If you fix the initial values $f(0)=0$, $f'(0)=1$, you get $\sin$ as the only solution, and if you fix $f(0)=1$, $f'(0)=0$, you get $\cos$ as the only solution.
The recurrence relation is just a discrete approximation for this differential equation - see Euler's method. Basically, $(a_n)$ approximates $f$, and $(b_n)$ approximates $f'$ (actually, strictly speaking with the signs they've chosen it might be that $b_n$ approximates $-f'$, but same difference).
A: HINT:
$$a_{n+1} = a_n - 0.069\cdot b_n\  \ \  \ (1)$$
$$b_{n+1} = b_n + 0.069\cdot a_{n+1}= b_n + 0.069(a_n - 0.069\cdot b_n)=0.069a_n+(1-0.069^2)b_n$$
$$\implies 0.069a_n=b_{n+1}-(1-0.069^2)b_n\  \ \  \ (2)$$
$$\implies 0.069a_{n+1}=b_{n+2}-(1-0.069^2)b_{n+1}\  \ \  \ (3)$$
Put the values of $a_n,a_{n+1}$ in $(1)$ and use this
A: Say you have a linear recurrence $a_{n + 2} = c_1 a_{n + 1} + c_0 a_n$. The relevant theory tells you that the zeros of the characteristic equation $z^2 - c_1 z - c_0 = 0$ define the solution. Say the zeros are $r, \overline{r}$ (complex conjugates), then the solution is of the form
$$a_n = \alpha \cdot r^n + \overline{\alpha} \cdot \overline{r}^n$$
Using the polar representation of $\alpha$ and $r$, and remembering that your solution is the real part ($\arg r$ is the argument, i.e., the angle):
$$a_n = 2 \lvert \alpha \rvert \Re r^n
      = 2 \lvert \alpha \rvert \cdot \lvert r \rvert^n \cdot \cos(n \arg r)$$
If it so happens that $\lvert r \rvert = 1$, you get purely periodic solutions.
