Example for Adaptive Integration
The program adaptintegr.f90
implements adaptive integration based on the trapezoid rule.
As an example, the function |sin(x)|1/2 is
integrated from 2.5 to 3.5. Note that this function is not
smooth at x=
. The plot
below shows the points which the adaptive algorithm selects
for the integration.
The graph below shows for several input values of the desired error the
actual error and the number of integration points
given by the algorithm.
Note that the actual error behaves in the same way as for
a smooth function and the trapezoid rule, i.e.,
C·(number of integration points)-2
Tobias von Petersdorff ,
tvp@math.umd.edu
Last modified: Sun Apr 6 17:06:03 EDT 1997