# Finding the nth term in a recursive coupled equation.

I'm probably missing something simple, but if I have the recursive sequence: $$a_{i+1} = \delta a_i+\lambda_1 b_i$$ $$b_{i+1} = \lambda_2 a_i + \delta b_i$$

how would I find a formula for $a_n$, $b_n$, or even $\frac{a_n}{b_n}$, given, for example, $a_0 = 1$, $b_0=0$?

I've tried expanding it out and looking for patterns but to no avail - I'm sure there must be an analytic solution to this, I really would rather not do it computationally!

Let $X_i:=[a_i,b_i]^T$ then $$X_{i+1}=AX_i$$ where $$A:=\begin{bmatrix}\delta&\lambda_1\\\lambda_2&\delta\end{bmatrix}$$
Then it is clear that $$X_i=A^{i}X_0$$
To get a nice formula for $A^i$ first write it as $P^{-1}JP$, where $J$ is its Jordan form. Notice that if $\lambda_1\lambda_2\neq0$ $J$ is going to be diagonal (even better).
In any case, the worst that can happen is that $J=D+N$ where $D$ is diagonal and $N^2=0$. The, $$A^i=P^{-1}J^iP=P^{-1}(D^i+iD^{i-1}N)P$$ where the powers $D^i$ and $D^{i-1}$ are easy to write because it is just rising the diagonal elements to $i$.