Re:avoiding neg values in NDSolve

*To*: mathgroup at smc.vnet.net*Subject*: [mg27371] Re:avoiding neg values in NDSolve*From*: bghiggins at ucdavis.edu (Brian Higgins)*Date*: Thu, 22 Feb 2001 02:25:16 -0500 (EST)*Organization*: The Math Forum*References*: <96t9gv$prt@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Michael, The problem lies in the statement ndsolvevec /. {\[Mu][t] -> m (t + tstart)} When NDSolve tries to integrate the equations it puts a real number for t in the LHS of your rule, and thus the rule is not being implemented the way you want. There are several ways you can solve this problem (i) Implement the rule before the NDSolve statement ndsolvevec = Join[diffeqvec, ivec]/. {\[Mu][t] -> m (t + tstart)} (ii) Use a dummy variable for the argument of \Mu[t] in the definition of your equations, say \Mu[t1], and then use the following rule in NDSolve ndsolvevec /. \[Mu][t1] -> m (t + tstart) Your equations are then readily integrated without the need to specify all the NDSolve options. Cheers Brian