Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

RK4 (the classical fourth-order Runge-Kutta method)

The most widely used Runge-Kutta method: four slope samples per step, weighted 1-2-2-1, buying two more orders of accuracy than Euler's method for four times the work per step.

RK4 is the four-stage Runge-Kutta method k_1=f(t_n,y_n), k_2=f\!\left(t_n+\tfrac h2,y_n+\tfrac h2k_1\right), k_3=f\!\left(t_n+\tfrac h2,y_n+\tfrac h2k_2\right), k_4=f(t_n+h,y_n+hk_3), y_{n+1}=y_n+\tfrac h6(k_1+2k_2+2k_3+k_4) -- local truncation error O(h^5), global error O(h^4).

Examples

  • Halving h for RK4 shrinks the global error by a factor of 2^4=16 -- far more per halving than Euler's method's own factor of 2.

Read the full section →
Graph settings

Calculator