How do I get the solution with the matrix exponential method

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
11 replies · 4K views · last reply
shreddinglicks
Messages
225
Reaction score
7

Homework Statement


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.
 
Physics news on Phys.org
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
  • Printed homework problem 1: solve the linear system x'(t) = x(t) + y(t), y'(t) = 4x(t) + y(t) with x(0.1) = y(0.1) = 1 for 0.1 ≤ t ≤ 1, using parts a) eigenvalue method, b) matrix exponential method, c) diagonalization.
    Captucre.PNG
    22.8 KB · Views: 518
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
  • Lecture slide titled ME 641 Systems of Differential Equations, Example: Matrix Exponential Method (cont.), showing x(t) = e^{At}x0 = M e^{Λt} M^{-1} x0 and the matrix products that evaluate to x(t) = [2/3, -2] e^{-2t} + [4/3, 4] e^{4t}.
    Cafpture.PNG
    33.7 KB · Views: 1,493
  • Lecture slide titled ME 641 Systems of Differential Equations, Example: Matrix Exponential Method. Given a linear homogeneous first-order ODE system x' = Ax with x(t0) = x0, where A = [1 1; 9 1], x0 = [2; 2]. Find the solution by matrix exponential method and plot it.
    Capteuref.PNG
    31.6 KB · Views: 712
  • Lecture slide titled ME 641 Systems of Differential Equations, subtitled Matrix Exponential Method for Systems of ODEs, giving x'(t) = Ax(t) with x(0) = x0, the solution x(t) = e^(At)x0, and the series expansion of the derivative.
    Capturef.PNG
    41.7 KB · Views: 704
  • Slide from ME 641 on systems of differential equations showing the matrix exponential method: modal matrix M = [-1 1; 3 3], its inverse, and the diagonalized matrix Λ = M^-1 A M = [-2 0; 0 4].
    Cawpture.PNG
    37.9 KB · Views: 693
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.