MathGroup Archive 2004

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

Search the Archive

Diff. Equations with "Changeable" Parameters


I have solved diff. equations in this kind of a way:

NDSolve[{x'[t]=y[t],y[0]=0}, {y'[t]=x+Sin[t]+c*y[t]},{x,y},{t,0,2Pi}]

and parameter c was 1, but how to write this algorithm if c is:

c=0, if y<=-1

c=1, if -1<y<1

c=2, if y>=1

How to include this variable parameter c in my NDSolve method?



Thanks.



  • Prev by Date: Re: Mathematica -> TeX
  • Next by Date: Re: Inverse of "PowerExpand"
  • Previous by thread: Re: MovieParametericPlot-3D
  • Next by thread: Re: Diff. Equations with "Changeable" Parameters