Menu

#2781 integral triggers error on ECL+abs_integrate

None
closed
nobody
None
5
2014-07-27
2014-07-10
Nils Bruin
No

in http://trac.sagemath.org/ticket/16643 we found:

Maxima 5.33.0 http://maxima.sourceforge.net
using Lisp ECL 12.12.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) display2d: false;

(%o1) false
(%i2) load(abs_integrate);

(%o2) "/usr/local/sage/sage-git/local/share/maxima/5.33.0/share/contrib/integration/abs_integrate.mac"
(%i3) f: diff((tan(x)+x)*exp(tan(x)),x);

(%o3) %e^tan(x)*sec(x)^2*(tan(x)+x)+%e^tan(x)*(sec(x)^2+1)
(%i4) integrate(f,x);

Maxima encountered a Lisp error:

 In function CAR, the value of the first argument is
  0
which is not of the expected type LIST

The bug is dependent on abs_integrate. Furthermore, the bug doesn't manifests itself in Maxima 5.30 on SBCL (but SBCL does complain about stylistic errors upon loading abs_integrate)

Discussion

  • Kris Katterjohn

    Kris Katterjohn - 2014-07-14

    I see the same thing with SBCL and Clisp using git HEAD:

    (%i1) build_info();
    (%o1)
    Maxima version: "branch_5_33_base_149_g1a9bc94"
    Maxima build date: "2014-07-13 11:34:44"
    Host type: "x86_64-unknown-linux-gnu"
    Lisp implementation type: "SBCL"
    Lisp implementation version: "1.2.0.debian"
    (%i2) load(abs_integrate)$
    STYLE-WARNING: redefining MAXIMA::OPAPPLY in DEFMACRO
    STYLE-WARNING: redefining MAXIMA::OPCONS in DEFMACRO
    (%i3) f: diff((tan(x)+x)*exp(tan(x)),x)$
    (%i4) integrate(f,x);

    Maxima encountered a Lisp error:

    The value 0 is not of type LIST.

    (%i1) build_info();
    (%o1)
    Maxima version: "branch_5_33_base_149_g1a9bc94"
    Maxima build date: "2014-07-13 11:34:43"
    Host type: "x86_64-unknown-linux-gnu"
    Lisp implementation type: "CLISP"
    Lisp implementation version: "2.49 (2010-07-07) (built 3611082867) (memory 3614258085)"
    (%i2) load(abs_integrate)$
    WARNING: DEFUN/DEFMACRO: redefining macro OPAPPLY in /media/disk1part7/maxima/maxima-code/share/fourier_elim/fourier_elim.lisp, was defined in
    /media/disk1part7/maxima/maxima-code/share/to_poly_solve/to_poly.lisp
    WARNING: DEFUN/DEFMACRO: redefining macro OPCONS in /media/disk1part7/maxima/maxima-code/share/fourier_elim/fourier_elim.lisp, was defined in
    /media/disk1part7/maxima/maxima-code/src/binary-clisp/nummod.fas
    (%i3) f: diff((tan(x)+x)*exp(tan(x)),x)$
    (%i4) integrate(f,x);
    Maxima encountered a Lisp error:

    CAR: 0 is not a list

     
  • Aleksas

    Aleksas - 2014-07-15

    (%i1) f: diff((tan(x)+x)exp(tan(x)),x);
    (%o1) %e^tan(x)
    sec(x)^2(tan(x)+x)+%e^tan(x)(sec(x)^2+1)
    (%i2) S:'integrate(f,x);
    (%o2) integrate(%e^tan(x)sec(x)^2(tan(x)+x)+%e^tan(x)(sec(x)^2+1),x)
    (%i3) changevar(S, y=tan(x), y, x);
    solve: using arc-trig functions to get a solution.
    Some solutions will be lost.
    (%o3) integrate(((y^2+1)
    %e^yatan(y)+(y^3+y^2+y+2)%e^y)/(y^2+1),y)
    (%i4) ev(%, nouns);
    (%o4) %e^yatan(y)+y%e^y
    (%i5) sol:ev(%,y=tan(x)),triginverses=all;
    (%o5) %e^tan(x)tan(x)+x%e^tan(x)
    (%i6) wxbuild_info()$
    wxMaxima version: 13.4.0
    Maxima version: 5.31.2
    Maxima build date: 2013-10-07 23:05:06
    Host type: i686-pc-mingw32
    Lisp implementation type: GNU Common Lisp (GCL)
    Lisp implementation version: GCL 2.6.8

    best

    Aleksas D

     
  • Rupert Swarbrick

    • status: open --> closed
     
  • Rupert Swarbrick

    I'm going to close this bug because I think it's fixed by patches [9f1543] and [e057f0] that I've just pushed. Maxima still doesn't manage to compute the integral (or at least I got bored and killed it before it gave me an answer), but it no longer errors out from the bug that you encountered.

    I'm not too worried that Maxima didn't immediately compute the integral: once the expression has been modified by abs_integrate, Maxima is trying to integrate some terrifyingly huge trig expression.

     

    Related

    Commit: [9f1543]
    Commit: [e057f0]


Log in to post a comment.