ODE Solver (RK4)
Numerically integrate a system of first-order ordinary differential equations dyᵢ/dt = fᵢ(t, y₁…y₄) with the classic fourth-order Runge-Kutta method (RK4). Enter the right-hand sides, initial conditions, step size, and number of steps; the tool prints the trajectory table. Expressions are parsed by a safe recursive-descent parser — no eval. Everything runs locally in your browser.
Equations (dyᵢ/dt = …)
Initial conditions
Integration
Final value
Trajectory
RK4 advances each step with four slope estimates (k₁…k₄) and weights them 1/6, 1/3, 1/3, 1/6 — a fourth-order method with local error O(h⁵) and global error O(h⁴). Halving h cuts the error by roughly a factor of 16. It is exact (to round-off) when the true solution is a polynomial of degree ≤ 4, e.g. dy/dt = t → y = t²/2. Variables in the right-hand sides are t and y1…y4; supported: + − * / ^, parentheses, constants pi/e/tau, and sin cos tan asin acos atan sinh cosh tanh exp ln log sqrt abs sign floor ceil. Pairs with the Calculus Toolkit and Polynomial Interpolation tools. Everything runs locally — nothing leaves your browser.