Given a rule for how fast something changes, how do you predict where it goes? Take a step — but instead of trusting the slope at the start (crude Euler), RK4 samples FOUR slopes across the step and blends them, cancelling the error to fourth order. That’s how orbits, circuits, and weather are simulated. Slide the step size and watch RK4 hug the true curve where Euler drifts.
Runge–Kutta methods integrate an ODE y′=f(x,y) by sampling slopes within each step. Classical RK4 combines four: k₁ at the start, k₂,k₃ at the midpoint, k₄ at the end, yₙ₊₁=yₙ+(h/6)(k₁+2k₂+2k₃+k₄) — cancelling error to O(h⁵) per step (4th-order global), vastly more accurate than Euler’s O(h) for the same step. It (and adaptive variants like RK45/Dormand–Prince) is the default time-stepper for orbits, circuits, chemical kinetics, and games. A fail-loud self-check throws unless RK4 on y′=y reaches e at x=1 to 1e−4. ◆ real numerical methods, node-verified.
Fixed-step RK4 can still blow up on STIFF systems (implicit methods handle those) and error grows over long horizons; real solvers adapt the step. The 4th-order accuracy and the four-slope blend are exact.