terminating a numerical integration when y reaches a value (instead of t as with ode)

Adrien Vogt-Schilb vogt at centre-cired.fr
Thu Jul 7 12:35:40 CEST 2011


Hi everyone,

When one whishes to solve an ODE y'=f(t,y) starting at point (t0,y0), one
can use the ode function with the following arguments ode(y0,t0, [t0:tf], f),
where [t0:tf] is the interval on which one wants to solve the ODE.

The terminal condition of the resolution is, in the ode function, a time
condition (t==tf). Does anybody know if and how we can use instead a terminal condition on y?


Let us suppose, for example, that we know that the solution increases to
infinity (maybe in finite time). The problem is to solve the ODE as long
as y stays under a certain value yf. We do not know which temporal interval is to
be used to reach this yf.

Numerical example: we want to solve y'=1+a.*y^3 from y0=0 to yf=10 for
differents values of a.

Any ideas ?


Best regards,
Adrien

AVS

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110707/5abe0618/attachment.htm>


More information about the users mailing list