Errors in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg69099] Errors in Mathematica*From*: "Chris" <fronsdal at physics.ucla.edu>*Date*: Wed, 30 Aug 2006 06:32:57 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

NDSolve[{P'[x] == Q[x], Q'[x] == 10^(-10) , P[10^(-6)]==0, Q[10^(-6)] == 0, n[x] == Exp[-A[x]] , A'[x] == -A[x]/236, A[10^(-6)]== -.0001}, {P,Q,A,n}, {x, 10^(-6),1000}, MaxSteps rightarrow Infinity] Plot[Evaluate[P[x]/. %], {x,10^(-6), 10}] Here 2 equations link the functions P and Q. Two other equations link the functions n and A. There is no coupling between the two sets, and yet: Note the denominator 236 that appears in the second set. As this number is changed the solution for P[x], and in particular the value P[6] changes. Of course this should not happen. There is a discontinuity between 236 and 237 and another between 274 and 275. After that, further increase has no effect on P[6]. The problem goes away if the small numbers are increased. It also goes away if the exponential function is replaced by unity or some elementary function. If the small numbers are made much smaller it causes Mathematica to shut down. Can anyone tell me how to handle this?