integral yields Lisp error



Am Sonntag, den 30.08.2009, 23:56 -0300 schrieb Alejandro Jakubi:
> I have been browsing recent posts to this list and one of them was about the
> following integral:
> 
> integrate(x*log(sin(x)),x,0,%pi);
> 
> and a long result was shown. I have tried it with Maxima 5.19.1, but got
> instead an error message:
> 
> Maxima encountered a Lisp error:
>   Error in PROGN [or a callee]: Bind stack overflow.
> Automatically continuing.
> To reenable the Lisp debugger set *debugger-hook* to nil.
> 
> 
> It sounds like a bug.

The bug has been fixed in Maxima 5.19.2 and Maxima 5.19post.
Unfortunately, Maxima 5.19.1 has shown this bug the first time.

This is the new result:

(%i5) integrate(x*log(sin(x)),x,0,%pi);
(%o5) %i*(('limit(12*'imagpart(li[3](%e^(%i*x)))
                   -12*x*'realpart(li[2](%e^(%i*x)))
                   +12*'imagpart(li[3](-%e^(%i*x)))
                   -12*x*'realpart(li[2](-%e^(%i*x)))
                   +6*x^2*atan(sin(x)/(cos(x)+1))
                   +6*x^2*atan(sin(x)/(cos(x)-1))-2*x^3,x,0,plus))
         /12
         -('limit(12*'imagpart(li[3](%e^(%i*x)))
                   -12*x*'realpart(li[2](%e^(%i*x)))
                   +12*'imagpart(li[3](-%e^(%i*x)))
                   -12*x*'realpart(li[2](-%e^(%i*x)))
                   +6*x^2*atan(sin(x)/(cos(x)+1))
                   +6*x^2*atan(sin(x)/(cos(x)-1))-2*x^3,x,%pi,minus))
          /12)
       -%pi*'imagpart(%pi^2/6)-%pi*'imagpart(-%pi^2/12)-%pi^2*log(4)/4

We have to evaluate the result of the integral to times to get a
simplified and correct answer. This is an open bug: 

(%i6) %,nouns;
(%o6) %i*((12*'imagpart(zeta(3))+12*'imagpart(-3*zeta(3)/4))/12
         -(12*'imagpart(zeta(3))+12*'imagpart(-3*zeta(3)/4)
                                -12*%pi*'realpart(%pi^2/6)
                                -12*%pi*'realpart(-%pi^2/12)+%pi^3)
          /12)
       -%pi^2*log(4)/4
(%i7) %,nouns;
(%o7) -%pi^2*log(4)/4

Dieter Kaiser