MathGroup Archive 2004

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

Search the Archive

Matrix differential equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50848] Matrix differential equation
  • From: "Marco Malvaldi" <M.Malvaldi at chem.rug.nl>
  • Date: Thu, 23 Sep 2004 06:48:07 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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