Background for
Romberg Integration. To
approximate the integral by
generating a table of approximations, and using as
the final answer.
The approximations are
stored in a special lower triangular matrix. The elements of
the first column are computed using the sequential trapezoidal rule
based on subintervals
of ; then
is computed using Romberg's rule.
Elements of row j are .
The algorithm is terminated when .
The subroutine Romberg is "dynamic" in the following sense. At the
start, we initialize the array with the command
and it contains one row and one element , in
which we place one element . Next,
the increment command, is
used to make ,
and the Append command, , is
invoked which adds a second row to ,
which is initialized with zeros, . Then
the TrapRule subroutine is called to perform the sequential trapezoidal rule and
fill in the first entry and
Romberg's rule is used to fill in the second entry . And
so it goes, the sequential trapezoidal rule is used to fill in the first entry
in succeeding rows and Romberg's rule fills in rest of the entries in that
row. The algorithm is terminated when .
Mathematica Subroutine (Romberg Integration).
|