Subject: how to "fool" Gauss-Kronrod 21-point rule
From: Edwin Woollett
Date: Fri, 13 Apr 2012 15:19:52 -0700
On April 13, 2012, I wrote:
--------------------------------
>Thanks for the example, which my present quadpack wrapper
>does successfully:
> . . . .
-----------------------------
A weird case of quad_qag behavior is that the factored
form of the integrand is treated successfully, but
expanded forms are not (5.26.0gcl, Windows, XMaxima):
----------------------------------
(%i1) display2d:false$
(%i2) e1:4^(-16)/((x - %pi/4)^2 + 16^(-16));
(%o2) 1/(4294967296*((x-%pi/4)^2+1/18446744073709551616))
(%i3) e2:expand(e1);
(%o3) 1/(4294967296*x^2-2147483648*%pi*x+268435456*%pi^2+1/4294967296)
(%i4) quad_qag(e1,x,0,1,3);
(%o4) [3.141592628838887,9.2834360519558821E-9,2201,0]
(%i5) quad_qag(e2,x,0,1,3);
(%o5) quad_qag(1/(4294967296*x^2-2147483648*%pi*x+268435456*%pi^2
+1/4294967296),x,0,1,3,epsrel = 1.0E-8,
epsabs = 0.0,limit = 200)
(%i6) quad_qag(float(e2),x,0,1,3);
(%o6) quad_qag(1/(4.294967296E+9*x^2-6.7465188522610092E+9*x
+2.6493517579460287E+9),x,0,1,3,
epsrel = 1.0E-8,epsabs = 0.0,limit = 200)
-----------------------------------------------------
Is there something about quad_qag internals that I need to
worry about here?
Ted