Vector components as functions in DSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg42431] Vector components as functions in DSolve
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Mon, 7 Jul 2003 03:05:57 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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