Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3942

NDSolve in matrix form

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!newsfeeds.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From gcarlson <gcarlson@xannah.org>
Newsgroups comp.soft-sys.math.mathematica
Subject NDSolve in matrix form
Date Sun, 24 Jul 2011 07:20:02 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <j0gh32$bco$1@smc.vnet.net> (permalink)
Lines 34
NNTP-Posting-Date 24 Jul 2011 06:21:56 GMT
NNTP-Posting-Host a6af1d12.news.twtelecom.net
X-Trace DXC=nM:]oR;BI1=WV@`bFQ>LQ9C_A=>8kQj6==_1NR_H?JP=b95`<gFe:D:EFiONJ7[Go6VgLd80Q48_:
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:3942

Show key headers only | View raw


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[0] = {x1[0],x2[0],...}.

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[[1]][t], f[[2]][t], f[[3]][t]}
      fInit := {0, 0, 2}
      mat := {(-3*f[[1]][t] - f[[2]][t]), 26.5*f[[1]][t] - f[[2]][t] - 
f[[1]][t]*f[[3]][t], f[[1]][t]*f[[2]][t] - f[[3]][t]}
      solution =  NDSolve[{Derivative[1][f][t] == mat, f[0] == 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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

NDSolve in matrix form gcarlson <gcarlson@xannah.org> - 2011-07-24 07:20 +0000

csiph-web