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