Using NDSolve for matrix equations
- To: mathgroup at smc.vnet.net
- Subject: [mg13538] Using NDSolve for matrix equations
- From: "Eric R. Bittner" <bittner at UH.EDU>
- Date: Fri, 31 Jul 1998 04:33:46 -0400
- Organization: university of houston
- Sender: owner-wri-mathgroup at wolfram.com
I need to solve a set of coupled differential equations using NDSolve.
The basic form is:
X''[t] == -F[X[t]] + Constraint[X[t],X'[t]]; (basically a mechanical
problem with constraints) No problem if X is a simple scaler. But,
what if X[t] is a table?
Still, no problem so long as I can
expand everything and write it out explicily as eom = {
X1''[t]== -F[X1[t],X2[t],.... ] + ..., X2''[t]== -F[X1[t],X2[t], ...] +
...,
:
:};
and so on.
The problem is that I have about 200 to 2000 coupled equations
(depending upon the problem).
The obvious attempt:
eom = {X''[t]==-0.1 X[t],
X[0]=={{0,-1},{2,.5}};
X'[t]=={{0,0},{0,0}} };
soln = NDSolve[eom,X[t],{t,0,10}];
NDSolve complains that these are not well formed equations.
What is the proper way to input these equations in matrix form into
NDSolve?
-- Thanks,
ERB
Eric R. Bittner bittner at uh.edu Dept. of Chemistry
ph: 713-743-2775 University of Houston fax: 713-743-2709
Houston TX 77204 http://k2.chem.uh.edu/bittner/
"confutatis maledictis, flammis acribus addictis..."