The adaptive Simpson's rule for quadrature uses the two subroutines "Simpson"
and "Adapt."The program is "recursive".There is no brake available if
something goes wrong, i.e. if a pathological "bad" function is thrown it's way
it may proceed on a slippery path of infinite recursion.
Mathematica Subroutines (Adaptive Simpson's Rule).
Execute the following Mathematica subroutine, which is the "long
version" of the subroutine we have been using previously.
|