I want to solve the following equation in mathematica :
DSolve[{X'[t] == A.X[t], X[0] == ( {{0},{0}} )}, X[t], t]
It is a system of 2 ODEs coupled by the matrix A, that I don't want to put in the form {{a,b},{c,d}}
in order to have the output as a function of matrix exponential.
Mathematica understands that but gives a solution strangely expressed as:
{{X[t] ->
InverseFunction[Dot, 2, 2][A,
E^(t A.1)
InverseFunction[InverseFunction[Dot, 2, 2], 2, 2][A, 0]]}}
Where it indeed uses a matrix exponential, but also relies on a strange notation InverseFunction [...]
My question is how to get rid of this InverseFunction
notation to have a more readable expression. Do I for example have a manner to postulate that A is a (2,2) matrix, invertible, with inverse B?
Or more generally, how to solve vectorial ODE's and make Mathematica write the solution by relying on exponential matrix notation?
If I can hope a better result with maxima, please advise. Thanks a lot for help
A
with something like{{a11, a12}, {a21, a22}}
, there's not much you can do... still, look intoMatrixExp[]
. $\endgroup$Y'=(A-B)Y+B*L
, and wrote it as :DSolve[{{{Derivative[1][Y1][t]}, {Derivative[1][Y2][ t]}} == ({{a11, a12}, {a21, a22}} - {{b11, b12}, {b21, b22}}).{{Y1[t]}, {Y2[t]}} + {{b11, b12}, {b21, b22}}.{{L1}, {L2}}, {{Y1[0]}, {Y2[ 0]}} == {{L01}, {L02}}}, {{Y1[t]}, {Y2[t]}}, t]
But I got an error message :DSolve::dsfun: "{Y1[t]} cannot be used as a function. "
, any idea? $\endgroup$Thread
on your equations to get the==
working on component level. You might need to throw in aFlatten
. $\endgroup$DSolve[{Thread[{{Derivative[1][Y1][t]}, {Derivative[1][Y2][ t]}} == {{b11 L1 + b12 L2 + (a11 - b11) Y1[t] + (a12 - b12) Y2[t]}, {b21 L1 + b22 L2 + (a21 - b21) Y1[t] + (a22 - b22) Y2[t]}}], Thread[{{Y1[0]}, {Y2[0]}} == {{L01}, {L02}}]}, {{Y1[t]}, {Y2[t]}}, t]
but still have the same error messageDSolve::dsfun: "{Y1[t]} cannot be used as a function."
$\endgroup$