How can we solve the following recurrence relation?
$$f_n=\left (\frac{2}{a^2}+b\right )f_{n-1}-\frac{1}{a^4}f_{n-2} \\ f_0=1, f_{-1}=0$$
I calculated some values to see if there is a general pattern, but it doesn't seems so...
$$f_1=\left (\frac{2}{a^2}+b\right ) \\ f_2 =\left (\frac{2}{a^2}+b\right )^2-\frac{1}{a^4} \\ f_3 =\left (\frac{2}{a^2}+b\right )^3-\frac{2}{a^4}\left (\frac{2}{a^2}+b\right ) \\ f_4=\left (\frac{2}{a^2}+b\right )^4-\frac{3}{a^4}\left (\frac{2}{a^2}+b\right ) ^2+\frac{1}{a^8} \\ f_5=\left (\frac{2}{a^2}+b\right )^5-\frac{4}{a^4}\left (\frac{2}{a^2}+b\right ) ^3+\frac{3}{a^8}\left (\frac{2}{a^2}+b\right )$$
Have calculated these values right?
Is there an other way to find the solution of the recurrence relation?
The recurrence has the general form $f_n=cf_{n-1}+df_{n-2}$; the auxiliary equation is therefore $x^2-cx-d=0$, or in this case
$$x^2-\left(\frac2{a^2}+b\right)x+\frac1{a^4}=0\;.$$
This has roots
$$\begin{align*} \frac{\frac2{a^2}+b\pm\sqrt{\left(\frac2{a^2}+b\right)^2-\frac4{a^4}}}2&=\frac12\left(\frac{2+a^2b}{a^2}\pm\sqrt{\frac{4a^2b+a^4b^2}{a^4}}\right)\\ &=\frac1{2a^2}\left(2+a^2b\pm|a|\sqrt{4b+a^2b^2}\right)\;. \end{align*}$$
Assuming that $4b+a^2b^2\ne 0$, these roots are distinct; call them $\alpha$ and $\beta$. Then the general solution is $f_n=A\alpha^n+B\beta^n$, where $A$ and $B$ are chosen to satisfy the initial conditions. In particular, $A+B=1$, and $A\alpha+B\beta=f_1=\frac2{a^2}+b$. From these two equations one can solve for $A$ and $B$ in terms of $a$ and $b$.