Example
10. Error analysis. The
Runge-Kutta method of order N = 4 allegedly has a Final Global Error
(FGE) of order
. Hence,
the error at the right endpoint should appear to decrease by 1/16
when the number of sub-intervals is doubled. Use the D.E. in exercise
1 and investigate this behavior for m = 15, 30, 60, 120 and 240
sub-intervals of [0,3].
Notice. The subroutine
Runge stores the values in a list starting with
subscript 1 and ending with subscript m+1. We need only check this
last point with the value obtained from the analytic
solution. To explore the error we will need to execute
things in the following order.
Solution 10.
The next two computations might take a while. If you don't want to wait, don't do them.
Does the error decrease in the fashion
? i.e.
should be
,
etc.
Do the following ratios tend to 16 ?
(c) John H. Mathews 2003