On Mar. 27, I wrote:
----------------------------
>If I use quad_qags or quad_qag to integrate over
>an interval [-n, n] an error message results,
>changing to interval (-n, n+1) makes the error
>message (and error number = 2) go away.
-------------------------------
Clearly the example I used can be blamed on
using an odd function sin(x), the correct
answer over [-n,n] being exactly zero,
and quadpack has trouble dealing with
an odd function over such an interval.
For the purposes of a quadpack wrapper, which
should give a reliable answer for an arbitrary
integrand, integrating sin(x) over [-n,n] should
be a possible task, even if mathematically it
looks like wasted effort to use quadpack.
Are there other examples in which quadpack
has troubles when a) the integrand is *not*
odd, but, b) the answer should be exactly
zero?
To detect an odd function for a complicated function
symbolically might not always be possible, but
perhaps numerical sampling would be enough?
Ted