DifferentialEquations.jl Documentation
DifferentialEquations.jl is a package for numerically solving differential equations using the various components of JuliaDiffEq. The purpose of this package is to supply efficient Julia implementations of solvers for various differential equations. Equations within the realm of this package include ordinary differential equations (ODEs), stochastic ordinary differential equations (SODEs or SDEs), stochastic partial differential equations (SPDEs), partial differential equations (with both finite difference and finite element methods), differential algebraic equations (DAEs), and differential delay equations (DDEs). The well-optimized DifferentialEquations solvers benchmark as the fastest Julia implementations, using classic algorithms and ones from recent research, and include algorithms optimized for high-precision and HPC applications. It integrates with the Julia package sphere, for example using Juno's progress meter, automatic plotting, built-in interpolations, and wraps other differential equation solvers so that many different methods for solving the equations can be accessed by simply switching a keyword argument. It utilizes Julia's generality to be able to solve problems specified with arbitrary number types (types with units like Unitful, and arbitrary precision numbers like BigFloats and ArbFloats), arbitrary sized arrays (ODEs on matrices), and more. This gives a powerful mixture of speed and productivity features to help you solve and analyze your differential equations faster.
If you have any questions, or just want to chat about solvers/using the package, please feel free to use the Gitter channel. For bug reports, feature requests, etc., please submit an issue. If you're interested in contributing, please see the Developer Documentation.
Supporting and Citing
The software in this ecosystem was developed as part of academic research. If you would like to help support it, please star the repository as such metrics may help us secure funding in the future. If you use JuliaDiffEq software as part of your research, teaching, or other activities, we would be grateful if you could cite our work. Please see our citation page for guidelines.
Using the Package
To install the package, use the following command inside the Julia REPL:
Pkg.add("DifferentialEquations")
To load the package, use the command:
using DifferentialEquations
To understand the package in more detail, check out the following tutorials in the manual. Example IJulia notebooks can be found in DiffEqTutorials.jl. If you find any example where there seems to be an error, please open an issue.
For the most up to date information on using the package, please join the Gitter channel.
Using the bleeding edge for the latest features and development is only recommended for power users. Information on how to get to the bleeding edge is found in the developer documentation.
Supported Equations
For PDEs, one can optionally specify a noise equation. The solvers currently have stochastic variants for handling Gaussian Space-time white noise SPDEs.
Ordinary Differential Equations (ODEs)
Stochastic Differential Equations (SDEs)
Algebraic Differential Equations (DAEs)
Delay Differential Equations (DDEs)
(Stochastic) Partial Differential Equations ((S)PDEs):
Linear Poisson Equation
Semi-linear Poisson Equation
Linear Heat Equation
Semi-linear Heat Equation (aka Reaction-Diffusion Equation)
Stationary Stokes Equation
For help with choosing a solver algorithm, please see the solver options pages.
IJulia Notebook Tutorials
You can access extra tutorials supplied in the DiffEqTutorials.jl repository. If you have IJulia installed, you can view them locally and interactively, by cloning the repository:
Pkg.clone("https://github.com/JuliaDiffEq/DiffEqTutorials.jl")
using IJulia
notebook(dir = Pkg.dir("DiffEqTutorials"))
Tutorials
The following tutorials will introduce you to the functionality of DifferentialEquations.jl. More examples can be found by checking out the IJulia notebooks in the examples folder.
- Ordinary Differential Equations
- Stochastic Differential Equations
- Delay Differential Equations
- Differential Algebraic Equations
- Poisson Equation Finite Element Method
- Heat Equation Finite Element Method
- Stochastic Finite Element Method
Basics
These pages introduce you to the core of DifferentialEquations.jl and the common interface. It explains the general workflow, options which are generally available, and the general tools for analysis.
- Overview of DifferentialEquations.jl
- Defining Problems
- Solving the Problems
- Analyzing the Solution
- Add-on Tools
- Development and Testing Tools
- Common Solver Options
- Default Algorithm Hinting
- Output Control
- Stepsize Control
- Miscellaneous
- Progress Monitoring
- User Data
- Error Calculations
- Solution Handling
- Plot Functions
- Integrator Interface
Equation Types
These pages describe building the problem types to define differential equations for the solvers, and the special features of the different solution types.
- ODE Types
- Mathematical Specification of an ODE Problem
- Problem Type
- Special Solver Options
- Special Solution Fields
- Example Problems
- SDE Types
- Mathematical Specification of a SDE Problem
- Problem Type
- Noise Processes
- Special Solver Options
- Special Solution Fields
- Example Problems
- DDE Types
- Mathematical Specification of a DDE Problem
- Problem Type
- Special Solver Options
- Special Solution Fields
- DAE Types
- Mathematical Specification of an DAE Problem
- Problem Type
- Special Solver Options
- Special Solution Fields
- Example Problems
- FEM Types
- Stokes Types
Solver Algorithms
These pages describe the solvers and available algorithms in detail.
- ODE Solvers
- Recommended Methods
- Full List of Methods
- List of Supplied Tableaus
- Solver Compatibility and Defaults Chart
- SDE Solvers
- DDE Solvers
- DAE Solvers
- FEM Poisson Solvers
- FEM Heat Solvers
- Stokes Solvers
Additional Features
These sections discuss extra performance enhancements, event handling, and other in-depth features.
- Performance Overloads
- Event Handling and Callback Functions
- Introduction to Callback Functions
- The Callback Types
- Using Callbacks
- DiscreteCallback Examples
- ContinuousCallback Examples
- Callback Library
- Parallel Monte Carlo Simulations
- Meshes
- Output Specification
- Availability
- Continuous (Dense) Output
- Choosing Intermediate Locations for the Solution
- Manually Turning on the Calculation
- Timeseries Specifications
- Juno Progress Bar Integration
Analysis Tools
Because DifferentialEquations.jl has a common interface on the solutions, it is easy to add functionality to the entire DiffEq ecosystem by developing it to the solution interface. These pages describe the add-on analysis tools which are available.