Home

RK4

RK4 refers to the classical Runge-Kutta 4th-order method, an explicit single-step technique for solving initial value problems of ordinary differential equations dy/dt = f(t, y) with a given starting value y(t0) = y0. The method advances a solution from t_n to t_{n+1} = t_n + h by computing four intermediate slopes, or stages, and then forming a weighted average to update the solution.

The standard procedure uses the following stages:

- k1 = f(t_n, y_n)

- k2 = f(t_n + h/2, y_n + (h/2) k1)

- k3 = f(t_n + h/2, y_n + (h/2) k2)

- k4 = f(t_n + h, y_n + h k3)

The next value is then y_{n+1} = y_n + (h/6)(k1 + 2k2 + 2k3 + k4). This yields a fourth-order accurate

RK4 is explicit, requires four evaluations of f per step, and is widely used for its balance

approximation,
with
local
truncation
error
on
the
order
of
h^5
and
a
global
error
of
order
h^4.
of
accuracy
and
computational
effort.
It
is
generally
stable
for
non-stiff
problems,
but
like
other
explicit
methods,
it
is
not
suitable
for
stiff
systems
without
very
small
time
steps.
In
practice,
RK4
is
often
used
with
fixed
step
sizes
for
simplicity,
or
with
adaptive
schemes
that
estimate
error
to
adjust
h.
It
belongs
to
the
wider
family
of
Runge-Kutta
methods
and
is
commonly
used
as
a
reference
point
for
comparing
higher-order
or
adaptive
integrators.