Dormand–Prince Method — Definition, Formula & Example
The Dormand–Prince method is an adaptive Runge–Kutta method for solving differential equations. Each step produces two estimates, one of 5th order and one of 4th order, from the same seven slope evaluations. The gap between them tells the solver whether to shrink or grow the next step.
The Dormand–Prince method (DOPRI5, 1980) is an explicit, 7-stage embedded Runge–Kutta pair of orders 5(4) for . It uses local extrapolation, meaning it advances with the order-5 solution and uses the order-4 solution only to estimate the error. It also has the FSAL (first same as last) property. The 7th stage equals of the next step, so each step after the first costs only 6 new evaluations of .
Key Formula
Where:
- = Stage slopes with nodes ; the weights shown sum to 1
- = Current value and the order-5 value the method keeps
- = Current step size
- = Error estimate , where is the embedded order-4 value
- = Error tolerance you choose
- = Safety factor that keeps the new step slightly conservative
Worked Example
Problem: A DOPRI5 solver takes a step of size and returns an order-5 value and an order-4 value . The tolerance is . Should the step be accepted, which value is kept, and what step size comes next?
Step 1: Estimate the local error from the difference between the two embedded solutions.
Step 2: Since , accept the step. Dormand–Prince keeps the more accurate order-5 value. This is local extrapolation. The final slope is saved as the next step's .
Step 3: The error is far below the tolerance, so the step size grows. The ratio is , and .
Answer: The step is accepted. The solver keeps and tries the next step with , which needs only 6 new evaluations of because of FSAL.
Why It Matters
DOPRI5 is the default nonstiff ODE solver in MATLAB (ode45) and SciPy (solve_ivp with method 'RK45'). Engineers and physics students use it for orbit, circuit, and population models. Knowing how it controls step size helps you pick sensible tolerances and explains why the solver slows down near rapid changes.
Common Mistakes
Mistake: Assuming Dormand–Prince works like Runge–Kutta–Fehlberg and advances with the order-4 value.
Correction: Fehlberg's classic RKF45 advances with the order-4 value. Dormand–Prince chooses coefficients that make the order-5 value accurate and keeps that one. The order-4 value only supplies the error estimate.
