LSODA, Ordinary Differential Equation Solver for Stiff or Non-Stiff System. LSODA, written jointly with L. R. Petzold, solves systems dy/dt = f with a dense or banded Jacobian when the problem is stiff, but it automatically selects between nonstiff (Adams) and stiff (BDF) methods. It uses the nonstiff method initially, and dynamically monitors data in order to decide which method to use. The LSODA source is commented extensively to facilitate modification. Both a single-precision version and a double-precision version are available