MathGroup Archive 2010

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

Search the Archive

inequality as constraints on NDSolve

  • To: mathgroup at
  • Subject: [mg106196] inequality as constraints on NDSolve
  • From: "Stefano Pasetto" <spasetto at>
  • Date: Tue, 5 Jan 2010 01:42:24 -0500 (EST)

Dear Mathematica experts:

is there a possibility to implement a constraint in NDSolve?

Suppose I want to solve


NDSolve[{x'[t] == -y[t] - x[t]^2, y'[t] == 2 x[t] - y[t]^3,   x[0] == y[0]
== 1}, {x, y}, {t, 20}]


But I want that the solutions satisfied the inequality x[t]>0 for every t
(because it represent a physical quantity that has no meaning to be
negative), i.e., and when it becomes =0 it has to stay zero. I've tried
something like 




in the definition of x or y but it does not make sense. Somehow, I'd need to
change the solution of the system when the solution itself become negative.

ThankX for the help, :-)

Best regards

Stefano Pasetto

  • Prev by Date: Re: Re: algebraic numbers
  • Next by Date: mathproject10
  • Previous by thread: Re: Combining data from indexed lists efficiently
  • Next by thread: Re: inequality as constraints on NDSolve +Integral...