<s>[INST] Is difference equation $t_n = (a+b) t_{n-1} - ab \cdot t_{n-2}$ possible ($t_1 = a + b$ and $t_2 = a^2 + ab + b^2$)? I had problem solving difference equation $t_n = (a+b) t_{n-1} - ab \cdot t_{n-2}$ where $t_1 = a + b$ and $t_2 = a^2 + ab + b^2$.
Here is what I have done:
First, I've written down the equation as $$t^2 = (a+b) t - ab$$
which is $$t^2 - (a+b) t + ab = 0$$
Now solving this quadratic equation we get
$$t_{1,2} = \frac{2(a + b) \pm \sqrt{(a+b)^2 - 4ab}}{2} = \frac{2(a+b)\pm (a - b)}{2}$$
$$t_1 = \frac{3a+b}{2}$$
$$t_2 = \frac{3b+a}{2}$$
So, that leads us to
$$t_n = C_1\cdot t_1^n + C_2 \cdot t_2^n = C_1\cdot (\frac{3a+b}{2})^n + C_2 \cdot (\frac{3b+a}{2})^n$$
and we have to find $C_1$ and $C_2$ now.
Putting $n = 1$ and $n = 2$ in last equation, keeping in mind that $t_1 = a + b$ and $t_2 = a^2 + ab + b^2$ we'll get system of 2 equations with 2 variables
$$a + b =  C_1\cdot \frac{3a+b}{2} + C_2 \cdot \frac{3b+a}{2}$$
$$a^2 + ab + b^2 =  C_1\cdot (\frac{3a+b}{2})^2 + C_2 \cdot (\frac{3b+a}{2})^2$$
What was confusing to me was that, if we have $a = 1$ and $b = 1$ the system is not possible.
So, my question is what is wrong here and how to finish this?
 [/INST] Solving by characteristics method:
$t^2-(a+b) t+ab=0$
Solution $t=a, b$
Case 1 : $a\neq b$
Then $t_n=c_1a^n+c_2b^n$ for $c_1, c_2$ constants.
$t_1=a+b$ implies $c_1 a+c_2b=a+b \space \space ......(1) $
$t_2=a^2+ab+b^2$ implies $c_1 a^2+c_2b^2=a^2+ab+b^2..... (2) $
$(2) -a×(1) $ implies $c_2=\frac{b}{b-a}$ and using $c_2$ in  $(1) $ , we get $c_1=\frac{q}{a-b}$
Hence solution : $t_n=\frac{a}{a-b}a^n+\frac{b}{b-a}b^n$
Case 2 : $a=b$
Then $t_n=(c_1+c_2n)a^n$
Solution : $t_n=(\frac{a^2+ab-b^2}{a^2}+\frac{b^2}{a^2}n)a^n$
</s>