Solvers for Initial Value Problems of Differential Equations (ODE, DAE, DDE)
deSolve is a comprehensive R package for solving initial value problems of differential equations. It provides robust numerical solvers for:
The package can be used in scientific computing, ecological modeling, pharmacokinetics, and many other fields requiring numerical integration of dynamic systems.
Stable version from CRAN (recommended)
install.packages("deSolve")
Development version from Github (unstable)
# install.packages("remotes")
remotes::install_github("tpetzoldt/deSolve")
library(deSolve)
## Chaos in the Atmosphere
Lorenz <- function(t, state, parameters) {
with(as.list(c(state, parameters)), {
dX <- a * X + Y * Z
dY <- b * (Y - Z)
dZ <- -X * Y + c * Y - Z
list(c(dX, dY, dZ))
})
}
parameters <- c(a = -8/3, b = -10, c = 28)
state <- c(X = 1, Y = 1, Z = 1)
times <- seq(0, 100, by = 0.01)
out <- ode(y = state, times = times, func = Lorenz, parms = parameters)
plot(out)
deSolve is Free and Open Source Software, released under the GPL 2.0 or GPL 3.0 license.
For comprehensive documentation and tutorials, visit:
If you use deSolve in your research, please cite:
Soetaert, K., Petzoldt, T., and Setzer, R. W. (2010). Solving Differential Equations in R: Package deSolve. Journal of Statistical Software, 33(9), 1-25. https://doi.org/10.18637/jss.v033.i09
This is the active development repository for deSolve. Previous development occured on R-Forge at http://desolve.r-forge.r-project.org/
Thomas & Karline 2026-02-04