Message Boards Message Boards


Solve differential equations like x' = Ax; A is a matrix and x is a vector

Posted 8 years ago
4 Replies
2 Total Likes
Hello everyone,

I am a new user who is trying to solve linear differential equations like x' = A x where A is a matrix of constants. 

I have not been able to successfully enter such an equation into wolframAlpha. 

I have tried things like x' = [{2,1},{3,4}]x  to no avail. 

At best, it tells me that the formatting is incorrect and solves for x = 2.

I have look through the available examples, but none seem to use a matrix. 

How would you solve dx/dt = Ax?
4 Replies
a = {{1, 2}, {3, 4}};
DSolve[{x1'[t], x2'[t]} == a.{x1[t], x2[t]}, {x1[t], x2[t]}, t]
 {{x1[t] -> ((3 E^(1/2 (5 - Sqrt[33]) t) +
        Sqrt[33] E^(1/2 (5 - Sqrt[33]) t) -
        3 E^(1/2 (5 + Sqrt[33]) t) +
        Sqrt[33] E^(1/2 (5 + Sqrt[33]) t)) C[1])/(
     2 Sqrt[33]) - ((-3 + Sqrt[33]) (3 + Sqrt[33]) (E^(
        1/2 (5 - Sqrt[33]) t) - E^(1/2 (5 + Sqrt[33]) t)) C[2])/(
     12 Sqrt[33]),
   x2[t] -> -Sqrt[(3/
       11)] (E^(1/2 (5 - Sqrt[33]) t) - E^(1/2 (5 + Sqrt[33]) t)) C[
      1] + ((-3 E^(1/2 (5 - Sqrt[33]) t) +
       Sqrt[33] E^(1/2 (5 - Sqrt[33]) t) +
       3 E^(1/2 (5 + Sqrt[33]) t) +
       Sqrt[33] E^(1/2 (5 + Sqrt[33]) t)) C[2])/(2 Sqrt[33])}}
is the closest I can get to what you want to do, in Mathematica.
Posted 8 years ago
Sometimes Wolfram|Alpha correctly understands Mathematica syntax and it is always a good idea to try that if if you can't get a solution otherwise.

I have not been able to get Wolfram|Alpha to use Simplify to get a result half this size by factoring out E^(-1/2(-5+Sqrt[33])t).
Posted 8 years ago
Thank you for the assistance, Frank. Your example works perfectly.

Thanks for the elucidation!

What if " x " is an N-dimensional column vector and A a matrix multiplier OPERATOR and the BOTH of these are FUNCTIONS of the TIME " t " in the Linear, homogeneous case. Thus dx(t)/dt = A(t) x(t) . The Matrix operatorS (plural) A(t) may not commute among one another at different times. Then, are there any methods to crack this problem besides the Dyson Chronological operator way by refined time-slicing? What if the elements of A are analytic functions of the time variable t ??? Could one, then, express the equation as the log-derivative of of x(t) equaling A(t) and integrate in a straightforward way with the initial vector x(0) given????

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract