A common choice of coefficients that satisfies the nonlinear system associated with second-order Runge–Kutta methods is:

a₁ = a₂ = 1/2,  a₃ = 1,  a₄ = f(tₙ, y(tₙ))

These coefficients satisfy all three equations of the system, and inserting them into the general Runge–Kutta formulation leads to the modified Euler method. Ignoring the O(h³) term and replacing the exact value y(tₙ) with its numerical approximation yₙ, we obtain the algorithm below.

Modified Euler Method — Algorithm

Given a time step h, an initial condition (t₀, y₀), and a maximum number of iterations N, proceed as follows:

Predictor: ŷ = yₙ + h f(tₙ, yₙ)

Corrector: yₙ₊₁ = yₙ + (h/2) [ f(tₙ, yₙ) + f(tₙ + h, ŷ ) ]

Update:   tₙ₊₁ = tₙ + h

The values of tₙ₊₁ and yₙ₊₁ are recorded at each step.

Remark

For convenience, the evaluation of yₙ₊₁ is divided into two parts. The intermediate value ŷ corresponds to a single explicit Euler step and serves as a prediction of the solution at tₙ₊₁. The second stage applies a correction using the average of the slopes. This structure is known as a predictor–corrector method.

Example

Consider the differential equation

y′(t) = −y(t) + t + 1

with the initial condition y(0) = 1 and a time step h = 0.1. The function is:

f(t, y) = −y + t + 1

First step

Predictor: ŷ = 1 + 0.1 (−1 + 0 + 1) = 1

Corrector: y₁ = 1 + 0.05 [ (−1 + 0 + 1) + (−1 + 0.1 + 1) ] = 1.005

Second step

Predictor: ŷ = 1.005 + 0.1 (−1.005 + 0.1 + 1) = 1.0145

Corrector: y₂ = 1.005 + 0.05 [ (−1.005 + 0.1 + 1) + (−1.0145 + 0.2 + 1) ] = 1.019025

These values match those obtained using the second-order Taylor method. This equivalence is specific to this example because all higher-order partial derivatives of f(t, y) vanish. In general, the modified Euler and Taylor methods are not identical.

Another widely used second-order Runge–Kutta method is the Midpoint Method, obtained from a different set of coefficients.

آخر تعديل: السبت، 15 نوفمبر 2025، 3:54 AM