100% Client-Side Engine
Differential Equations Lab & Slope Fields
Ordinary Differential Equations (ODEs) model physical systems in mechanics, electrical circuits, fluid dynamics, population ecology, and financial systems. Explore our interactive 2D slope field visualizer, Runge-Kutta solvers, trajectory tables, and step-by-step mathematical explanations below.
O(h) Explicit
Euler Method
Single-step tangent slope iteration y_(k+1) = y_k + h·f(x, y).
O(h²) Predictor
Modified Euler Method
Average slope predictor-corrector ODE step solver.
O(h²) Predictor
Heun's Method
2nd-order Trapezoidal predictor-corrector method.
O(h²) RK2
Runge-Kutta 2nd Order (RK2)
Midpoint slope evaluation delivering 2nd-order accuracy.
O(h⁴)
Runge-Kutta 4th Order (RK4)
Industry standard 4-stage Runge-Kutta algorithm with O(h⁴) accuracy.
ODE Numerical Solver Comparison Matrix
| Method | Order of Accuracy | Evaluations / Step | Stability | Key Advantage |
|---|---|---|---|---|
| Euler Method | O(h) | 1 slope per step | Conditional (Requires small h) | Simplest explicit single-step ODE solver. |
| Modified Euler Method | O(h²) | 2 slopes per step | Moderate | Uses average slope for improved accuracy. |
| Heun's Method | O(h²) | 2 slopes per step | Moderate | 2nd-order predictor-corrector accuracy. |
| Runge-Kutta 2nd Order (RK2) | O(h²) | 2 slopes per step | Good | Midpoint slope evaluation delivers 2nd-order accuracy. |
| Runge-Kutta 4th Order (RK4) | O(h⁴) | 4 slopes per step | Excellent | Workhorse industry standard; optimal balance of speed and high accuracy. |