Linear homogenous recurrence relations. I'm having trouble solving linear homogenous recurrence relations. I've searched for guides and seen a few video's on how to solve them. I'm confused to how it's done, some suggest matrices, solving them like two linear equations etc...


*

*Given the difference equation $x_{n+2}-2x_{n+1}-2x_n=0$ with  $x_0 = 1$ and $x_1=2$
2.Show that the general solution is $x_n=C(1-\sqrt3)^n+D(1+\sqrt3)^n $ And that the initial values $x_0=1$ and $x_1=1-\sqrt3$ decides that the final solution is $x_n=(1-\sqrt3)^n$
I know that we can write $x_{n+2} -2x_{n+1}-2x_n =0 $ can be written as $r^2-2r-2=0$ and with completing the square we get $r_1r_2=1\pm\sqrt3$ thus, $x^h_n=C(1-\sqrt3)^n+D(1+\sqrt3)^n$ 
But how do I show that the initial values decides that the final solution is $(1-\sqrt3)^n$
ps:


*

*$x_0=C+D=1$

*$x_1=C-C\sqrt3+D+D\sqrt3$ =$1-\sqrt3$

If $x_0=1,\;x_1=2$ then from the general solution $x_n=C(1-\sqrt3)^n+D(1+\sqrt3)^n$
put $n=0$ and get $C+D=1\to D=1-C$
put $n=1$ and get $C(1-\sqrt3)+D(1+\sqrt3)=2$
substitute and get $C(1-\sqrt3)+(1-C)(1+\sqrt3)=2$
$C-C\sqrt{3}+1+\sqrt{3}-C-C\sqrt{3}=2$
$-2C\sqrt{3}=-\sqrt{3}+1$
$C=\dfrac{\sqrt{3}-1}{2\sqrt 3}=\dfrac{3-\sqrt{3}}{6}$
$D=1-C=1-\dfrac{3-\sqrt{3}}{6}=\dfrac{3+\sqrt 3}{6}$
The solution is then
$x_n=\dfrac{3-\sqrt{3}}{6}(1-\sqrt3)^n+\dfrac{3+\sqrt 3}{6}(1+\sqrt3)^n$
$x_n=\dfrac{1}{6} \left[\left(\sqrt{3}+3\right) \left(1+\sqrt{3}\right)^n-\left(\sqrt{3}-3\right) \left(1-\sqrt{3}\right)^n\right]$
