Next: Example Code
Up: The Fourth-Order Runge-Kutta Method
Previous: Example Code
In order to assess the accuracy of numerical integration,
and possibly adjust the stepsize so as to maintain
the requested accuracy employ step doubling:
- 1.
- take the step twice
- (a)
- once as a full step, leading to
- (b)
- then as two half steps, leading to

- 2.
- Estimate the truncation error by
- 3.
- Return
as an answer, because that's
going to be the more accurate one.
- 4.
- Since
assuming that we try two different values of
we should have:
This yields the following formula for a step size:
 |
(4.78) |
- Strategy
- Let
be the requested
accuracy.
- If
equation (4.84) tells
us how much to reduce the stepsize
when we repeat the failed
step.
- If
equation (4.84) tells
us how much we can stretch the stepsize
for the next step.
Next: Example Code
Up: The Fourth-Order Runge-Kutta Method
Previous: Example Code
Zdzislaw Meglicki
2001-02-26