NMath User's Guide

TOC | Previous | Next | Index

Chapter 35. Differential Equations (.NET, C#, CSharp, VB, Visual Basic, F#)

NMath provides classes for solving first order initial value differential equations by the Runge-Kutta method.

An ordinary differential equation (ODE) contains one or more derivatives of a dependent variable y with respect to a single independent variable. A first-order ODE contains only the first derivative of y. Since there are generally many functions that satisfy an ODE, an initial value is necessary to constrain the solution—that is, y is equal to y0 at a given initial x0.

NMath includes:

Class FirstOrderInitialValueProblem encapsulates a first order initial value differential equation.

Class RungeKuttaSolver solves an initial value ODE by the common Runge-Kutta method.

Class RungeKutta45OdeSolver solves an initial value ODE using an explicit Runge-Kutta (4,5) formula known as the Dormand-Prince pair.

Class RungeKutta5OdeSolver solves an initial value ODE using a non-adaptive explicit Runge-Kutta formula of order 5.

Class VariableOrderOdeSolver solves stiff and non-stiff ordinary differential equations. The algorithm uses higher order methods and smaller step size when the solution varies rapidly.

The chapter describes how to use class these classes.


Top

Top