Runge-Kutta-Fehlberg Method
(RKF45)
GATEGATEGATEGATEOne way to guarantee accuracy in the solution of an I.V.P. is to solve the
problem twice using step sizes h
and
and compare answers at the mesh points corresponding to the larger step
size.GATEGATEBut this requires a significant amount of computation for the smaller
step size and must be repeated if it is determined that the agreement is not
good enough. The Runge-Kutta-Fehlberg method (denoted RKF45) is one way to try
to resolve this problem.GATEGATEIt has a procedure to determine if the proper step
size h
is being used.GATEGATEAt each step, two different approximations for the solution
are made and compared.GATEGATEIf the two answers are in close agreement, the
approximation is accepted. If the two answers do not agree to a specified
accuracy, the step size is reduced.GATEGATEIf the answers agree to more significant
digits than required, the step size is increased.
GATEGATEGATEGATEEach Runge-Kutta-Fehlberg step requires the
use of the following six values:
GATEGATEGATE
Then an approximation to the solution of the
I.V.P. is made using a Runge-Kutta method of order 4:
GATEGATE
And a better value for the solution is determined using a Runge-Kutta method of
order 5:
The optimal step size sh
can be determined by multiplying the scalar s
times the current step size h.
The scalar s
is
where
is the specified error control tolerance.
Mathematica Subroutine
(Runge-Kutta-Fehlberg Method
RFK45)GATEGATETo compute a numerical
approximation for the solution of the initial value problem
with
over
at a discrete set of points with an error controlGATEGATE .GATEGATEStart
with the initial pointGATEGATE GATEGATEand
generate the sequence of approximationsGATEGATE .GATEGATEThe
step size is automatically adjusted.GATEGATEThus the number
is determined by the subroutine.GATEGATEAt each step the final answer is computed
using the formulaGATEGATEGATE
.GATEGATE
Remark.GATEGATEThe
formula for adjusting the step size is a popular choice for numerical analysis
textbooks.GATEGATE
Remark.GATEGATESome
textbooks are now promoting the use of the RK order five formulaGATEGATE
GATEGATEas
the accepted value instead ofGATEGATE GATEGATEfrom
the order four formula.GATEGATEThe following subroutine includes these adjustments.GATEGATE
GATE
Mathematica Subroutine
(Runge-Kutta-Fehlberg Method
RFK54)GATEGATETo compute a numerical
approximation for the solution of the initial value problem
with
over
at a discrete set of points with an error controlGATEGATE .GATEGATEStart
with the initial pointGATEGATE GATEGATEand
generate the sequence of approximationsGATEGATE .GATEGATEThe
step size is automatically adjusted.GATEGATEGATEThus the number
is determined by the subroutine.GATEGATEAt each step the final answer is computed
using the formula
.GATEGATE
Remark.GATEGATEOne
might question the wisdom of using the RKF54 instead of the RKF45, it is still
being debated.GATEGATEIn some sense the "guarantee" of accuracy is diminished.GATEGATEThe
RKF54 is given for you to explore.
|