How to solve this reccurence relation? Let a,b,c be real numbers. Find the explicit formula for $f_n=af_{n-1}+b$ for $n \ge 1$ and $f_0 = c$
So I rewrote it as $f_n-af_{n-1}-b=0$ which gives the characteristic equation as $x^2-ax-b=0$. The quadratic formula gives roots $x= \frac{a+\sqrt{a^2+4b}}{-2}, \frac{a-\sqrt{a^2+4b}}{-2}$
Then $f_n=P_1(\frac{a+\sqrt{a^2+4b}}{-2})^n+P_2(\frac{a-\sqrt{a^2+4b}}{-2})^n$ and using the initial condition $t_0=c$ gives $C=P_1+P_2 \Rightarrow P_1=C-P_2$
So $(C-P_2)(\frac{a+\sqrt{a^2+4b}}{-2})^n+P_2(\frac{a-\sqrt{a^2+4b}}{-2})^n$ what next? I tried expanding but that didn't help. I know the answer is something like $cd^n-\frac{b}{a-1}+\frac{bd^n}{a-1}$

Why not consider this?
$f_n + m = a(f_{n-1} + m) \Longrightarrow (a-1)m=b$
1) $a=1$, simple recurrence $f_n = f_{n-1} + b$, $f_n = bn+c$
2) $a\neq 1$, $m=\frac{b}{a-1}$, $f_n+m = a(f_{n-1}+m)$, geometric sequence $f_n+m=a^n(c+m)$
Hope it is helpful!
