Unrolling works when each term depends on one earlier term. Recurrences like $a_{n} = a_{n-1} + a_{n-2}$ reach back two steps, and unrolling gets messy. Instead we guess the shape of the answer, and the guess reduces to a quadratic equation, solved with the quadratic formula or by factoring. It is the systematic follow-up to unrolling.
Key idea
Why it works
Worked examples
Worked example: Two whole-number roots
- Characteristic equation: $r^{2} = 5r - 6$, so $r^{2} - 5r + 6 = 0 = (r - 2)(r - 3)$: roots $2$ and $3$.
- $a_{n} = A \cdot 2^{n} + B \cdot 3^{n}$. From $n = 0$: $A + B = 1$. From $n = 1$: $2A + 3B = 4$.
- Subtract twice the first equation from the second: $B = 2$, so $A = -1$.
- $a_{n} = 2 \cdot 3^{n} - 2^{n}$. Check $a_{2}$: the formula gives $18 - 4 = 14$; the recurrence gives $5 \cdot 4 - 6 \cdot 1 = 14$.
Answer: $a_{n} = 2 \cdot 3^{n} - 2^{n}$
Worked example: A negative root
- $r^{2} = r + 2$, so $r^{2} - r - 2 = (r - 2)(r + 1) = 0$: roots $2$ and $-1$.
- $A + B = 2$ and $2A - B = 1$. Adding: $3A = 3$, so $A = 1$ and $B = 1$.
- $a_{n} = 2^{n} + (-1)^{n}$: $2, 1, 5, 7, 17, \ldots$, which matches the recurrence.
Answer: $a_{n} = 2^{n} + (-1)^{n}$
Worked example: The Fibonacci numbers
- $r^{2} = r + 1$ has roots $\varphi = \frac{1 + \sqrt{5}}{2}$ and $\psi = \frac{1 - \sqrt{5}}{2}$.
- Fitting $A + B = 0$ and $A\varphi + B\psi = 1$ gives $A = \frac{1}{\sqrt{5}}$, $B = -\frac{1}{\sqrt{5}}$.
- So $F_{n} = \dfrac{\varphi^{n} - \psi^{n}}{\sqrt{5}}$ (Binet's formula). Since $|\psi| < 1$, $F_{n}$ is the whole number nearest $\varphi^{n}/\sqrt{5}$.
Answer: $F_{n} = \dfrac{\varphi^{n} - \psi^{n}}{\sqrt{5}}$
Common mistake