Classical RK4: Four Slopes, Weighted 1:2:2:1

Classical RK4 samples the slope across a step

The classical fourth-order Runge-Kutta method advances an initial-value problem with four slope evaluations. It starts with the slope at the known point, evaluates two slopes at provisional midpoint states, evaluates a final slope at a provisional endpoint, and combines them with the characteristic one-two-two-one weighting.


The weighted mean approximates how the slope changes during the step more accurately than a single Euler slope or a two-slope corrector.

Each stage has a location and a provisional state

The first stage uses the known time and state. The next two stages evaluate the right-hand side at midpoint time and at a state obtained from the original state by a half-step along the preceding stage.


The final stage evaluates at endpoint time and at a state obtained from the original state by a full step along the third stage. The word original matters: stages are not a sequence of permanent partial advances.


For a nonautonomous equation, both the time and the state supplied to every stage must be updated.


Omitting the time advance may pass unnoticed for an equation whose right-hand side depends only on the state, but it changes the answer when time appears explicitly.


For a system, every stage is a vector and every component uses the same provisional vector state.

The update and its checks

The final change is the step size times the weighted average of the four stage slopes. The midpoint slopes receive double weight; the weights together normalize to one average after division by their total.


A constant derivative is a quick check: every stage is the same, so the method must advance by exactly the derivative times the step. A formula that omits the normalization fails this check immediately.

What fourth order means

For smooth problems and sufficiently small fixed steps, the global error of classical RK4 scales with the fourth power of the step size.


A proportional decrease in step size therefore gives a much larger reduction in leading error than it does for a lower-order method.


This is an asymptotic comparison: it does not independently establish stability, control rounding error, or replace checking convergence by repeating a calculation at a smaller step.


When solving an oscillator as a first-order system, write position and velocity as one state vector. Applying the same RK4 construction to that vector preserves the coupling between components.


Updating position with an old velocity while updating velocity by a separate ad hoc rule is not RK4 for the system and destroys the method's error guarantee.

After computing the four stage slopes k1, k2, k3, k4 of the classical fourth-order Runge–Kutta method, how is yn+1 formed?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

For y′ = t + 2y, y(0) = 1, one RK4 step with h = 0.2 begins with k1 = 2. What is k2?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

Apply one step of the classical RK4 method with h = 0.5 to y′ = y − t, y(0) = 2. Give y1 ≈ y(0.5) to four decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors