# How to set the NDSolve method to LSODA

• 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["DifferentialEquationsNDSolveProblems"]. 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.

-

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 NDSolveLSODA  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 ?NDSolveLSODA  The whole issue of these "hidden contexts" in Mathematica could be the topic of an interesting discussion ;-) - ?NDSolveLSODA gives me: Options[NDSolveLSODA]={LinearSolveMethod->Automatic,MaxDifferenceOrder->12} This is rather useful. However, what does NDSolveLSODA 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->NDSolveLSODA]. 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 NDSolveLSODA 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 NDSolveLSODA is defined like this: pastebin.com/0nayVBHP 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 NDSolveLSODA 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",
`