The Characteristic Root Technique
Suppose we want to solve a recurrence relation expressed as a combination of the two previous terms, such as \(a_n = a_{n-1} + 6a_{n-2}\text{.}\) In other words, we want to find a function of \(n\) which satisfies \(a_n - a_{n-1} - 6a_{n-2} = 0\text{.}\) Now iteration is too complicated, but think just for a second what would happen if we did iterate. In each step, we would, among other things, multiply a previous iteration by 6. So our closed formula would include \(6\) multiplied some number of times. Thus it is reasonable to guess the solution will contain parts that look geometric. Perhaps the solution will take the form \(r^n\) for some constant \(r\text{.}\)
The nice thing is, we know how to check whether a formula is actually a solution to a recurrence relation: plug it in. What happens if we plug in \(r^n\) into the recursion above? We get
\begin{equation*} r^n - r^{n-1} - 6r^{n-2} = 0. \end{equation*}
Now solve for \(r\text{:}\)
\begin{equation*} r^{n-2}(r^2 - r - 6) = 0, \end{equation*}
so by factoring, \(r = -2\) or \(r = 3\) (or \(r = 0\text{,}\) although this does not help us). This tells us that \(a_n = (-2)^n\) is a solution to the recurrence relation, as is \(a_n = 3^n\text{.}\) Which one is correct? They both are, unless we specify initial conditions. Notice we could also have \(a_n = (-2)^n + 3^n\text{.}\) Or \(a_n = 7(-2)^n + 4\cdot 3^n\text{.}\) In fact, for any \(a\) and \(b\text{,}\) \(a_n = a(-2)^n + b 3^n\) is a solution (try plugging this into the recurrence relation). To find the values of \(a\) and \(b\text{,}\) use the initial conditions.
This points us in the direction of a more general technique for solving recurrence relations. Notice we will always be able to factor out the \(r^{n-2}\) as we did above. So we really only care about the other part. We call this other part the characteristic equation for the recurrence relation. We are interested in finding the roots of the characteristic equation, which are called (surprise) the characteristic roots.
Characteristic Roots
Given a recurrence relation \(a_n + \alpha a_{n-1} + \beta a_{n-2} = 0\text{,}\) the characteristic polynomial is
\begin{equation*} x^2 + \alpha x + \beta \end{equation*}
giving the characteristic equation:
\begin{equation*} x^2 + \alpha x + \beta = 0. \end{equation*}
If \(r_1\) and \(r_2\) are two distinct roots of the characteristic polynomial (i.e, solutions to the characteristic equation), then the solution to the recurrence relation is
\begin{equation*} a_n = ar_1^n + br_2^n, \end{equation*}
where \(a\) and \(b\) are constants determined by the initial conditions.
Example \(\PageIndex{6}\)
Solve the recurrence relation \(a_n = 7a_{n-1} - 10 a_{n-2}\) with \(a_0 = 2\) and \(a_1 = 3\text{.}\)
- Solution
-
Rewrite the recurrence relation \(a_n - 7a_{n-1} + 10a_{n-2} = 0\text{.}\) Now form the characteristic equation:
\begin{equation*} x^2 - 7x + 10 = 0 \end{equation*}
and solve for \(x\text{:}\)
\begin{equation*} (x - 2) (x - 5) = 0 \end{equation*}
so \(x = 2\) and \(x = 5\) are the characteristic roots. We therefore know that the solution to the recurrence relation will have the form
\begin{equation*} a_n = a 2^n + b 5^n. \end{equation*}
To find \(a\) and \(b\text{,}\) plug in \(n =0\) and \(n = 1\) to get a system of two equations with two unknowns:
\begin{align*} 2 \amp = a 2^0 + b 5^0 = a + b\\ 3 \amp = a 2^1 + b 5^1 = 2a + 5b \end{align*}
Solving this system gives \(a = \frac{7}{3}\) and \(b = -\frac{1}{3}\) so the solution to the recurrence relation is
\begin{equation*} a_n = \frac{7}{3}2^n - \frac{1}{3} 5^n. \end{equation*}
Perhaps the most famous recurrence relation is \(F_n = F_{n-1} + F_{n-2}\text{,}\) which together with the initial conditions \(F_0 = 0\) and \(F_1= 1\) defines the Fibonacci sequence. But notice that this is precisely the type of recurrence relation on which we can use the characteristic root technique. When you do, the only thing that changes is that the characteristic equation does not factor, so you need to use the quadratic formula to find the characteristic roots. In fact, doing so gives the third most famous irrational number, \(\varphi\text{,}\) the golden ratio.
Before leaving the characteristic root technique, we should think about what might happen when you solve the characteristic equation. We have an example above in which the characteristic polynomial has two distinct roots. These roots can be integers, or perhaps irrational numbers (requiring the quadratic formula to find them). In these cases, we know what the solution to the recurrence relation looks like.
However, it is possible for the characteristic polynomial to only have one root. This can happen if the characteristic polynomial factors as \((x - r)^2\text{.}\) It is still the case that \(r^n\) would be a solution to the recurrence relation, but we won't be able to find solutions for all initial conditions using the general form \(a_n = ar_1^n + br_2^n\text{,}\) since we can't distinguish between \(r_1^n\) and \(r_2^n\text{.}\) We are in luck though:
Characteristic Root Technique for Repeated Roots
Suppose the recurrence relation \(a_n = \alpha a_{n-1} + \beta a_{n-2}\) has a characteristic polynomial with only one root \(r\text{.}\) Then the solution to the recurrence relation is
\begin{equation*} a_n = ar^n + bnr^n \end{equation*}
where \(a\) and \(b\) are constants determined by the initial conditions.
Notice the extra \(n\) in \(bnr^n\text{.}\) This allows us to solve for the constants \(a\) and \(b\) from the initial conditions.
Example \(\PageIndex{7}\)
Solve the recurrence relation \(a_n = 6a_{n-1} - 9a_{n-2}\) with initial conditions \(a_0 = 1\) and \(a_1 = 4\text{.}\)
- Answer
-
The characteristic polynomial is \(x^2 - 6x + 9\text{.}\) We solve the characteristic equation
\begin{equation*} x^2 - 6x + 9 = 0 \end{equation*}
by factoring:
\begin{equation*} (x - 3)^2 = 0 \end{equation*}
so \(x =3\) is the only characteristic root. Therefore we know that the solution to the recurrence relation has the form
\begin{equation*} a_n = a 3^n + bn3^n \end{equation*}
for some constants \(a\) and \(b\text{.}\) Now use the initial conditions:
\begin{align*} a_0 = 1 \amp = a 3^0 + b\cdot 0 \cdot 3^0 = a\\ a_1 = 4 \amp = a\cdot 3 + b\cdot 1 \cdot3 = 3a + 3b. \end{align*}
Since \(a = 1\text{,}\) we find that \(b = \frac{1}{3}\text{.}\) Therefore the solution to the recurrence relation is
\begin{equation*} a_n = 3^n + \frac{1}{3}n3^n. \end{equation*}
Although we will not consider examples more complicated than these, this characteristic root technique can be applied to much more complicated recurrence relations. For example, \(a_n = 2a_{n-1} + a_{n-2} - 3a_{n-3}\) has characteristic polynomial \(x^3 - 2 x^2 - x + 3\text{.}\) Assuming you see how to factor such a degree 3 (or more) polynomial you can easily find the characteristic roots and as such solve the recurrence relation (the solution would look like \(a_n = ar_1^n + br_2^n + cr_3^n\) if there were 3 distinct roots). It is also possible to solve recurrence relations of the form \(a_n = \alpha a_{n-1} + \beta a_{n-2} + C\) for some constant \(C\text{.}\) It is also possible (and acceptable) for the characteristic roots to be complex numbers.