I guess I should show my reasons for my claim.
(%i14) kill(all);
(%o0) done
(%i1) load(defint);
(%o1) "C:/Maxima-5.25.1/share/maxima/5.25.1/src/defint.lisp" new
defint.lisp
(%i2) display2d:false;
(%o2) false
(%i3) integrate(exp(x^n),x,a,b),a=1,b=2,n=5;
(%o3) (gamma_incomplete(1/5,-32)-gamma_incomplete(1/5,-1))/5
(%i4) rectform(float(%));
(%o4) -6.213553389862085E+11*%i-8.5522225476885498E+11
(%i5) quad_qags(exp(x^n),x,a,b),a=1,b=2,n=5;
(%o5) [1.0132394896940184E+12,0.66155076101722,147,0]
(%i6) integrate(exp(x^n),x,a,b),a=-1,b=-2,n=5;
(%o6) -(gamma_incomplete(1/5,1)-gamma_incomplete(1/5,32))/5
(%i7) rectform(float(%));
(%o7) -0.048094074713868
(%i8) quad_qags(exp(x^n),x,a,b),a=-1,b=-2,n=5;
(%o8) [-0.048094074713868,9.9292941840488248E-16,63,0]
(%i9) radexpand;
(%o9) true
(%i10) radexpand:false;
(%o10) false
(%i11) integrate(exp(x^n),x,a,b),a=1,b=2,n=5;
(%o11) (gamma_incomplete(1/5,-32)-gamma_incomplete(1/5,-1))/5
(%i12) rectform(float(%));
(out12) -6.213553389862085E+11*%i-8.5522225476885498E+11
(%i13)
I think the answer should be real in all cases. The integrand is real
valued everywhere.
Rich
-----Original Message-----
From: Richard Hennessy
Sent: Tuesday, January 10, 2012 8:25 PM
To: Edwin Woollett ; maxima mailing list
Subject: Re: [Maxima] new defint.lisp and radexpand:false?
integrate(exp(x^n),x,1,2) for odd n gives wrong result too.
integrate(exp(x^n),x,-2,-1) for odd n seems okay. integrate(exp(x^n),x,a,b)
works for odd n and negative a and b. This might be related to
abs_integrate.mac bug.
https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3471545&group_id=4933
Rich
-----Original Message-----
From: Edwin Woollett
Sent: Thursday, January 05, 2012 5:05 PM
To: maxima mailing list
Subject: new defint.lisp and radexpand:false?
In the git notes
http://maxima.git.sourceforge.net/git/gitweb.cgi?p=maxima/maxima;a=commit;h=883dc433283808ff53d04477c540489273197ea3
for the new version of defint.lisp, Dan Gildea has the comment:
-------------
integrate(exp(sqrt(x^3)),x,0,1) no longer gives correct answer
unless we specify radexpand:false
--------------------------------------
I find (gcl) that the previous version of defint.lisp
gives the correct integral with radexpand : true (default).
-------------------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
(%i1) first(quad_qags(exp(sqrt(x^3)),x,0,1));
(%o1) 1.562394062214541
/* v 5.25.1 defint.lisp and radexpand=true */
(%i2) radexpand;
(%o2) true
(%i3) integrate(exp(sqrt(x^3)),x,0,1);
(%o3) -(sqrt(3)*%i+1)*(gamma(2/3)-gamma_incomplete(2/3,-1))/3
(%i4) expand(float(%));
(%o4) 1.562394062217312-4.4408920985006262E-16*%i
/* ok except for roundoff errors */
----------------------------------------------
When I load in the new version of defint.lisp, and leave radexpand : true
I get an answer, albeit a wrong answer. But if I set radexpand to false,
I only get a noun form.
------------------------------------------------------
(%i5) load("defint-new.lisp");
(%o5) "c:/work2/defint-new.lisp"
(%i6) radexpand;
(%o6) true
/* with new defint.lisp and radexpand=true */
(%i7) integrate(exp(sqrt(x^3)),x,0,1);
(%o7) 2*(gamma(2/3)-gamma_incomplete(2/3,-1))/3
(%i8) expand(float(%));
(%o8) 1.353072948602157*%i-0.78119703110866
/* which is a wrong answer as advertised . */
/* now set radexpand to false */
(%i9) radexpand:false$
(%i10) integrate(exp(sqrt(x^3)),x,0,1);
(%o10) 'integrate(%e^sqrt(x^3),x,0,1)
/* unexpected noun form */
---------------------------------------------------
Ted Woollett
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima