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

• Jan 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 $\displaystyle u_{n}=2u_{n-1}-2u_{n-2}$, subject to initial conditions $\displaystyle u_{0}=2, u_{1}=3$"

I know what the characteristic polynomial is, how to calculate its zeros, but when it comes to solving $\displaystyle c_{1}+c_{2}=2$ and $\displaystyle c_{1}(1+i)+c_{2}(1-i)=3$ I find it difficult. I understand that we can present $\displaystyle c_{1}=x+iy$ and than we can calculate $\displaystyle c_{2}$, but how do we calculate $\displaystyle x$ and $\displaystyle y$? How can I establish that $\displaystyle 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.
• Jan 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 $\displaystyle u_{n}=2u_{n-1}-2u_{n-2}$, subject to initial conditions $\displaystyle u_{0}=2, u_{1}=3$"

I know what the characteristic polynomial is, how to calculate its zeros, but when it comes to solving $\displaystyle c_{1}+c_{2}=2$ and $\displaystyle c_{1}(1+i)+c_{2}(1-i)=3$ I find it difficult. I understand that we can present $\displaystyle c_{1}=x+iy$ and than we can calculate $\displaystyle c_{2}$, but how do we calculate $\displaystyle x$ and $\displaystyle y$? How can I establish that $\displaystyle 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 $\displaystyle r\ e^{\pm i\ \theta}$, then the solution of the difference equation is...

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

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

Kind regards

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

Quote:

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

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

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

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

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

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

Substitute the first two values of the sequence:

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

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

Therefore, the generating function is:

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