Menu

#3649 Wrong integrate(log(cot(x)-1),x,0,%pi/4) (regression)

None
open
nobody
None
5
2020-08-20
2020-08-19
No

We noticed the following regression between Maxima 5.42.2 and Maxima 5.44.0:

With Maxima 5.42.2:

(%i1) display2d:false;

(%o1) false
(%i2) integrate(log(cot(x)-1),x,0,%pi/4);

(%o2) (%i*li[2]((%i+1)/2)-%i*li[2](-(%i-1)/2))/2
 -(%i*(2*li[2](%i+1)-2*li[2](1-%i))+%pi*log(2))/4
(%i3) expand(float(%));

(%o3) 0.2721982612879501

Which seems OK since the integral is supposed to be pi*log(2)/8 whose numerical value is 0.272198261287950.

But with Maxima 5.44.0, some imaginary value appears:

(%i1) display2d:false;

(%o1) false
(%i2) integrate(log(cot(x)-1),x,0,%pi/4);

(%o2) (-(%i*li[2](%i+1))/2)+(%i*li[2]((%i+1)/2))/2-(%i*li[2](-(%i-1)/2))/2
                           +(%i*li[2](1-%i))/2
                           -(%pi*log(4)-%pi*log(2)-2*%pi*log(-2))/8
                           -(3*%pi*log(2))/8
(%i3) expand(float(%));

(%o3) 2.467401100272339*%i+0.2721982612879502

Downstream related ticket : https://trac.sagemath.org/ticket/30063

Discussion

  • Peter Bruin

    Peter Bruin - 2020-08-19

    This seems to be caused by commit 47a6afd.

     
  • Kris Katterjohn

    Kris Katterjohn - 2020-08-19

    I'll add a little more context here, along with some links.

    The commit message for the aforementioned commit [47a6af] (which was fixing bug [#3484]) says that it caused this integral to fail. This integral is in our test suite (added in commit [ce7c53] from bug [#2501]) and it's currently marked as a known failure.

     

    Related

    Bugs: #2501
    Bugs: #3484
    Commit: [47a6af]
    Commit: [ce7c53]

  • Peter Bruin

    Peter Bruin - 2020-08-20

    Thanks for the explanation!
    Possibly also related: [#3079]

     

    Related

    Bugs: #3079


Log in to post a comment.

MongoDB Logo MongoDB