# Thread: Coupled difference equations - Change of coordinates problem

1. ## Coupled difference equations - Change of coordinates problem

The setup is:

Consider the coupled system of difference equations generated by a Leslie model with $b_{1}=1, b_{2}=4, d_{1}=0.5$

$x_{n+1}=x_{n}+4y_{n}$
$y_{n+1}=0.5x_{n}+0y_{n}$

What is the right change of coordinates to solve this system and why? And once I've found those, how do I get the inverse transformation? Keep in mind I haven't encountered change of coordinates before.

2. Is that really a zero in front of the second of the $y_n$'s ?

3. Originally Posted by BobP
Is that really a zero in front of the second of the $y_n$'s ?
Yes.

4. Originally Posted by garymarkhov
The setup is:

Consider the coupled system of difference equations generated by a Leslie model with $b_{1}=1, b_{2}=4, d_{1}=0.5$

$x_{n+1}=x_{n}+4y_{n}$
$y_{n+1}=0.5x_{n}+0y_{n}$

What is the right change of coordinates to solve this system and why? And once I've found those, how do I get the inverse transformation? Keep in mind I haven't encountered change of coordinates before.
There's a couple of way to do this. First, the easiest. From the second
equation

$
x_n = 2 y_{n+1}
$

so the first $x_{n+1} = x_n + 4 y_n$ becomes

$2 y_{n+2} = 2 y_{n+1} + 4 y_n = 0$

or

$y_{n+2} - y_{n+1} - 2 y_n = 0$ a second order difference equation.

Way 2:

Let $x_n = a u_n + b v_n,\;\; y_n = c u_n + d v_n,\;\;(1)$

sub. into your system, solve for $u_{n+1}\;\;v_{n+1}$ and require this system to decouple ${\it i.e.}$

$u_{n+1} = \alpha u_n,\;\;\; v_{n+1} = \beta v_n$ for some $\alpha$ and $\beta$. Once you solve these sub. into (1).

Way 3: Use Linear Algebra

If $\bf{x}_n = \left( \begin{array}{c} x_n\\y_n \end{array}\right)$

Then your system is

$
\bf{x}_{n+1} = \mathbb{A} \bf{x}_n
$
where $\mathbb{A} = \left( \begin{array}{cc} 1 & 4\\ \frac{1}{2} & 0 \end{array} \right)$.

The eigenvalues and vectors of $\mathbb{A}$ are

$\lambda_1 = -1, \bf{e}_1 = \left(\begin{array}{c} 2 \\ -1 \end{array} \right)$

and

$\lambda_2 = 2, \bf{e}_2 = \left(\begin{array}{c} 4 \\ 1 \end{array}\right)$

If you create the matrix $\mathbb{T}$ where

$
\mathbb{T} = \left(\begin{array}{cc} 2 & 4 \\ -1 & 1 \end{array}\right)
$

then your system $
\bf{x}_{n+1} = \mathbb{A} \bf{x}_n
$
becomes

$
\bf{x}_{n+1} = \mathbb{T}\; \mathbb{D}\; \mathbb{T}^{-1} \bf{x}_n
$

where $\mathbb{D} = \left(\begin{array}{cc} -1 & 0 \\ 0 & 2 \end{array}\right)$.

If you let

$
\bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n
$

then your sysem reduces to

$
\bf{u}_{n+1} = \mathbb{D} \bf{u}_n
$

a de-coupled system. Once your solve this then your solution is obtained from

$
\bf{x}_{n} = \mathbb{T} \bf{u}_n
$

Hope that helps.

5. Thank you.

I get $
\bf{x}_{n+1} = \left(\begin{array}{cc} 1 & 4 \\ \frac{1}{2} & 0\end{array}\right)
$
, but I have no idea where this fits into the full solution. Your outline is pretty much what I've got in my text, but I've never seen an example fully worked out. Can you show me (using the linear algebra method)?

6. Anyone else care to help? I'm not asking anyone to do my homework, here. I just need to see one fully worked out example to figure out what this is all about.

7. Originally Posted by garymarkhov
Anyone else care to help? I'm not asking anyone to do my homework, here. I just need to see one fully worked out example to figure out what this is all about.
Let me ask. Do you know how to find the eigenvalues and eigenvectors of a matrix?

8. Originally Posted by Danny
Let me ask. Do you know how to find the eigenvalues and eigenvectors of a matrix?
Yes. In fact, I recently helped someone with those: http://www.mathhelpforum.com/math-he...tml#post363948

9. Originally Posted by garymarkhov
Yes. In fact, I recently helped someone with those: http://www.mathhelpforum.com/math-he...tml#post363948
OK. From post #4

The eigenvalues and vectors of $\mathbb{A}$ are

$\lambda_1 = -1, \bf{e}_1 = \left(\begin{array}{c} 2 \\ -1 \end{array} \right)$ and $\lambda_2 = 2, \bf{e}_2 = \left(\begin{array}{c} 4 \\ 1 \end{array}\right)$

If you create the matrix $\mathbb{T}$ where

$
\mathbb{T} = \left(\begin{array}{cc} 2 & 4 \\ -1 & 1 \end{array}\right)
$

noting that the columns are the eigenvectors, the matrix $\mathbb{A}$ can be decomposed as

$
\mathbb{A} = \mathbb{T}\; \mathbb{D}\; \mathbb{T}^{-1}
$

where $\mathbb{T}$ is above, $\mathbb{T}^{-1}$ its inverse and $\mathbb{D} = \left(\begin{array}{cc} -1 & 0 \\ 0 & 2 \end{array}\right)$ a diagonal matrix with the eigenvalues along the diagonal.

So your matrix equation $
\bf{x}_{n+1} = \mathbb{A} \bf{x}_n
$
becomes

$\bf{x}_{n+1} = \mathbb{T}\; \mathbb{D}\; \mathbb{T}^{-1} \bf{x}_n$.

Multiplying both sides by $\mathbb{T}^{-1}$ gives

$\mathbb{T}^{-1} \bf{x}_{n+1} = \mathbb{D}\; \mathbb{T}^{-1} \bf{x}_n$.

If you let

$
\bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n
$

then your sysem reduces to

$
\bf{u}_{n+1} = \mathbb{D} \bf{u}_n
$

a de-coupled system.

Each are easily solved. If $\bf{u}_{n} = \left( \begin{array}{c} u_n\\v_n \end{array}\right)$ then we need to solve $u_{n+1} = - u_n,\;\;\;v_{n+1} = 2 v_n$. The solution of each is

$u_n = u_0 (-1)^n,\;\;\;v_n = v_0 2^n$, where $u_0$ and $v_0$ are constants.

Our final solution is obtained from $
\bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n
$
or $
\bf{x}_{n} = \mathbb{T} \bf{u}_n
$

so $\left( \begin{array}{c} x_n \\ y_n \end{array} \right) = \left( \begin{array}{cc} 2 & 4 \\ -1 & 1 \end{array} \right) \left( \begin{array}{c} u_0 (-1)^n \\ v_0 2^n \end{array} \right)$

Expanding gives

$
x_n = 2 u_0 (-1)^n + 4v_0 2^n,\;\;\;y_n = - u_0 (-1)^n + v_0 2^n
$
the solution.

10. I apologize for the slow reply. Thanks so much for expanding your explanation. A few things remain unclear.

Originally Posted by Danny

So your matrix equation $
\bf{x}_{n+1} = \mathbb{A} \bf{x}_n
$
becomes
What about the $y_{n}$?

If you let

$
\bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n
$

Why are we doing this?

then your system reduces to

$
\bf{u}_{n+1} = \mathbb{D} \bf{u}_n
$

a de-coupled system.
What does that mean?

Each are easily solved. If $\bf{u}_{n} = \left( \begin{array}{c} u_n\\v_n \end{array}\right)$ then we need to solve $u_{n+1} = - u_n,\;\;\;v_{n+1} = 2 v_n$. The solution of each is

$u_n = u_0 (-1)^n,\;\;\;v_n = v_0 2^n$, where $u_0$ and $v_0$ are constants.
Why are we solving for those things? A little explanation would help a lot.

11. Originally Posted by Danny
OK. Midway through post #4

So your matrix equation $
\bf{x}_{n+1} = \mathbb{A} \bf{x}_n
$
becomes

Originally Posted by garymarkhov
What about the $y_{n}$?
The $\begin{color}{blue}y_n \end{color}$ is here. We define the vector $\begin{color}{blue}\bf{x_n} =
\left( \begin{array}{c} x_n\\ y_n \end{array} \right)\end{color}$

$\mathbb{T}^{-1} \bf{x}_{n+1} = \mathbb{D}\; \mathbb{T}^{-1} \bf{x}_n$.

If you let

$
\bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n
$

Originally Posted by garymarkhov
Why are we doing this?
In order to de-couple the system. Notice that

$\begin{color}{blue} \underbrace{\mathbb{T}^{-1} \bf{x}_{n+1}}_{\bf{u_{n+1}}} = \mathbb{D}\; \underbrace{\mathbb{T}^{-1} \bf{x}_n}_{\bf{u_n}}\end{color}$.

then your sysem reduces to

$
\begin{color}{blue} \bf{u}_{n+1} = \mathbb{D} \bf{u}_n \end{color}
$

a de-coupled system.

Originally Posted by garymarkhov
What does that mean?
A de-coupled system is when the equations don't depend on one another. Here

$
\begin{color}{blue} \bf{u}_{n+1} = \mathbb{D} \bf{u}_n \end{color}
$

gives

$\begin{color}{blue} \left( \begin{array}{c} u_{n+1}\\v_{n+1} \end{array}\right) = \left( \begin{array}{cc} -1 & 0 \\ 0 & 2 \end{array} \right) \left( \begin{array}{c} u_n\\v_n \end{array}\right) \end{color}$

or expanding

$\begin{color}{blue}u_{n+1} = - u_n,\;\;\;v_{n+1} = 2 v_n\end{color}$

Each are easily solved, these give

$u_n = u_0 (-1)^n,\;\;\;v_n = v_0 2^n$, where $u_0$ and $v_0$ are constants.

Originally Posted by garymarkhov
Why are we solving for those things?
We de-coupled the system by introucing a change of variables. We now need to get back to the original variables. This is where the

$
\begin{color}{blue} \bf{u}_{n} = \mathbb{T}^{-1} \bf{x}_n \end{color}
$
or $
\begin{color}{blue} \bf{x}_{n} = \mathbb{T} \bf{u}_n \end{color}
$

comes in - it related that two sets of variables. The $\begin{color}{blue} x_n\end{color}$ and $\begin{color}{blue} y_n\end{color}$ and the $\begin{color}{blue} u_n\end{color}$ and $\begin{color}{blue} v_n\end{color}$.
My answers are above in blue.

12. Originally Posted by Danny
My answers are above in blue.
I've been working on this off and on over the last couple of weeks. I have a slightly better understanding than before, but I have yet to come across any textbook (and I've looked through a lot!) that actually explains the intuition behind this process.

$

\begin{color}{blue} \underbrace{\mathbb{T}^{-1}
\bf{x}_{n+1}}_{\bf{u_{n+1}}} = \mathbb{D}\; \underbrace{\mathbb{T}^{-1}
\bf{x}_n}_{\bf{u_n}}\end{color}
$

How do we know $u_{n+1}=Du_n$? And what is actually going on here? I see that the process gets to the solution, but I have no clue what the logic is.

13. Originally Posted by garymarkhov
I've been working on this off and on over the last couple of weeks. I have a slightly better understanding than before, but I have yet to come across any textbook (and I've looked through a lot!) that actually explains the intuition behind this process.

$

\begin{color}{blue} \underbrace{\mathbb{T}^{-1}
\bf{x}_{n+1}}_{\bf{u_{n+1}}} = \mathbb{D}\; \underbrace{\mathbb{T}^{-1}
\bf{x}_n}_{\bf{u_n}}\end{color}
$

How do we know $u_{n+1}=Du_n$? And what is actually going on here? I see that the process gets to the solution, but I have no clue what the logic is.
The technique is usually used for ODEs. Here's a site

Systems of First Order Linear Ordinary Differential Equations with Constant Coefficients

As for a book, David Lay's "Linear Algebra and its Applications," 3rd Ed. has a section on it, section 5.6, pg. 342-353.

14. Originally Posted by Danny
The technique is usually used for ODEs. Here's a site

Systems of First Order Linear Ordinary Differential Equations with Constant Coefficients

As for a book, David Lay's "Linear Algebra and its Applications," 3rd Ed. has a section on it, section 5.6, pg. 342-353.
I know the technique is usually used - I want to understand what the intuition behind it! Most texts I've looked at appear to be written by people who have memorized the steps for this process but have no understanding of the underlying machinery. Now, it may be that the authors have a great understanding of the process, but they apparently deem it entirely unnecessary to impart some of that intuition to their readers.

Often after mastering a topic, I look back at the explanations in my textbooks in bafflement. I have had several "aha, so that's why it works!" moments, and yet the textbook hasn't done a thing to bring those moments into existence. I was hoping that by posting to this forum I might find someone who has had some of those "aha" moments when dealing with ODEs and could provide some of the intuition that textbooks usually leave out. Have you had any "aha" moments you care to share?

15. xx