CRAN Task View: Differential Equations

Differential equations (DE) are mathematical equations that describe how a
quantity changes as a function of one or several (independent) variables, often
time or space.
Differential equations play an important role in biology, chemistry, physics,
engineering, economy and other disciplines.

Differential equations can be separated into stochastic versus deterministic
DEs. Problems can be split into initial value problems versus boundary value problems.
One also distinguishes ordinary differential equations from
partial differential equations, differential algebraic equations and delay differential equations.
All these types of DEs can be solved in R.
DE problems can be classified to be either stiff or nonstiff; the former type of problems are
much more difficult to solve.

The
dynamic models SIG
is a suitable mailing list for discussing the use of R for solving differential equation
and other dynamic models such as individual-based or agent-based models.

This task view was created to provide an overview on the topic.
If we forgot something, or if a new package should be mentioned here, please let
us
know.

Stochastic Differential Equations (SDEs)

In a stochastic differential equation, the unknown quantity is a
stochastic process.

The package
sde
provides functions for simulation and inference for
stochastic differential equations. It is the accompanying package to
the book by Iacus (2008).

Package
rpgm
deals about fast simulation especially in Stochastic Differential
Equations (SDE) of Itô type. It integrates the Ziggurat method to simulate Normal random
variables faster than
rnorm, the Brownian motion, the Euler and Milstein schemes,
and the Gaussian Vasicek process. Multi-core support will be provided.

Ordinary Differential Equations (ODEs)

In an ODE, the unknown quantity is a function of a single independent variable.
Several packages offer to solve ODEs.

The "odesolve" package was the first to solve ordinary differential equations in R.
It contained two integration methods. It is not actively maintained and has been replaced by the package
deSolve.

The package
deSolve
contains several solvers for solving ODEs.
It can deal with stiff and nonstiff problems.

The package
deTestSet
contains solvers designed for solving
very stiff equations.

Package
pracma
implements several adaptive Runge-Kutta
solvers such as ode23, ode23s, ode45, or the Burlisch-Stoer algorithm to obtain
numerical solutions to ODEs with higher accuracy.

Package
rODE
(inspired from the book of Gould, Tobochnik and Christian, 2016)
aims to show physics, math and engineering students
how ODE solvers can be made with R's S4 classes.

Delay Differential Equations (DDEs)

In a DDE, the derivative at a certain time is a function of the variable value at a previous time.

The package
PBSddesolve
(originally published as "ddesolve")
includes a solver for non-stiff DDE problems.

Functions in the package
deSolve
can solve both stiff and non-stiff DDE problems.

Partial Differential Equations (PDEs)

PDEs are differential equations in which the unknown quantity is a
function of multiple independent variables. A common classification is
into elliptic (time-independent), hyperbolic (time-dependent and wavelike),
and parabolic (time-dependent and diffusive) equations.
One way to solve them is to rewrite the PDEs as a set of coupled
ODEs, and then use an efficient solver.

The R-package
ReacTran
provides functions for converting the PDEs
into a set of ODEs. Its main target is in the field of ''reactive transport''
modelling, but it can be used to solve PDEs of the three main types.
It provides functions for discretising PDEs on cartesian, polar,
cylindrical and spherical grids.

The package
ReacTran
can solve BVPs that belong to the
class of reactive transport equations.

Other

The
simecol
package provides an interactive environment to
implement and simulate dynamic models.
Next to DE models, it also provides functions for grid-oriented,
individual-based, and particle diffusion models.