new defint.lisp bug - was: new defint.lisp and radexpand:false?
Subject: new defint.lisp bug - was: new defint.lisp and radexpand:false?
From: Edwin Woollett
Date: Wed, 11 Jan 2012 10:21:25 -0800
On Jan. 10, 2012, Richard Hennessy wrote:
-------------------------
>integrate(exp(x^n),x,1,2) for odd n gives wrong result too.
-----------------------------------------------------
Here is an example which starts with the current
5.25.1 defint.lisp, resulting in a wrong answer,
then we load in the new improved defint.lisp, which
results in the same wrong answer (as is obvious
since the symbolic definite integral is the same
expression as a function of gamma_incomplete).
---------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
(%i1) radexpand;
(%o1) true
(%i2) quad_qags(exp(x^5),x,1,2);
(%o2) [1.0132394896940184E+12,0.66155076101722,147,0]
(%i3) integrate(exp(x^5),x,1,2);
(%o3) (gamma_incomplete(1/5,-32)-gamma_incomplete(1/5,-1))/5
(%i4) expand(float(%));
(%o4) -6.213553389862085E+11*%i-8.5522225476885498E+11
(%i5) load("defint-new.lisp");
(%o5) "c:/work2/defint-new.lisp"
(%i6) integrate(exp(x^5),x,1,2);
(%o6) (gamma_incomplete(1/5,-32)-gamma_incomplete(1/5,-1))/5
(%i7) expand(float(%));
(%o7) -6.213553389862085E+11*%i-8.5522225476885498E+11
---------------------------------
Ted