MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: solving differential equations

  • To: mathgroup at
  • Subject: [mg3517] Re: [mg3484] solving differential equations
  • From: jpk at (Jens-Peer Kuska)
  • Date: Wed, 20 Mar 1996 02:49:35 -0500
  • Sender: owner-wri-mathgroup at

> Mathgroup,
> I have a system of ODE I wish to solve numerically of the form X'[t] =
> F(X[t])/|F(X[t])| for a given function
>         F : plane -> plane
> and given intial conditions. NDSolve works well on this except where the
> system is ill-behaved, in particular, where F = 0. I can replace this
> system with another one that has equivalent solutions and is usually
> well-behaved where F = 0. However, I don't want to make the replacement
> unless I have to, and only near where F = 0. (I wish to construct a command
> that gives the solution for an inputted function F.)
> Is there any way possible to do this with NDSolve? In other words, as it
> steps along have it check the value of F. If its magnitude ever gets too
> close to 0, have it use the other system.

> Thanks,
> Steve Wilkinson
Hi Steve,

here is the solution for F[x]=Sin[x]

    y'[t]== If[ z=Sin[t]; Abs[z]>$MachineEpsilon, 
            (* then *)
            (*else *)

{{y[t] -> 
       12.5664}, <>][t]}}

   y[t] /. Flatten[sol]],{t,0,4Pi}]

Hope that helps


  • Prev by Date: Re: drawing realizations from a joint PDF
  • Next by Date: Re: Turning image in GraphicsArray 90 degrees
  • Previous by thread: solving differential equations
  • Next by thread: Re: solving differential equations