Re: Getting the value of the independent var from the dep.var using NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg63937] Re: Getting the value of the independent var from the dep.var using NDSolve
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Tue, 24 Jan 2006 01:30:23 -0500 (EST)
- Organization: Uni Leipzig
- References: <dptd4r$be$1@smc.vnet.net><dq2rgc$n0o$1@smc.vnet.net> <dqsohb$bui$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, a) the most initial value solvers have the desired accuracy only on the points that are calculated explicit b) you must interpolate between two succesive values one for y[x]-1< 0 and y[x]-1>0 and try to locate the zero-crossing but typical the accuracy would be low Regards Jens "Borut Levart" <BoLe79 at gmail.com> schrieb im Newsbeitrag news:dqsohb$bui$1 at smc.vnet.net... | 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? |