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

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!


I don't understand the help files (hardly any of it, actually, one of the most obscure help pages I've read recently)

I saw a previous exchange that might have been useful, if I'd understood it, but I didn't so it wasn't.

EDIT: let me provide more info,

The help file has an example like this one:

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]])

which works here (Maple 15, Windows).

It states that "two events that correspond to the solution passing through zero in an upwards direction and a downwards direction" and so I read [[y(t), 0 < diff(y(t), t)], halt] to mean BOTH events "y(t)=0" and "diff(y(t),t)>0". Therefore, I thought I would replace [[y(t), 0 < diff(y(t), t)], halt] by [0 < diff(y(t), t), halt], but I get this error:

Error, (in dsolve/numeric/SC/preproc) builtin function diff is not supported

Please Wait...