Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  • I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite automatically for stiff equations when Method -> Automatic. Is there a way to set the Method -> LSODA? I ask because as LSODA switches between Adams' and Gear's method, it should have sub-options to it that I could set (like order etc.)?

  • Under tutorial/NDSolveStiffnessSwitching I encountered Needs["DifferentialEquations`NDSolveProblems"]. What other example problems are available and where can I find documentation on them?

Edit (03/24/2011):

In light of comments made to this post, I'd also refer readers to page 409 of "The Mathematica Guidebook for Numerics". Springer has this book online and can be found here.

share|improve this question
up vote 8 down vote accepted

If you load the package using Needs as shown in the Tutorial and then evaluate $NDSolveProblems you will list a list of names of all the problems included in the package.

I think I can now also answer the first part of the question. The method has to be called as


rather than LSODA (for some reason it is in the NDSolve` context, which suggests that it is not intended for "ordinary users"). To see its options, just evaluate


The whole issue of these "hidden contexts" in Mathematica could be the topic of an interesting discussion ;-)

share|improve this answer
?NDSolveLSODA gives me: Options[NDSolveLSODA]={LinearSolveMethod->Automatic,MaxDifferenceOrder->12} This is rather useful. However, what does NDSolve`LSODA do? Did it load the LSODA method for use? – drN Mar 24 '12 at 15:49
It is itself the name of a method for NDSolve, that is, you use it by evaluating NDSolve[eqn,Method->NDSolve`LSODA]. Whether it will do any good depends of course on eqn. – Andrzej Kozlowski Mar 24 '12 at 16:16
Perhaps it's worth mentioning that the symbol NDSolve`LSODA does not get loaded (and thus cannot be queried) until NDSolve[] is used at least once. – Szabolcs Mar 24 '12 at 16:17
A bit of spelunking shows that NDSolve`LSODA is defined like this: This confirm what @Andrzej said that it is just a method identifier. You can learn about how methods work here (I didn't have time to read this, but it seems like a relevant resource). – Szabolcs Mar 24 '12 at 16:23
More precisely: it can be used as NDSolve`LSODA even the first time but once NDSolve is used, you can call it just LSODA. – Andrzej Kozlowski Mar 24 '12 at 16:25

Does NDSolve[eqn, opts, Method->LSODA] not work? It should, according to this.

The problems seem to be at

FileNameJoin[{$InstallationDirectory, "AddOns", "ExtraPackages", 
  "DifferentialEquations", "NDSolveProblems.m"}]
share|improve this answer
I appreciate the link to the pdf. Thanks! – drN Mar 22 '12 at 22:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.