6.5 Rate of Convergence
149
Clearly, when
h =
b − a
n
,
(n sub-intervals of equal size h for an integration interval [a, b]), an alternative
expression for E follows from
E = Kh
r ,
(6.22)
= K
b − a
n
r
,
(6.23)
= K (b − a)
r
1
n
r
,
(6.24)
which, by introducing another constant C = K (b − a)
r , gives
E = Cn
−r .
(6.25)
Convergence Rate for the Trapezoidal and Midpoint Methods Using, for
example, the trapezoidal method, we may carry out some experimental runs with our
test problem
1
0 3t 2 e t 3 dt, doubling n for each run: n = 4, 8, 16. The corresponding
errors are then 12%, 3% and 0.78%, respectively. These numbers indicate that the
error is reduced by roughly a factor 4 when doubling n. Thus, it seems that the error
converges to zero as n −2 , which suggests a convergence rate r = 2. In fact, it can
be shown mathematically that the trapezoidal and the midpoint method both have a
convergence rate r = 2, i.e., they are both second-order methods. Soon, we will see
how this fact (and more) can be exploited in the testing of code.
Remark on the Definition of Convergence Rate
When we later address numerical solution methods for ordinary differential
equations (Chap. 8), convergence rate is essentially defined like in (6.21), we
just switch (not required) the symbol h with Δt (i.e., the spacing between
computed solution values).
However, with iterative methods for the solving of nonlinear algebraic
equations (Chap. 7), convergence rate is defined differently. In that case, one
usually relates the error at an iteration to the error at the previous iteration,
and the convergence rate appears as a parameter in that relation.
Précédent

- 170/350

Suivant