Consider the Taylor expansion:
In the fourth order Runge-Kutta method four estimates of
are made (one at the start of the interval, one at the end, and two in
the middle).
Taking a weighted mean of these four cancels higher order terms up to
order
so that
Thus
is a much more accurate estimate
of
than the
of the Euler method.
Efficient Runge-Kutta integrators incorporate adaptive step size control.
The step size is varied in different parts of the problem.
To understand the need for this consider the problem of calculating the flight
of a spacecraft from the Earth to Venus. In the depths of interplanetary
space the driving force (the gravitational potential gradients of Earth,
Venus and the Sun) varies relatively slowly and a relatively large step
size can be used. In the neighbourhood of the planets a relatively small step
size is required to achieve the same accuracy. However if this small step
size is used for the whole flight the calculation will be unnecessarily long.