General formula for recurrence relation

contest-mathrecurrence-relations

While studying contest math training notes, I came across this question and wonder what are the techniques for writing closed-form formulas for recurrence relations, and the circumstances in which this is possible.

Suppose $a_0=0$, $b_0=1$ and that $a_n=a_{n-1}+2b_{n-1}$, $b_n=4b_{n-1}-a_{n-1}$. Find formulas for $a_n$ and $b_n$.

I managed to untangle $a$ and $b$ and came to $a_n=3a_{n-1}+2^n$ and $b_n=3b_{n-1}+2^{n-1}$ but have no idea how to come up with a formula.

Best Answer

Starting from $a_n=3a_{n-1}+2^n$, divide both sides by $2^n$ to get $$\frac{a_n}{2^n}=\frac32\cdot\frac{a_{n-1}}{2^{n-1}}+1.$$ If we denote $\dfrac{a_n}{2^n}=c_n$, then $c_n=\dfrac32c_{n-1}+1$. Transform it into $$c_n+2=\frac32\left(c_{n-1}+2\right).$$ Notice that $c_0+2=\dfrac01+2=2$, so $c_n+2=2\cdot\left(\dfrac32\right)^n=\dfrac{3^n}{2^{n-1}}$. Plug back to get $$a_n=2^n\left(\dfrac{3^n}{2^{n-1}}-2\right)=2\cdot3^n-2^{n+1}.$$ To check the answer, I used the same method to get

$$b_n=2\cdot3^n-2^n.$$