#2723 maxima will not evaluate certain straightforward integrals with square roots without eplicit use of factor(...) - bug in algebraic:true

None
wont-fix
nobody
None
5
2014-05-11
2014-04-18
dan hayes
No

wxMaxima version: 13.4.0
Maxima version: 5.31.1
Maxima build date: 2013-09-24 09:49:12
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

(im:2,assume(u>0),assume(a>0), lisv:makelist([x[1,j],x[2,j]],j,1,3)
,tt:product( exp(-a*(x[1,j]^2+x[2,j]^2) -u^2*(x[1,j]-x[2,j])^2),j,1,3)
,for i1j1:0 thru im do for i2j1:i1j1 thru im step 2 do for i1j2:i1j1 thru im 
 do for i2j2:i1j2 thru im step 2 do for i1j3:i1j2+1-signum(2-(-1)^i1j1-
(-1)^i1j2) thru im step 2-signum(2-(-1)^i1j1-(-1)^i1j2) do for i2j3:i1j3 
 thru im step 2 do(t:ttx[1,1]^i1j1x[2,1]^i2j1x[1,2]^i1j2x[2,2]^i2j2x[1,3]
^i1j3x[2,3]^i2j3,for i thru 2 do for j thru 3 do t:integrate(t,lisv[j][i],-inf,inf)

/*,t:factor(t) */

,disp(t), t:integrate(t,u,0,inf)
,ldisp([i1j1,i2j1,i1j2,i2j2,i1j3,i2j3,factor(t)])) );

Note the /*,t:factor(t) */ is commented out. If we uncomment this then all is
well whether we do or do not precede this above routine with algebraic:true.

Now beginning about the 3rd or 4th output stage with the [0,0,0,1,1,1,1,...
signature with default algebraic:false then it only gives the integral in
noun form without evaluation. If we precede the whole routine with
algebraic:true it err's out. Note this has nothing to do with the use of signum(...)'s.

Again if we uncomment and use t:factor(t) where written above
then all is well.

The point is maxima should evaluate the integral without one having to
explicitly put in the t:factor(t) and besides this there is a bug in
algebraic:true as appears when we don't use the t:factor(t).

Discussion

  • dan hayes

    dan hayes - 2014-04-18

    Note the display above left out the " * " symbols and put
    in italics - i did not put it in that way - had no choice
    or control over what it scripted out. I had

    " a(... and u^2(... "in the appropriate places
    and also " /,t:factor(t)/ " as it should be

    If this appears without the " * " symbols then it is a definite
    bug in the bug scripting and needs to be corrected by administration.

     
  • dan hayes

    dan hayes - 2014-04-18

    possibly i made a mistake and wrote it in the Discussion box where/when
    should not have done so

     
  • Rupert Swarbrick

    "administration" here is the behemoth that is SourceForge. Fortunately, it's possible to tell their bug tracking application that text should be treated as verbatim. To do so, surround it with "~~~~" lines, following the first one with a line containing "::text" (which tells the bug tracker not to try and do syntax highlighting).

    I'm editing the original report accordingly.

     
  • Rupert Swarbrick

    This bug report is pretty much impossible to act upon. I haven't got a copy of Maxima 5.31.1 to try out, but current head and the 5.33 release both immediately report that your integral is divergent:

    Maxima 5.33.0 http://maxima.sourceforge.net
    using Lisp GNU Common Lisp (GCL) GCL 2.6.10 (a.k.a. GCL)
    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) (im:2,assume(u>0),assume(a>0), lisv:makelist([x[1,j],x[2,j]],j,1,3)
    ,tt:product( exp(-a*(x[1,j]^2+x[2,j]^2) -u^2*(x[1,j]-x[2,j])^2),j,1,3)
    ,for i1j1:0 thru im do for i2j1:i1j1 thru im step 2 do for i1j2:i1j1 thru im 
     do for i2j2:i1j2 thru im step 2 do for i1j3:i1j2+1-signum(2-(-1)^i1j1-
    (-1)^i1j2) thru im step 2-signum(2-(-1)^i1j1-(-1)^i1j2) do for i2j3:i1j3 
     thru im step 2 do(t:ttx[1,1]^i1j1x[2,1]^i2j1x[1,2]^i1j2x[2,2]^i2j2x[1,3]
    ^i1j3x[2,3]^i2j3,for i thru 2 do for j thru 3 do t:integrate(t,lisv[j][i],-inf,inf)
    
    /*,t:factor(t) */
    
    ,disp(t), t:integrate(t,u,0,inf)
    ,ldisp([i1j1,i2j1,i1j2,i2j2,i1j3,i2j3,factor(t)])) );
    
    defint: integral is divergent.
     -- an error. To debug this try: debugmode(true);
    (%i2) 
    

    This may be a bug (maybe your integral isn't divergent?), but your 8(!!!) nested loops and code of the form t: f(t) make it almost impossible for anyone but you to work out what's supposed to be going on.

    I'm going to close this bug as wont-fix because, frankly, no-one is ever going to spend the hours of work required to tease out what you thought you were asking Maxima to do.

    My recommendation is that first you upgrade your copy of Maxima to version 5.33. Apparently, something has changed in our definite integration code which affects this example. If the resulting program still doesn't look like it's doing the right thing, you need to generate a minimal example for us to work on.

    The best bug reports have some text explaining what the reporter thought should happen and then have a transcript of a Maxima session showing the bug. Ideally, it should be obvious from the transcript what the output should have been. Now the only remaining job is to work out why Maxima failed to produce it :-)

     
  • Rupert Swarbrick

    • status: open --> wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks