# Second Order Linear Difference Equations with constant Coefficient - The Homogeneous

• January 2nd 2011, 05:38 AM
Gibo
Second Order Linear Difference Equations with constant Coefficient - The Homogeneous
Hi,
I have a problem with part of this example - "Solve the difference equation $u_{n}=2u_{n-1}-2u_{n-2}$, subject to initial conditions $u_{0}=2, u_{1}=3$"

I know what the characteristic polynomial is, how to calculate its zeros, but when it comes to solving $c_{1}+c_{2}=2$ and $c_{1}(1+i)+c_{2}(1-i)=3$ I find it difficult. I understand that we can present $c_{1}=x+iy$ and than we can calculate $c_{2}$, but how do we calculate $x$ and $y$? How can I establish that $1+i=\sqrt{2}(\cos(\frac{\pi}{4})+i\sin(\frac{\pi}{ 4}))$? I would be greateful if anyone could help me. Thanks in advance.
• January 2nd 2011, 09:29 AM
chisigma
Quote:

Originally Posted by Gibo
Hi,
I have a problem with part of this example - "Solve the difference equation $u_{n}=2u_{n-1}-2u_{n-2}$, subject to initial conditions $u_{0}=2, u_{1}=3$"

I know what the characteristic polynomial is, how to calculate its zeros, but when it comes to solving $c_{1}+c_{2}=2$ and $c_{1}(1+i)+c_{2}(1-i)=3$ I find it difficult. I understand that we can present $c_{1}=x+iy$ and than we can calculate $c_{2}$, but how do we calculate $x$ and $y$? How can I establish that $1+i=\sqrt{2}(\cos(\frac{\pi}{4})+i\sin(\frac{\pi}{ 4}))$? I would be greateful if anyone could help me. Thanks in advance.

If the roots of the characteristic equation are complex coniugate of the form $r\ e^{\pm i\ \theta}$, then the solution of the difference equation is...

$\displaystyle u_{n}= r^{n}\ (c_{1}\ \cos n\ \theta + c_{2}\ \sin n\ \theta )$ (1)

In Your case the roots are $1 \pm i \implies r= \sqrt{2} , \theta= \frac{\pi}{4}\$ , so that...

Kind regards

$\chi$ $\sigma$
• January 2nd 2011, 11:22 AM
Soroban
Hello, Gibo!

Quote:

Solve the difference equation: . $u_n\:=\:2u_{n-1}-2u_{n-2},\;\;u_{0}=2,\;\; u_{1}=3$

$\text{Let }\,X^n \:=\:u_n$

$\text{Then we have: }\:X^n \:=\:2X^{n-1} - 2X^{n-2} \quad\Rightarrow\quad X^n - 2X^{n-1} + 2X^{n-2} \:=\:0$

$\text{Divide by }X^{n-2}\!:\;\;X^2 - 2X + 2 \:=\:0$

$\text{Quadratic Formula: }\;X \;=\;\dfrac{2\pm\sqrt{-4}}{2} \:=\:1 \pm i$

The function has the form: . $f(n) \:=\:A(1+i)^n + B(1-i)^n$

Substitute the first two values of the sequence:

. . $\begin{array}{ccccccc}f(0) = 2\!: & A\;+\; B &=& 2 \\ f(1) = 3\!: & A(1+i) + B(1-i) &=& 3 \end{array}$

Solve the system: . $A \,=\,\frac{1}{2}(2-i),\;\;B \,=\,\frac{1}{2}(2+i)$

Therefore, the generating function is:

. . . $f(n) \;=\;\frac{1}{2}(2-i)(1+i)^n + \frac{1}{2}(2+i)(1-i)^n$