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

• shreddinglicks
In summary, the homework statement is a 2 X 2 matrix and the problem statement is trying to solve for y(t) when x(t) is given, but t is in the range .1-.
shreddinglicks

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.

shreddinglicks said:

## 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:
Mark44 said:
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
22.8 KB · Views: 411
Last edited by a moderator:
shreddinglicks said:
Also, won't plugging in t = .1 eliminate my solution?
Why do you think that would happen? Did you try what I suggested?

Mark44 said:
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.

shreddinglicks said:
[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.

Mark44 said:
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.

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.

Mark44 said:
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
33.7 KB · Views: 1,289
• Capteuref.PNG
31.6 KB · Views: 578
• Capturef.PNG
41.7 KB · Views: 540
• Cawpture.PNG
37.9 KB · Views: 568
shreddinglicks said:
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.

## 1. What is the matrix exponential method?

The matrix exponential method is a mathematical technique used to compute the solution of a differential equation by expressing it in terms of a matrix exponential. It is commonly used in the field of scientific computing and has applications in physics, engineering, and other areas of science.

## 2. How do I use the matrix exponential method to solve a differential equation?

To use the matrix exponential method, you first need to express your differential equation in the form of a matrix. Then, you can use the properties of matrix exponentials to solve for the solution of the differential equation. This method is especially useful for solving systems of differential equations.

## 3. What are the advantages of using the matrix exponential method?

The matrix exponential method has several advantages, including its ability to solve complex systems of differential equations and its efficiency in numerical computations. It is also a versatile method that can be applied to a wide range of problems in various fields of science and engineering.

## 4. Are there any limitations to using the matrix exponential method?

While the matrix exponential method is a powerful tool for solving differential equations, it does have some limitations. It may not be suitable for certain types of equations or problems, and it can be computationally expensive for large systems. Additionally, the accuracy of the solution may be affected by the initial conditions and the choice of time step.

There are many resources available for learning about the matrix exponential method, including textbooks, online tutorials, and scientific papers. You can also attend workshops or conferences related to scientific computing or differential equations to gain a deeper understanding of this method and its applications.

• Calculus and Beyond Homework Help
Replies
2
Views
425
• Calculus and Beyond Homework Help
Replies
3
Views
568
• Calculus and Beyond Homework Help
Replies
4
Views
467
• Calculus and Beyond Homework Help
Replies
2
Views
442
• Calculus and Beyond Homework Help
Replies
2
Views
727
• Calculus and Beyond Homework Help
Replies
4
Views
765
• Calculus and Beyond Homework Help
Replies
6
Views
462
• Calculus and Beyond Homework Help
Replies
8
Views
2K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Calculus and Beyond Homework Help
Replies
8
Views
1K