Discrete Continuous Variable-Order
Fixed-Step Explicit Not Applicable Fixed-Step Not Applicable
Continuous
Explicit Solvers
Implicit Not Applicable Fixed-Step Not Applicable
Continuous
Implicit Solvers
Variable-Step Explicit Choose a Variable- Variable-Step Single-Order
Step Solver Continuous Versus Variable-
Explicit Solvers Order Continuous
Solvers
Implicit Variable-Step Single-Order
Continuous Versus Variable-
Implicit Solvers Order Continuous
Solvers
Fixed step continuous explicit solver
Solver Integration Technique Order of Accuracy
ode1 Euler's Method First
ode2 Heun's Method Second
ode3 Bogacki-Shampine Formula Third
ode4 Fourth-Order Runge-Kutta Fourth
(RK4) Formula
ode5 Dormand-Prince (RK5) Fifth
Formula
ode8 Dormand-Prince RK8(7) Eighth
Formula
Fixed step continuous implicit solver
• Ode14x – Uses Newton’s method and
extrapolation from the current value to
compute the value of a state at the next time
step
Variable step continuous solver
Variable Step Continuous Explicit
Solver
One-Step Multistep Order of
ODE Solver Method
Method Method Accuracy
ode45 X Medium Runge-Kutta, Dormand-Prince (4,5) pair
ode23 X Low Runge-Kutta (2,3) pair of Bogacki&Shampine
ode113 X Variable, PECE Implementation of Adams-Bashforth-Moutlon
Low to High
ODE Solver Tips on When to Use
ode45 In general, the ode45 solver is the best to apply as a first try for most problems. For this reason, ode45 is
the default solver for models with continuous states. This Runge-Kutta (4,5) solver is a fifth-order method
that performs a fourth-order estimate of the error. This solver also uses a fourth-order “free” interpolant,
which allows for event location and smoother plots.
The ode45 is more accurate and faster than ode23. If the ode45 is computationally slow, your problem
may be stiff and thus in need of an implicit solver.
ode23 The ode23 can be more efficient than the ode45 solver at crude error tolerances and in the presence of
mild stiffness. This solver provides accurate solutions for “free” by applying a cubic Hermite interpolation
to the values and slopes computed at the ends of a step.
ode113 For problems with stringent error tolerances or for computationally intensive problems, the Adams-
Bashforth-Moulton PECE solver can be more efficient than ode45.
Variable Step Continuous Implicit
Solver
One-Step Multistep Order of Solver Reset
ODE Solver Max. Order Method
Method Method Accuracy Method
ode15s X Variable, Low to X X Numerical Differentiation
Medium Formulas (NDFs)
ode23s X Low Second-order, modified
Rosenbrock formula
ode23t X Low X Trapezoidal rule using a
“free” interpolant
ode23tb X Low X TR-BDF2
ODE Solver Tips on When to Use
ode15s ode15s is based on the numerical differentiation formulas (NDFs).NDFs are more
efficient than the backward differentiation formulas (BDFs), which are also known as
Gear's method. The ode15s solver numerically generates the Jacobian matrices. If you
suspect that a problem is stiff, or if ode45 failed or was highly inefficient, try ode15s. As a
rule, start by limiting the maximum order of the NDFs to 2.
ode23s ode23s is based on a modified Rosenbrock formula of order 2. Because it is a one-step
solver, it can be more efficient than ode15s at crude tolerances.
Like ode15s, ode23s numerically generates the Jacobian matrix for you. However, it can
solve certain kinds of stiff problems for which ode15s is not effective.
ode23t The ode23t solver is an implementation of the trapezoidal rule using a “free” interpolant.
Use this solver if your model is only moderately stiff and you need a solution without
numerical damping. (Energy is not dissipated when you model oscillatory motion.)
ode23tb ode23tb is an implementation of TR-BDF2, an implicit Runge-Kutta formula with two
stages. The first stage is a trapezoidal rule step while the second stage uses a backward
differentiation formula of order 2. By construction, the method uses the same iteration
matrix in evaluating both stages. Like ode23s, this solver can be more efficient
than ode15s at crude tolerances.