Question: ODE Event handling


I i have a 2nd order ODE where i want to chance the derivatives of x(t) and y(t) exactly at sqrt(x(t)^2+y(t)^2)=1 ,or before, as close to 1 as possible.

I found "event=" in/dsolve/numeric/events, where i can define the trigger and the action.

What is the difference between: "event=[[sqrt(...)-1,diff(x(t),t)=...],[sqrt(...)-1,diff(y(t),t)=...]]" and "event=[[sqrt(...)-1,[diff(x(t),t)=...,diff(y(t),t)=...]]]", because i get different results, which one is the correct form?

I also found the side(f(t),pre) option, but with side(sqrt(...)-1,pre) i get an error message. When i definde the sqrt-function as a new variable e.g. event=[tr(t)=sqrt(...)-1,side(tr(t),pre),...]" i get an error that tr(t) is undefined.

What are my options to get the event closest to =< 1 ?

Thank You

Please Wait...