Ordinary Differential Equations

This chapter describes functions for solving ordinary differential equation (ODE) initial value problems. The library provides a variety of low-level methods, such as Runge-Kutta and Bulirsch-Stoer routines, and higher-level components for adaptive step-size control. The components can be combined by the user to achieve the desired solution, with full access to any intermediate steps.

Contents:

  1. Classes for ODE solver

  2. Class Descriptions

    1. GSL::Odeiv::System : Defining the ODE System

    2. GSL::Odeiv::Step : Stepping Algorithms

    3. GSL::Odeiv::Control : Adaptive Step-size Control

    4. GSL::Odeiv::Evolve : Evolution

    5. GSL::Odeiv::Solver : Higher level interface

  3. Examples

Classes for ODE solver



Class Descriptions

System






Step

The lowest level components are the stepping functions which advance a solution from time t to t+h for a fixed step-size h and estimate the resulting local error.






Control







Evolve

The higher level of the system is the GSL::Evolve class which combines the results of a stepper and controler to reliably advance the solution forward over an interval (t_0, t_1). If the controler signals that the step-size should be decreased the GSL::Evolve object backs out of the current step and tries the proposed smaller step-size. This process is continued until an acceptable step-size is found.





Solver

This is the highest level interface to solve ODE system, which contains System, Step, Control, and Evolve classes.






Example

The following program solves the second-order nonlinear Van der Pol oscillator equation, as found in the GSL manual, x“(t) + mu x'(t) (x(t)^2 - 1) + x(t) = 0,

This can be converted into a first order system suitable for use with the routines described in this chapter by introducing a separate variable for the velocity, y = x'(t),

prev next

Reference index top