MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re:avoiding neg values in NDSolve

  • To: mathgroup at
  • Subject: [mg27371] Re:avoiding neg values in NDSolve
  • From: bghiggins at (Brian Higgins)
  • Date: Thu, 22 Feb 2001 02:25:16 -0500 (EST)
  • Organization: The Math Forum
  • References: <96t9gv$>
  • Sender: owner-wri-mathgroup at

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.



  • Prev by Date: Re:chaos-to -order transform
  • Next by Date: Re: Chebyshev values
  • Previous by thread: Re: avoiding neg values in NDSolve
  • Next by thread: page breaks ?