4
$\begingroup$

I am looking into the documentation of NDSolve[]; more precisely how this function chooses the StepSize and how it chooses which method to use.


Regarding StepSize control, it reads

NDSolve adapts its step size so that the estimated error in the solution is just within the tolerances specified by PrecisionGoal and AccuracyGoal.

Question: How? Does it use an adaptive step size similar to this one for instance?


Regarding method choice, it reads

NDSolve typically solves differential equations by going through several different stages depending on the type of equations. With Method->{s1->m1, s2->m2, ...} stage is handled by method . The actual stages used and their order are determined by NDSolve, based on the problem to solve.

and also

Possible explicit time integration settings for the Method option include: [Adams, BDF, etc]

with various submethods and options. A good tutorial about method choice and stiffness detection is found here.

Questions:

  1. What is the default method choice in NDSolve? (I am guessing it will start by ExplicitRungeKutta, seeing as it is the most robust from what I've been reading, but then which?)
  2. Regarding stiffness detection and method choice upon stiffness finding, I found this page that refers "Explicit modified midpoint, double-harmonic sequence, linearly implicit Euler, and sub-harmonic sequence" as possible methods. In that same page, I found how those methods seem to compute stability of the model, and use it to determine whether it should use a stiff/non-stiff method. Yet, what is again the default order of choice for those methods?

Thank you for your insight.

$\endgroup$
  • 4
    $\begingroup$ As noted here, NDSolve[] uses a multistep method by default (LSODA) for ODEs; it uses Adams methods for nonstiff equations, and Gear methods for stiff equations. Of course, all the methods have different procedures for choosing stepsize; you might want to look at the books of Hairer/Nørsett/Wanner for more details on the methods implemented in Mathematica. $\endgroup$ – J. M. will be back soon May 29 '13 at 10:49
  • 3
    $\begingroup$ Have you had a look at the complete tutorial Advanced Numerical Differential Equation Solving in Mathematica? I believe your questions are being answered there albeit it may take some reading time. $\endgroup$ – gwr May 29 '13 at 10:51
  • $\begingroup$ Thanks @J.M. and gwr, I'll give a look into your links $\endgroup$ – Sosi May 29 '13 at 10:53
  • $\begingroup$ @gwr: +1 for that comment, but then -- do you know someone who did read the complete tutorial (and of course the updates for every version)? :-) $\endgroup$ – Albert Retey May 29 '13 at 13:16
  • $\begingroup$ @Albert: Certainly not. But how many people will have read through the books by Hairer et al. - of which I spot at least three? ;-) $\endgroup$ – gwr May 29 '13 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.