The eight equations derived above, together with the three
equations
(
), are the
necessary and sufficient conditions for the RK4 method to have
a 5th order error term
. As there are more parameters
than constraining equations, there exist multiple sets of such
parameters, which can be found by solving the eight simultaneous
nonlinear equations. To do so, we can treat
,
,
and
as parameters and solve the equation system for the
rest of the parameters as the variables (
,
,
,
,
,
,
,
, and
).
Specifically, we first solve equations 2, 3, and 4
for the three variables
and get
 |
(291) |
We then solve the next three equations 5, 6, and 7 for the three
variables defined as
,
, and
:
and get
 |
(292) |
Now the last equation becomes
 |
(293) |
solving which for
we get
 |
(294) |
and
 |
(295) |
Also, as
, we have:
 |
(296) |
Equating this to the expression for
obtained above, we get
 |
(297) |
As
(due to Equation 8), we must have
.
We can now rewrite
,
, and
as
 |
(298) |
and rewrite
,
, and
as:
 |
(299) |
Now we get
 |
(300) |
 |
(301) |
and
 |
(302) |
In summary, we can freely choose
and
(with
),
and then obtain all other parameters by expressions derived above.
Example 2 Let
and
, and we have
 |
(303) |
 |
(304) |
and
 |
(305) |
with
. This is the 3/8-rule RK4.
Example Let
and
, then we have
 |
(306) |
 |
(307) |
and
 |
(308) |
with
. This is a different version of the
3/8-rule of RK4:
 |
(309) |
We also need to consider the special case in which
, and the
results derived above are no longer valid due to the factor
in the denominators of the expressions of many of the parameters derived
above. We need to redevelop the expressions of these parameters. To do so,
we let
, and recall
, and rewrite equations 2, 3, and
4 as
 |
(310) |
Subtracting the second equation from the first, and then the third one
from the second, we get these two equations:
 |
(311) |
from which we get
, i.e.,
is the only value
allowed if they are the same. We now get
 |
(312) |
Next, equations 5, 6, and 7 can be written as:
i.e. |
(313) |
Solving these equations we get
 |
(314) |
i.e.,
 |
(315) |
We therefore get
. As we also have
i.e., |
(316) |
We can now arbitrarily choose any
, and then find
,
,
,
,
,
,
, and
.
Example Let
, then
,
,
,
,
, which are the parameters
of the classical RK4 discussed before. However, if we let
or
, then we get
either of the following two RK4 methods:
 |
(317) |