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
This seems to be caused by commit 47a6afd.
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:
#2501Bugs:
#3484Commit: [47a6af]
Commit: [ce7c53]
Thanks for the explanation!
Possibly also related: [#3079]
Related
Bugs: #3079
In Maxima 5.50post (SBCL 2.6.7)
integrate(log(cot(x)-1),x,0,%pi/4)returns%catalan - %i*li[2]((1-%i)/2)/2 + %i*li[2]((1+%i)/2)/2, which is purely real; the spurious2.467401100272339*%iseen in 5.44.0 is gone. Its float,0.27219826128795016, matches%pi*log(2)/8 = 0.27219826128795027andquad_qags = 0.2721982612879502. A few informational "atanh: argument 1 isn't in the domain of atanh" messages are printed during the computation; they are warnings, not errors, and do not affect the result.Verified by Claude.