I'm trying to solve a recurrence relation and I've having trouble. $$ a_{n+2} - 3a_{n+1} - 28a_n = 0 $$
Is this a non-homogenous relation? How can I solve it? I factored it which gave me r = 7 and r = -4, but I don't know what to do after.
I'm trying to solve a recurrence relation and I've having trouble. $$ a_{n+2} - 3a_{n+1} - 28a_n = 0 $$
Is this a non-homogenous relation? How can I solve it? I factored it which gave me r = 7 and r = -4, but I don't know what to do after.
This is a homogeneous relation since the RHS is 0. If you let $a_n = r^n$, you end up with the quadratic $$r^2-3r-28=0,$$ which you solved correctly to get the roots $r=7,r=-4$.
So that means $(-4)^n$ and $7^n$ are valid solution families, and thus the general solution would be $$ a_n = A7^n + B(-4)^n \quad \forall A,B \in \mathbb{R} $$
That recurrence has characteristic polynomial $x^2 - 3x - 28 = 0$ or $(x-7)(x+4) = 0$. The roots are $x=7$ and $x=-4$. Therefore:
$a_n = \alpha \cdot 7^n + \beta \cdot (-4)^n$
You can solve for $\alpha, \beta$ if you know two values of the recurrence, e.g. $a_0$ and $a_1$.
The sequence of the generalized Fibonacci type, for which I have presented a detailed account in Find an explicit expression for the general term of a recurrence relation. There I show that the solution for a sequence of the type $f_n=af_{n-1}+bf_{n-2}$ with initial conditions $f(0)=f_0 \ \&\ f(1)=f_1$ is given by
$$f_n=\left(f_1-\frac{af_0}{2}\right) \frac{\alpha^n-\beta^n}{\alpha-\beta}+\frac{f_0}{2} (\alpha^n+\beta^n)$$
where $\alpha,\beta=(a\pm\sqrt{a^2+4b})/2$.
In your case, $\alpha,\beta=(3\pm\sqrt{9+112})/2=-4,7$, so finally
$$a_n=-\left(a_1-\frac{3a_0}{2}\right) \frac{(-4)^n-7^n}{11}+\frac{a_0}{2} ((-4)^n+7^n)$$
This is a complete solution valid for any initial conditions.