# Use matrix exponential to solve linear differential equations

1. Sep 7, 2011

### syj

1. The problem statement, all variables and given/known data

Consider the system X'(t)=AX+B(t) where:

A =
[0 0 -1]
[1 0 -3]
[0 1 -3]

and B(t)=
[e-3t]
[et]
[3 ]

Find X(t) by frist determining P such that P-1AP=J is in Jordan form and then solving the three simple equations directly.
2. Relevant equations

3. The attempt at a solution
I know how to find J
but then I'm totally lost.
I need an example to follow.
I have no idea how to solve this.
Or if someone could please direct me to a page on the web that will help.
thanks
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Sep 7, 2011

### HallsofIvy

You say you are able to find P such that $P^{-1}AP= J$, the Jordan form. Excellent- that's most of the hard work!

Think of it as this: multiply both sides of the equation by $P^{-1}$ to get $P^{-1}dX/dt= d(P^{-1}X)/dt= P^{-1}AX+ P^{-1}B$. You can do that because all matrices here a constants. Now $PP^{-1}= I$, of course, so we can insert it between A and X:
$$\frac{d(P^{-1}X)}{dt}= P^{-1}A(PP^{-1})X+ P^{-1}B$$
$$\frac{d(P^{-1}X)}{dt}= (P^{-1}AP)(P^{-1}X)+ P^{-1}B$$
$$\frac{d(P^{1}X)}{dt}= J(P^{-1}X)+ P^{-1}B$$

Now, let $Y= P^{-1}X$ and the equation becomes
$$\frac{dY}{dt}= JY+ C$$
where $C= P^{-1}B$.

That will be at least a "partially separated" system of equations. Of course, once you have found Y, $X= PY$.

Last edited by a moderator: Sep 7, 2011
3. Sep 7, 2011

### syj

Ok,
please check if I am correct so far:
I found the characteristic polynomial of A to be ($\lambda$+1)3
this gives me the eigenvalue of $\lambda$=-1 (multiplicity 3)
the eigenvector i got was
[1 2 1]T

NOW I am kinda stuck
I thought I would have to create the matrix P
[1 2 1]
[1 2 1]
[1 2 1]

and then find its inverse.
However this is proving impossible for me.
I am certain I have either done something wrong in finding my characteristic polynomial OR there is a different method to use when I have repeated roots.

4. Sep 7, 2011

### Ray Vickson

If J is the Jordan form we have exp(t*A) = exp(PAP^(-1)J*t) = P*exp(J*t)*P^(-1), and computing exp(J*t) is easy.

RGV

5. Sep 8, 2011

### syj

If the characteristic polynomial is ($\lambda$+1)3
then am I correct in saying the jordan form of the matrix is J=
[-1 0 0]
[0 -1 0]
[0 0 -1]

and so eJ=
[e-1 0 0]
[0 e-1 0]
[0 0 e-1]

6. Sep 8, 2011

### HallsofIvy

No, that is not correct. That would be the case if the matrix were "diagonalizable"- that is, if there were three independent eigenvectors. Ray Vickson, you can't use the same vector repeatedly. In order that P be invertible, the rows have to be indendent vectors. Eigenvectors corresponding to distinct eigenvalues are always independent so a matrix having three distinct eigenvalues is always diagonalizable but that is not the case here.

Yes, $\lambda= -1$ is a triple root of the characteristic equation. That means that $(A+ I)^3v= 0$ for every vector (a matrix always satifies its own characteristic equation. In particular, there must exist v such that Av= -v- i.e. v is an eigenvalue. It is easy to show that v= <1, 2, 1> is such an eigenvector, as you say, but we only get one such. That is why the matrix is not diagonalizable. At this point we know that the Jordan Normal form is
$$\begin{bmatrix}-1 & 1 & 0 \\ 0 & -1 & 1 \\ 0 & 0 & 1\end{bmatrix}$$.
(If there had been three independent eigenvectors, it would be diagonal:
$$\begin{bmatrix}-1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1\end{bmatrix}$$
If there had been two independent eigenvectors, it would have had only one "block":
$$\begin{bmatrix}-1 & 1 & 0 \\ 0 & -1 & 0\\ 0 & 0 & 1\end{bmatrix}$$.)

Since there are no other independent eigenvectors, we look for "generalized eigenvectors". There may be vectors, v, such that that it is not true that $(A+ I)v= 0$ but that $(A+ I)^2v= 0$. That is the same as $(A+ I)u= 0$ where $u= (A+ I)v$ so that u is an eigenvector since every eigenvector is a multiple of <1, 4, -1> so we look for a vector, v, such that (A+ I)v= <1, 2, 1>.

The matrix equation, (A+ I)v= <1, 2, 1> or
$$\begin{bmatrix}1 & 0 & -1 \\ 1 & 1 & -3\\ 0 & 1 & -2\end{bmatrix}\begin{bmatrix}x \\ y \\ z\end{bmatrix}= \begin{bmatrix}x- z \\ x+ y- 3z \\ y- 2z\end{bmatrix}= \begin{bmatrix}1 \\ 2 \\ 1\end{bmatrix}$$
gives the three equations x- z= 1, x+ y- 3z= 2, and y- 2z= 1. From the first equation, x= z+ 1. From the third equation, y= 2z+ 1. Putting those into the second equation, z+ 1+ 2z+ 1- 3z= 2 is satisfied for any z. Taking z= 1, x= 2, and y= 3. One "generalized eigenvector" is <2, 3, 1>.

But since $(A+ I)^3v= 0$ for all v, there must also be v such that neither $(A+ I)v= 0$ nor $(A+I)^2v= 0$ but $(A+I)^3v= 0$ and that, in turn, means such that $(A+ I)v$ is a multiple of <2, 3, 1>.
The last, independent, generalized eigenvector must satisfy (A+ I)v= <2, 3, 1> or
$$\begin{bmatrix}1 & 0 & -1 \\ 1 & 1 & -3\\ 0 & 1 & -2\end{bmatrix}\begin{bmatrix}x \\ y \\ z\end{bmatrix}= \begin{bmatrix}x- z \\ x+ y- 3z \\ y- 2z\end{bmatrix}= \begin{bmatrix}2 \\ 3\\ 1\end{bmatrix}$$
Solve for x, y, z and construct the matrix P using those vectors as columns.

Last edited by a moderator: Sep 8, 2011
7. Sep 8, 2011

### Ray Vickson

I am confused: I did not use any vectors, repeatedly or not. I did use your relationship A = P.J.P^(-1) from your earlier post. Then I just pointed out that exp(tA) = P.exp(tJ).P^(-1). This is well known, and holds for any analytic function f(A), not just for exp(tA).

RGV

8. Sep 13, 2011

### syj

I have found P
P=
1 1 1
0 1 2
0 0 1

so and P-1AP = J =
-1 0 0
1 -1 0
0 1 -1

I am going to try to follow HallsofIvy's explanation.

...

9. Sep 13, 2011

### syj

HELP
I am totally lost ...
I dont know where to go from here ...
All I have is P
and looking at HallsofIvy's steps I am stuck at the last equation.
How do I find Y?
:(
the question in my textbook says to find P and then solve the three simple equations.
What 3 simple equations?
:(

10. Sep 13, 2011

### vela

Staff Emeritus
Try calculating the first few powers of J. Look for a pattern.

Also, for P, reverse the order of the columns, that is, use
$$P=\begin{pmatrix} 1 & 1 & 1 \\ 2 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}$$
so you'll get
$$J=\begin{pmatrix} -1 & 1 & 0 \\ 0 & -1 & 1 \\ 0 & 0 & -1 \end{pmatrix}$$
Jordan normal form is an upper triangular matrix.

Last edited: Sep 13, 2011
11. Sep 19, 2011

### syj

What did I do wrong that lead to my having the columns in the wrong order for P?
I took [1 0 0]T as being my start vector and then used a "chain" method I found online.
the method defines x2=Ax1
and then x3=Ax2

I am also still struggling to solve the linear differential equation.
Can someone recommend a textbook that has a worked example.
The text I am using is Matrices and Linear Transformations by Cullen. There are no worked examples for this section. :(
There is something on pg269 of the text. If anyone can check it out on google books and maybe help me out?
thanks a mil

12. Sep 19, 2011

### vela

Staff Emeritus
That's backwards. The first column x1 should be the eigenvector of A. The next column should be the solution to Ax2=x1, and so on.

Where are you getting stuck solving the system?

13. Sep 19, 2011

### syj

Ok, I have discovered the error of my ways.
I now have the following:
P = \begin{matrix}1&1&1\\2&1&0\\1&0&0\end{matrix}

P-1= \begin{matrix}0&0&1\\0&1&-2\\1&-1&1\end{matrix}

so that P-1AP=J=\begin{matrix}-1&1&0\\0&-1&1\\0&0&-1\end{matrix}

is that correct so far?

Last edited: Sep 19, 2011