Homework | Find the general solution to the recurrence relation A question I have been stuck on for quite a while is the following
Find the general solution to the recurrence  relation
$$a_n = ba_{n-1} - b^2a_{n-2}$$
Where $b \gt 0$ is a constant.
I don't understand how the general solution can be found with $b$ and $b^2$ in the relation.
Any help or advice would be greatly appreciated.
EDIT
Using $a_n = t^n$ I found the quadratic equation $t^2 - bt + b^2$
Which then comes to:
$$\frac{b \pm \sqrt{-4b^2 + b}}{2}$$
Therefore I have complex roots as $-4b^2 + b$ will be a negative number.
How do I continue from this point?
EDIT
Using $a_n = b^nc_n$ I came to $c_n = c_{n-1} - c_{n-2}$. Substituting $t^n$ for $c_n$ I get the quadratic $t^2 - t + t$. Which solves to:
$$
\frac{1 \pm i\sqrt{3}}{2}
$$
$\Rightarrow D = \frac{1}{2}\sqrt{1 + 2\sqrt{3}}$ and $tan\theta = \frac{1}{\sqrt{3}}$
$\Rightarrow a_n = \left(\frac{\sqrt{1 + 2\sqrt{3}}}{2}\right)(Acos(n\theta) + Bsin(n\theta))$

Rewrite the recurrence as $a_{n+2} = b a_{n+1} + b^2 a_n$ and use Generating function. This is slower, but more fundamental: $ G(z) = \sum_{k=0}^{\infty} a_k z^k$. You'll need to do a bit of algebra after this. On the LHS you'll have $G(z)$, on the RHS $\sum_{k=0}^{\infty} \varphi(k) z^k$. Now equate the coefficients at $z^n$ and this will be your result.  
