Question: Get the value of independent variable where numerical integration stopped

 

Hello,

When doing a numerical solution to ODE using dsolve, I specify a ranges where I want the solution. Often time, I know that the solution only exist somewhere inside that range, for example, I often looking for valid solution where f(x) >= 0, and the numerical integration would fail beyond certain x. But I don't know what x is, so I just specify a range (by guessing) that contains x.

Maple / dsolve then would give an error like:

Warning, cannot evaluate the solution further left of 1648485.7, probably a singularity
          [r = proc(r)  ...  end;, P(r) = proc(r)  ...  end;,

            rho(r) = proc(r)  ...  end;, u(r) = proc(r)  ...  end;]
 

which is fine. Now I now that the limit of some function is at x = 1648485.7. My question is, how do I extract that number (in this case: 1648485.7) programatically ?

Thanks.

 

Please Wait...