I have to determine an explicit formula for
$a_n=5a_{n-1}+6a_{n-2}$
Initial values are $a_0=2\\a_1=-1\\n>=2$
My answer is
$a_n = \frac{1}{7}\cdot 6^n+\frac{13}{7}\cdot (-1)^n$
Which I suspect is wrong. But, how to "test" it?
I have to determine an explicit formula for
$a_n=5a_{n-1}+6a_{n-2}$
Initial values are $a_0=2\\a_1=-1\\n>=2$
My answer is
$a_n = \frac{1}{7}\cdot 6^n+\frac{13}{7}\cdot (-1)^n$
Which I suspect is wrong. But, how to "test" it?
You are right. All solutions of the recurrence have the shape $(A)6^n+(B)(-1)^n$, where $A$ and $B$ are constants. To determine the values of $A$ and $B$, you need to know the initial conditions.
You were told that $a_0=2$ and $a_1=-1$. That determines $A$ and $B$, which are correct. So your answer is completely right.
To verify that your answer is correct, you can (i) substitute your solution in the recurrence and (ii) check by substitution that the values you get for $n=0$ and $n=1$ match the given ones.
At the practical "informal check" level, you can calculate the first $4$ or $5$ terms from the recurrence, and check them against the values given by any formula you arrive at. If there is a match, your answer is very unlikely to be wrong.
Just compute: \begin{align*} 5a_{n-1} + 6a_{n-2} &= \frac 57 6^{n-1} + \frac{65}7(-1)^{n-1} + \frac 676^{n-2} + \frac{78}7(-1)^{n-2}\\ &= \frac{36}7 6^{n-2} + \frac{13}7(-1)^{n-2}\\ &= \frac 176^n + \frac{13}7(-1)^n\\ &= a_n \end{align*} so the recursion is fulfilled. As $a_0 = \frac 17 + \frac{13}7 = 2$ and $a_1 = \frac 67 - \frac {13}7 = -1$, your solution is correct.
For $n=0,1$ result is positive(by putting values). Now, for recursion part $5a_{n-1}+6a_{n-2}=5\times \frac{6^{n-1}}{7} +\frac{65}{7}(-1)^{n-1}+6\times \frac{6^{n-2}}{7}+\frac{78}{7}(-1)^{n-2}=5\times \frac{6^{n}}{42}+\frac{6^n}{42} + (-1)^n(78/7-65/7)=\frac{6^n}{7}+(-1)^n\frac{13}{7}=a_n.$ $$Hence your recursion formula is correct.
$a_n=5a_{n−1}+6a_{n−2}$
=>$a_n-5a_{n−1}-6a_{n−2}=0$
If $a_n=x^n$
$x^n-5x^{n-1}-6x^{n-2}=0$
=>$x^2-5x-6=0$ as x≠0
So, $a_n=A6^n+B(-1)^n$ where A,B are indeterminate constants.
2=$a_0=A+B$
-1=$a_1=6A-B$
=>A=$\frac{1}{7}$ and B=$\frac{13}{7}$ and
$a_n=\frac{1}{7}6^n+\frac{13}{7}(-1)^n$