MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Matrix differential equation


It is possible to numerically solve a general matrix differential equation
with Mathematica? From the example in Mathematica 5 tutorial, I found that
this problem can be solved:

k = 10
A = -{{1, 2, 3}, {4, 5 , 6}, {7, 8 , 9}};
K = -{{0, k, 0}, {0, 0 , 0}, {0, 0 , 0}};
X0 = {{1, 0, 0}, {0, 1 , 0}, {0, 0 , 1}};
KT = Transpose[K]

matrixExpA =
  X /. First[
      NDSolve[X'[t] == 0.5*IdentityMatrix[3] .(X[t]) + K.X[t] + X[t].KT &&
          X[0] == IdentityMatrix[3], X, {t, 0, 10}]]

Anyway, when I try to submit this problem:

matrixExpA =
  X /. First[
      NDSolve[X'[t] == 0.5*IdentityMatrix[3] +(X[t]) + K.X[t] + X[t].KT &&
          X[0] == IdentityMatrix[3], X, {t, 0, 10}]]

the answer is:

NDSolve::ndfdmc: Computed derivatives do not have dimensionality consistent
with the initial conditions.

even if what I'm doing is to sum a 3x3 matrix to a system of 3X3 matrix.

Regards
Marco Malvaldi






  • Prev by Date: RE: 3D graph with assumptions
  • Next by Date: Re: Telling Mathematica that a symbol is going to be a List?
  • Previous by thread: Re: Implicit plot variations
  • Next by thread: Re: Matrix differential equation