0
$\begingroup$

I'd like to solve simple system of differential equations:

x'[t] == 6x[t] - 6y[t], y'[t] == x[t]-2y[t];

but I want to avoid formulas like DSolve[{x'[t] == 6x[t] - 4y[t], y'[t] == x[t]-2y[t]}, {x,y},t] as I want to put equation in a matrix form. My idea was something like that (based od Wolfram's documentation):

X[t_] = {{x[t]},{y[t]}};

A={{6,-4},{1,-2}};

eqs=D[X[t],t] == A.X[t];

Dsolve[eqs,{x,y},t]

...and I got the error message: There should be no lists on either side of the equations. Any ideas where is the problem? Thanks in advantage! Cheers,

$\endgroup$
  • $\begingroup$ You might be interested in MatrixExp[]. $\endgroup$ – J. M. is in limbo Jun 9 '16 at 10:09
3
$\begingroup$
ClearAll[x, y, t]
X0[t_] := {x[t], y[t]};
A0 = {{6, -4}, {1, -2}};
eqs = Thread[D[X0[t], t] == A0.X0[t]]
DSolve[eqs, X0[t], t]

Mathematica graphics

ps. I am sure this question has been asked before and it is duplicate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.