Maintainer: | Karline Soetaert, Thomas Petzoldt |

Contact: | karline.soetaert at nioz.nl |

Version: | 2021-06-18 |

URL: | https://CRAN.R-project.org/view=DifferentialEquations |

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)
**

- The package sde provides functions for simulation and inference for stochastic differential equations. It is the accompanying package to the book by Iacus (2008).
- The package pomp contains functions for statistical inference for partially observed Markov processes.
- Packages adaptivetau and GillespieSSA implement Gillespie's "exact" stochastic simulation algorithm (direct method) and several approximate methods.
- The package Sim.DiffProc provides functions for simulation of ItÃ´ and Stratonovitch stochastic differential equations.

**
Ordinary Differential Equations (ODEs)
**

- The "odesolve" package was the first to solve ordinary differential equations in R. It contained two integration methods. It has been replaced by the package deSolve.
- The package deSolve contains several solvers for solving ODE, DAE, DDE and PDE. It can deal with stiff and nonstiff problems.
- The package odeintr generates and compiles C++ ODE solvers on the fly using Rcpp and Boost odeint .
- 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.
- Package sundialr provides a way to call the 'CVODE' function from the 'SUNDIALS' C ODE solving library. The package requires the ODE to be written as an 'R' or 'Rcpp' function.
- The package mrgsolve compiles ODEs on the fly and allows shorthand prescription dosing.
- The package RxODE is similar to mrgsolve, but has the added value of being the backend of the nonlinear mixed effects modeling R package nlmixr.

**
Delay Differential Equations (DDEs)
**

- The dde package implements solvers for ordinary (ODE) and delay (DDE) differential equations, where the objective function is written in either R or C. Suitable only for non-stiff equations. Support is also included for iterating difference equations.
- 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)
**

- 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 deSolve contains dedicated solvers for 1-D, 2-D and 3-D time-varying ODE problems as generated from PDEs (e.g. by ReacTran).
- The package rootSolve contains optimized solvers for 1-D, 2-D and 3-D algebraic problems generated from (time-invariant) PDEs. It can thus be used for solving elliptic equations.

**
Differential Algebraic Equations (DAEs)
**

- The package deSolve provides two solvers, that can handle DAEs up to index 3.

**
Boundary Value Problems (BVPs)
**

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

**
Population ODE modeling
**

**
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.
- In the package FME are functions for inverse modelling (fitting to data), sensitivity analysis, identifiability and Monte Carlo Analysis of DE models.
- The package nlmeODE has functions for mixed-effects modelling using differential equations.
- mkin provides routines for fitting kinetic models with one or more state variables to chemical degradation data.
- Package dMod provides functions to generate ODEs of reaction networks, parameter transformations, observation functions, residual functions, etc. It follows the paradigm that derivative information should be used for optimization whenever possible.
- The package CollocInfer implements collocation-inference for continuous-time and discrete-time stochastic processes.
- Root finding, equilibrium and steady-state analysis of ODEs can be done with the package rootSolve.
- The PBSmodelling package adds GUI functions to models.
- Package cOde supports the automatic creation of dynamically linked code for packages deSolve (or a built-in implementation of the sundials cvode solver) from inline C embedded in the R code.
- Package rodeo is an object oriented system and code generator that creates and compiles efficient Fortran code for deSolve from models defined in stoichiomatry matrix notation.
- Package ecolMod contains the figures, data sets and examples from a book on ecological modelling (Soetaert and Herman, 2009).

- adaptivetau
- cOde
- CollocInfer
- dde
- deSolve (core)
- dMod
- ecolMod
- FME
- GillespieSSA
- mkin
- mrgsolve
- nlmeODE
- nlmixr
- odeintr
- PBSddesolve
- PBSmodelling
- pomp
- pracma
- ReacTran
- rODE
- rodeo
- rootSolve (core)
- RxODE
- sde (core)
- Sim.DiffProc
- simecol
- sundialr

- CRAN Task View: ChemPhys
- CRAN Task View: Econometrics
- CRAN Task View: Environmetrics
- CRAN Task View: Optimization
- CRAN Task View: Pharmacokinetics
- Wikipedia: Differential equation
- R-Forge website for package deSolve
- R-Forge website for package pomp
- Book: Iacus, SM. 2008. Simulation and Inference for Stochastic Differential Equations: with R examples, Springer
- Book: Soetaert, K. and P.M.J. Herman, 2009. A Practical Guide to Ecological Modelling, using R as a simulation Platform, Springer.
- Book: Stevens, H, 2009. A Primer of Ecology with R, Springer.
- Book: Soetaert, K., Cash, J. and Mazzia, F. 2012. Solving Differential Equations in R, Springer.