       NDSolve in matrix form

• To: mathgroup at smc.vnet.net
• Subject: [mg120460] NDSolve in matrix form
• From: gcarlson <gcarlson at xannah.org>
• Date: Sun, 24 Jul 2011 03:19:03 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```I am trying to numerically solve systems of ODEs using Mathematica 7.

The desired accuracy that I am striving for depends on the number of
solution functions so I want to structure my solution algorithm to
allow different numbers of solution functions. Solving the problem as
a system of ODEs in matrix form seems the logical choice:

dX/dt = f[X[t]],

where f[X[t]] is a specified function, and X[t] is a vector of
solution functions {x1[t],x2[t],...}. The initial conditions are
specified by a vector X = {x1,x2,...}.

In my problem, the number of solution functions will usually vary from
3 to 7, but could be any number.

One approach that doesn't work is:

f := {f[][t], f[][t], f[][t]}
fInit := {0, 0, 2}
mat := {(-3*f[][t] - f[][t]), 26.5*f[][t] - f[][t] -
f[][t]*f[][t], f[][t]*f[][t] - f[][t]}
solution =  NDSolve[{Derivative[f][t] == mat, f == fInit},
f, {t, 0, 17}]

I don't know if the problem is in the way f is specified or in my
expression for NDSolve.

I'd appreciate any assistance.

Thanks and regards,

Glenn

```

• Prev by Date: NDSolve in matrix form
• Next by Date: Re: random variables
• Previous by thread: Re: NDSolve in matrix form
• Next by thread: Re: NDSolve in matrix form