# How do I get the solution with the matrix exponential method

a = [1 1;4 1]

## Homework Equations

R = M^-1 * a * M
X = M * e^(R*t) * M^-1 * x

M is matrix of eigenvectors.

## The Attempt at a Solution

lambda = 3, -1

initial conditions:
x = [1 1]' at t = .1

eigenvectors:
k1 = [1 2]'
k2 = [1 -2]'

M = [1 1;2 -2]
M^-1 = [.5 .25; .5 -.25]

R = [3 0; 0 -1]

Solution:
X = [1 1; 2 -2] * [e^(3t) 0; 0 e^-t] * [.5 .25; .5 -.25] * x

How do I account for the fact t = .1? I keep seeing examples where t = 0. When I follow those examples I keep getting the wrong solution.

Mark44
Mentor

## Homework Statement

a = [1 1;4 1]
What exactly is the problem statement? All you have here is a 2 X 2 matrix. Also, the usual style for labels of matrices is upper case letters. IOW, A instead of a.
shreddinglicks said:

## Homework Equations

R = M^-1 * a * M
X = M * e^(R*t) * M^-1 * x

M is matrix of eigenvectors.

## The Attempt at a Solution

lambda = 3, -1

initial conditions:
x = [1 1]' at t = .1

eigenvectors:
k1 = [1 2]'
k2 = [1 -2]'

M = [1 1;2 -2]
M^-1 = [.5 .25; .5 -.25]

R = [3 0; 0 -1]

Solution:
X = [1 1; 2 -2] * [e^(3t) 0; 0 e^-t] * [.5 .25; .5 -.25] * x

How do I account for the fact t = .1? I keep seeing examples where t = 0. When I follow those examples I keep getting the wrong solution.
You're given that ##\overrightarrow {x(.1)} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}##; i.e., when t = .1. In your solution above, substitute .1 for t the vector I wrote for ##\vec x##. I haven't checked your solution, so I can't guarantee that what I'm saying will produce the correct value.

Last edited:
What exactly is the problem statement? All you have here is a 2 X 2 matrix. Also, the usual style for labels of matrices is upper case letters. IOW, A instead of a.

You're given that ##\overrightarrow {x(.1)} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}##; i.e., when t = .1. In your solution above, substitute .1 for t the vector I wrote for ##\vec x##. I haven't checked your solution, so I can't guarantee that what I'm saying will produce the correct value.

I'll keep the uppercase letters in mind. The actual problem is attached, I am trying to solve part B. Also, won't plugging in t = .1 eliminate my solution?

#### Attachments

• Captucre.PNG
26.6 KB · Views: 280
Last edited by a moderator:
Mark44
Mentor
Also, won't plugging in t = .1 eliminate my solution?
Why do you think that would happen? Did you try what I suggested?

Why do you think that would happen? Did you try what I suggested?

[1.238 1.572]' = [1 1;2 -2]*[e^(3*.1) 0; 0 e^(-.1)]*[.5 .25;.5 -.25]*[1 1]'

That does not look like a solution to a differential equation.

Mark44
Mentor
[1.238 1.572]' = [1 1;2 -2]*[e^(3*.1) 0; 0 e^(-.1)]*[.5 .25;.5 -.25]*[1 1]'

That does not look like a solution to a differential equation.
I agree. Part of my confusion is in trying to make sense of this:
X = [1 1; 2 -2] * [e^(3t) 0; 0 e^-t] * [.5 .25; .5 -.25] * x

The original system of differential equations involves x(t) and y(t) and their derivatives. In your solution what do X and x represent?
Your solution should start off with ##\begin{bmatrix} x(t) \\ y(t) \end{bmatrix}##, which is probably what you should have in place of X. For x, you should probably have your vector of initial conditions.

The matrix in the middle on the right side, with the exponentials, should be left as is. Otherwise, you should multiply things out to give equations for x(t) and y(t).

When you're done, check your solutions to ensure that
1. x(.1) = 1 and y(.1) = 1, and
2. x(t) and y(t) satisfy the two differential equations.

If both of the above check out, your solution is correct.

I agree. Part of my confusion is in trying to make sense of this:

The original system of differential equations involves x(t) and y(t) and their derivatives. In your solution what do X and x represent?
Your solution should start off with ##\begin{bmatrix} x(t) \\ y(t) \end{bmatrix}##, which is probably what you should have in place of X. For x, you should probably have your vector of initial conditions.

The matrix in the middle on the right side, with the exponentials, should be left as is. Otherwise, you should multiply things out to give equations for x(t) and y(t).

When you're done, check your solutions to ensure that
1. x(.1) = 1 and y(.1) = 1, and
2. x(t) and y(t) satisfy the two differential equations.

If both of the above check out, your solution is correct.

X is the solution

X = [x y]'

Initial condition at t = .1
x = [1 1]'

If I solve this I get:
.75e^(3t)+.25e^(-t) = x(t)
1.5e^3t - .5e^t = y(t)

No I will not get x = 1 and y = 1 when t = .1

I already have the solution from solving part A using the eigenvalue method. I can't get it with the matrix exponential method.

Mark44
Mentor
It looks to me like you're mixing up two different approaches for solving a system of diff. equations. One approach is to diagonalize the matrix of coefficients, A, with D = P-1AP. Another approach is to exponentiate the matrix. In other words, If x' = Ax, the solutions will be ##\vec x(t) = c_1e^{\lambda_1 t} \vec{u_1} + \dots + c_2e^{\lambda_2 t} \vec{u_n}##. Here, n = 2, since you have a system of two equations. The lambdas are your eigenvalues and the u's are your eigenvectors. This is described here: https://en.wikipedia.org/wiki/Matrix_differential_equation.

It looks to me like you're mixing up two different approaches for solving a system of diff. equations. One approach is to diagonalize the matrix of coefficients, A, with D = P-1AP. Another approach is to exponentiate the matrix. In other words, If x' = Ax, the solutions will be ##\vec x(t) = c_1e^{\lambda_1 t} \vec{u_1} + \dots + c_2e^{\lambda_2 t} \vec{u_n}##. Here, n = 2, since you have a system of two equations. The lambdas are your eigenvalues and the u's are your eigenvectors. This is described here: https://en.wikipedia.org/wiki/Matrix_differential_equation.

Yes, I used the eigenvalue method to solve part A. I need to solve part B using the matrix exponential method.

If it helps, here are the slides of the method I am trying to follow.

#### Attachments

• Cafpture.PNG
40.3 KB · Views: 614
• Capteuref.PNG
41.9 KB · Views: 312
• Capturef.PNG
52.6 KB · Views: 302
• Cawpture.PNG
47.8 KB · Views: 296
Ray Vickson
Homework Helper
Dearly Missed
Yes, I used the eigenvalue method to solve part A. I need to solve part B using the matrix exponential method.

You have that
$$\exp(A t) = M \pmatrix{e^{3t} & 0 \\ 0 & e^{t}} M^{-1} = E_1 e^{3t} + E_2 e^t,$$
where
$$E_1 = M \pmatrix{1 & 0 \\ 0 & 0} M^{-1}, \:\text{and}\; E_2 = M \pmatrix{0 & 0 \\ 0 & 1 } M^{-1}.$$

The solution will be of the form
$$\mathbf{x}(t) = \pmatrix{x_1(t) \\ x_2(t)} = \left( E_1 e^{3t} + E_2 e^t \right) \pmatrix{a \\ b} \equiv \mathbf{u} e^{3t} + \mathbf{v} e^t \hspace{4ex}(1)$$
for some constants ##a,b## and associated constant vectors ##\mathbf{u}, \mathbf{v}.##

This implies
$$\pmatrix{1\\1} = e^{0.3} E_1 \pmatrix{a\\b} + e^{0.1} E_2 \pmatrix{a\\b}.$$

I figured it out. I needed

e^A(t-t0) t0 = initial time = .1

M*e^A(t-t0)*M^-1 = X(t)

Thanks for taking the time to try and help.