Raymond Toy <toy.raymond at gmail.com> writes:
> On 10/5/11 4:17 PM, Edwin Woollett wrote:
>> Using my prev. message code for nint, which will
>> call quad_qags for this example, I get results which
>> agree with Mma's pdf tutorial on advanced numerical
>> integration
>> (http://www.wolfram.com/learningcenter/tutorialcollection/AdvancedNumericalIntegrationInMathematica/)
>>
>>
>> for the integrand (p. 2, pdf 5)
>>
>> (x-2)^2 * sin (4000*x),
>> over the interval (x,2,3) by using the default epsabs=0.0,
>> epsrel = 1.0e-8, so only epsrel plays a role, but I get
> I don't think that's true. If you set epsabs to 0, then you are telling
> quadpack that you want to get an absolute error of 0. I don't recall
> how epsabs and epsrel interact, though.
It's explained at the top of dqags.f:
C***PURPOSE The routine calculates an approximation result to a given
C Definite integral I = Integral of F over (A,B),
C Hopefully satisfying following claim for accuracy
C ABS(I-RESULT).LE.MAX(EPSABS,EPSREL*ABS(I)).
So Edwin is correct. If EPSABS is 0 then only EPSREL plays a role, and
vice versa.
Best,
Mark