numerics-ode
Research-grade ordinary differential equation (ODE) solvers implemented in pure Rust with zero external dependencies.
Solvers
- Euler — First-order explicit method. Simple but only O(h) accurate.
- RK4 — Classical fourth-order Runge-Kutta. O(h⁴) global error.
- Adams-Bashforth — Second-order two-step explicit multistep method. O(h²).
- Dormand-Prince — Embedded RK4(5) with adaptive step-size control. O(h⁴/⁵).
System support
All solvers support both scalar ODEs (dy/dx = f(x, y) where y: f64)
and systems of ODEs (dy/dx = f(x, &y) where y: Vec<f64>).
Example
use rk4;
let f = ; // dy/dx = y
let = solve;
assert!;