MathGroup Archive 2009

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

Search the Archive

NDSolve -- how to impose constrint on function

  • To: mathgroup at
  • Subject: [mg103982] NDSolve -- how to impose constrint on function
  • From: Dilip <dpa1951 at>
  • Date: Wed, 14 Oct 2009 07:57:33 -0400 (EDT)

I wish to put constraint on function x[t] while solving it using
NDSolve -- let me explain through an example:

Consider differential equation
with the initial condition

If we solve this using NDSolve,
for some given values of tMin, tMax
then the solution x[t] grows monotonically to larger and larger

However I am interested in Mod[x[t],2*Pi] values only.

One way is to solve for x[t] (letting x[t] grow) and then use Mod on x
[t] -- however sometimes x[t] grows to extremely large values that
gives numerical errors.

Question: How do I put condition in NDSolve that it solves a function x
[t] such that it uses Mod[x[t],2*Pi] values as it solves?

Thanks ...
Dr. Dilip Ahalpara

  • Prev by Date: Re: Better Way of Testing and Replacing List Elements?
  • Next by Date: Re: Re: The graph of (x + 2)^(1/5) + 4 not plotted
  • Previous by thread: Re: Error code: 480David Bailey,
  • Next by thread: Mathematica 5.2 with xorg-server-1.6 and updated Xorg libraries