Re: Relatively simple, but problematic, non-linear ODE

*To*: mathgroup at smc.vnet.net*Subject*: [mg72030] Re: Relatively simple, but problematic, non-linear ODE*From*: "Alan" <info at optioncity.REMOVETHIS.net>*Date*: Sat, 9 Dec 2006 06:09:37 -0500 (EST)*Organization*: Road Runner High Speed Online http://www.rr.com*References*: <el685m$2p9$1@smc.vnet.net> <elbi31$k16$1@smc.vnet.net>

<ab_def at prontomail.com> wrote in message news:elbi31$k16$1 at smc.vnet.net... > f[rho_?NonNegative] := Module[{y, z}, > y = y /. First@ NDSolve[ > {y'[z] == 1/2*(rho*y[z] + Sqrt[(rho^2 - 1)*y[z]^2 + 4]), > y[0] == 0}, > y, {z, 0, Pi}, > StoppingTest -> Re[y[z]] - 2]; > Function @@ {z, > Piecewise[{{y[z], z < y[Domain[]][[1, 2]]}}, 2]} > ] Thanks a lot, Maxim -- I see now, using your suggestion, that the StoppingTest option is the key here. regards, alan