1

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...

  1. 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$

3 Answers3

1

Just note that $C=1, D=0$ satisfies those two equations.

Robert Israel
  • 470,583
1

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]$

Raffaele
  • 26,731
1

What you need is a general equation that parameterizes the results for any generalized Fibonacci-type sequence of the type $f_n=af_{n−1}+bf_{n−2}$ in terms of the initial conditions.

We have developed just such a solution that is applicable to any values of $a$ and $b$ as well as any initial conditions.

Using the methods described here, it is relatively straightforward to show that

$$ \begin{align}f_n &=\left(f_1-\frac{af_0}{2}\right) \frac{\alpha^n-\beta^n}{\alpha-\beta}+\frac{af_0}{2} \frac{\alpha^n+\beta^n}{\alpha+\beta}\\ &= \left(f_1-\frac{af_0}{2}\right)F_n+\frac{af_0}{2}L_n\\ &=\frac{\left( {{f}_{1}}-{{f}_{0}}\beta \right)\,{{\alpha }^{n}}-\left( {{f}_{1}}-{{f}_{0}}\alpha\right)\,{{\beta }^{n}}}{\alpha -\beta}\\ \end{align}$$

where

$$ \alpha,\beta=(a\pm\sqrt{a^2+4b})/2\\ F_n=\frac{\alpha^n-\beta^n}{\alpha-\beta}\\ L_n=\frac{\alpha^n+\beta^n}{\alpha+\beta} $$

Specializing to the present case, we find that

$$ \alpha,\beta=1\pm\sqrt{3}\\ x_n=\frac{(1+\sqrt{3})^{n+1}-(1-\sqrt{3})^{n+1}}{2\sqrt{3}} $$

This result differs from that of @Raffaele, but I have verified it numerically.

Cye Waldman
  • 8,196
  • It said to show that the general solution is $x_{n}=C(1-\sqrt{3})^n+D(1+\sqrt{3)}^n$ I fail to see how that is correct. – Undergrad2019 Sep 27 '17 at 19:21
  • If I were to show that the final answer is $x_{n}=(1-\sqrt{3})^n$ how would that work with the general solution you've found? I've proven it by solving the two unknown's $C$ and $D$ and it gave the desired answer. But how do you show that $x_{n}=(1-\sqrt{3})^n$ with $x_0=1$ and $x_1=1-\sqrt{3}$ with your solution? Curious to know – Undergrad2019 Sep 27 '17 at 19:31
  • @SamiShafi In the first place, $x_0=1$ and $x_1=2$, as in the OP. Then, our solutions do not differ because $C=\frac{1-\sqrt{3}}{2\sqrt{3}}$ and similarly, $D=\frac{1+\sqrt{3}}{2\sqrt{3}}$. As I said in my post, I have checked this numerically, by comparing the actual recurrence relation with my solution. If you go through my solution as I describe it you will see how to obtain $C$ and $D$. I'm not trying to pull a fast one on you. I developed those equations a long time ago and they have never proven to be wrong. The same equations apply if you want another $x_1$. – Cye Waldman Sep 27 '17 at 20:28
  • @SamiShafi Sam, I did the case with $x_1=1-\sqrt{3}$ and find that $x_{n}=(1-\sqrt{3})^n$, as expected. I just used the same equations and chnaged $x_1$. – Cye Waldman Sep 27 '17 at 20:35
  • ah, I see. I'll try to use your method aswell and to see if I understood what you were doing. – Undergrad2019 Sep 27 '17 at 20:43
  • @SamiShafi In that case, use the last form of the equation that I give for $f_n$, i.e., $$f_n=\frac{\left( {{f}{1}}-{{f}{0}}\beta \right),{{\alpha }^{n}}-\left( {{f}{1}}-{{f}{0}}\alpha\right),{{\beta }^{n}}}{\alpha -\beta}$$ – Cye Waldman Sep 27 '17 at 20:46
  • @cydeWaldman I'm confused, wouldn't $f_1-f_0\beta$ just become $1$? Since $f_1=1$ and $f_0=0$ – Undergrad2019 Sep 27 '17 at 21:11
  • @cydewaldman Is it possible for you to show me how you obtained $x_n=(1+\sqrt3)^n$ with your formula? I didn't quite understand how I should execute it. – Undergrad2019 Sep 27 '17 at 21:14
  • @cydeWaldman I just get that $x_1=\frac{(1-\sqrt3)-(1+\sqrt3)}{(1-\sqrt3-(1+\sqrt3)}=1-\sqrt3$ which will leads to $0=1-\sqrt3$ – Undergrad2019 Sep 27 '17 at 21:38
  • @SamiShafi Let's take a step back... I said that when $x_1=1-\sqrt{3}$ that $x_n=(1-\sqrt{3})^n$. Here's how I got that using my result. $$x_n=\frac{\left(({1-\sqrt{3}})-({1-\sqrt{3}}) \right),{({1+\sqrt{3}})^{n}}-\left( ({1-\sqrt{3}})-({1+\sqrt{3}})\right),{({1-\sqrt{3}})^{n}}}{2\sqrt{3}}\=({1-\sqrt{3}})^{n}$$ – Cye Waldman Sep 27 '17 at 23:06