# Question:dsolve, events, how to control for a sign change

## Question:dsolve, events, how to control for a sign change

Maple

I have a system of 3 ODEs in 3 variables x(t),y(t),z(t) to be solved numerically. I would like to set up events to halt integration as soon as one of the derivatives changes sign.

I've tried things like:

'events' = [ [ diff(x(t),t) >0, 'halt'] ] :

'events' = [ [ diff(x(t),t) = 0 .. 0.1, 'halt'] ] :

I might have tried something like increasing(x(t)) (how nice and intuitive), but if I understand correctly the help page on this, increasing(x(t)) is for BOTH events "x(t)=0" and "x(t) increasing" occurring at the same time.

Thanks for any suggestions!

Patrick.

I don't understand the help files (hardly any of it, actually, one of the most obscure help pages I've read recently)
http://www.maplesoft.com/support/help/Maple/view.aspx?path=dsolve/numeric/Events

I saw a previous exchange that might have been useful, if I'd understood it, but I didn't so it wasn't.
http://www.mapleprimes.com/questions/37819-The-Mysterious-events-Command

`dsolve({diff(y(t), t, t)+y(t) = 0, y(0) = 0, (D(y))(0) = 1}, numeric  , events = [[[y(t), 0 < diff(y(t), t)], halt], [[y(t), diff(y(t), t) < 0], halt]])`
`Error, (in dsolve/numeric/SC/preproc) builtin function diff is not supported`