Re: Getting the value of the independent var from the dep.var using NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg63891] Re: Getting the value of the independent var from the dep.var using NDSolve
- From: "Borut Levart" <BoLe79 at gmail.com>
- Date: Sat, 21 Jan 2006 01:50:38 -0500 (EST)
- References: <dptd4r$be$1@smc.vnet.net><dq2rgc$n0o$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Commenting on the last comment, I would like to say:
- what a nice differential-equation platform NDSolve is,
- and that the above example fails to find the peaks of Sin[x]:
NDSolve[
{
y'[x] == Cos[x],
y[0] == 0}, y, {x, 0, 20},
Method -> {
"EventLocator",
"Event" -> y[x] - 1,
"EventAction" :> Sow[x]
}
] // Reap
Why is that?
I guess the solver steps over the event, which in turn is not noticed.
But could any algorithm not miss that?
- Follow-Ups:
- Re: Re: Getting the value of the independent var from the dep.var using NDSolve
- From: Pratik Desai <pdesai1@umbc.edu>
- Re: Re: Getting the value of the independent var from the dep.var using NDSolve