"OK, this antiderivative is valid on the reals."
Here is a general antidiff of the real valued function exp(-x^n) that is
valid for all real x, n, (n > about .05 ) (by comparison with quad_qags). I
don't know why it fails for 0 < n <=(about .05 ).
-(gamma_incomplete(1/n,x^n)/n-gamma(1/n)/n)*signum(x);
gammai_test(n, a, b) :=
( _z : _z:-(gamma_incomplete(1/n,x^n)/n-gamma(1/n)/n)*signum(x),
print(" qags = ", first(quad_qags(exp(-x^n),x,a,b)),
" formula = ", float(at(_z,[x=b])-at(_z,[x=a]))))$
display2d:false$
for i : 1 thru 10 do gammai_test(random(10.0)+.5, _h:random(1.0),
random(2.0)+_h);
qags = 0.70997985233956 formula = 0.70997985233956
qags = 0.64248793774255 formula = 0.64248793774255
qags = 0.39405032292301 formula = 0.39405032292301
qags = 0.12849352798637 formula = 0.12849352798637
qags = 0.2383328942369 formula = 0.2383328942369
qags = 0.14758128797191 formula = 0.14758128797191
qags = 0.14207995833076 formula = 0.14207995833076
qags = 0.54953884342554 formula = 0.54953884342554
qags = 0.14493067138495 formula = 0.14493067138495
qags = 0.25412300011431 formula = 0.25412300011431
done
-----Original Message-----
From: Barton Willis
Sent: Sunday, January 01, 2012 9:11 AM
To: rich.hennessy at verizon.net
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] Bug in limit or integrate
----"Richard Hennessy" <rich.hennessy at verizon.net> wrote: -----
>I should not have used the abs() function. This is a simpler answer and it
>does not blow up at zero.
>(gamma(1/4)/4-gamma_incomplete(1/4,x^4)/4)*signum(x);
OK, this antiderivative is valid on the reals. An antiderivative that is
valid on the entire complex plane
is x |-> x*hypergeometric([1/4],[5/4],-x^4). But Maxima is unable to compute
limits of hypergeometric
functions, you are out of luck if you used this antiderivative to try to
compute integrate(exp(-x^4),x,minf,inf).
Some definite integrals of exp(-x^4) are broken:
(%i6) integrate(exp(-t^4),t,0,1);
(%o6) (%i*(gamma(1/4)-gamma_incomplete(1/4,1)))/4
--bw