Re: Vector components as functions in DSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg42442] Re: [mg42431] Vector components as functions in DSolve
- From: Selwyn Hollis <selwynh at earthlink.net>
- Date: Tue, 8 Jul 2003 04:37:23 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Wolfgang, My DETools package extends DSolve and NDSolve so that they understand *linear* systems in vector form. See http://www.math.armstrong.edu/faculty/hollis/mmade. Actually, I need to take that out for version 5.0, since it's apparently not needed. See http://www.wolfram.com/products/mathematica/newin5/numeric/ndsolve.html ----- Selwyn Hollis http://www.math.armstrong.edu/faculty/hollis On Monday, July 7, 2003, at 03:05 AM, Dr. Wolfgang Hintze wrote: > I would like to generalize to an arbitrary number L of dimensions the > following simple procedure in two dimensions: > > Defining a 2x2 matrix, e.g. > > In[66]:= > A = {{0, -1}, {1, 0}}; > > and a vector of two functions of time t > > In[67]:= > r[t] = {x[t], y[t]}; > > I put up a system of ordinary differential equations > > In[77]:= > equ = D[r[t], t] == -A . r[t] > > Out[77]= > {Derivative[1][x][t], Derivative[1][y][t]} == > {y[t], -x[t]} > > and solve it using DSolve > > In[78]:= > DSolve[equ, r[t], t] > > Out[78]= > {{x[t] -> C[1]*Cos[t] + C[2]*Sin[t], > y[t] -> C[2]*Cos[t] - C[1]*Sin[t]}} > > The generalization of the vector r[t] should be something like > > In[87]:= > L = 5; s = Array[f[t], {L}] > > Out[87]= > {f[t][1], f[t][2], f[t][3], f[t][4], f[t][5]} > > or > > In[88]:= > L = 5; s = Array[f, {L}][t] > > Out[88]= > {f[1], f[2], f[3], f[4], f[5]}[t] > > I would then like to use > > In[65]:= > DSolve[D[s, t] == A . s, s, t] > > but nothing of the kind will work. > > My question is simple: how do I treat a system of ordinary differential > equations of the form > > d(Vector of functions of t)/dt > = function of the vector of functions of t) > > in Mathematica? > > Any hints welcome. > > Wolfgang > >