ex:sin(x)^2*log(4*cos(2*x)+5), exponentialize;
integrate(ex,x,0,%pi/2)
gives "asksign: internal error"
A little tracing shows that EPS-SIGN in src/compar.lisp has been called on ((MPLUS) $ZEROA $ZEROB).
wxMaxima version: 15.8.2
Maxima version: 5.37.2
Maxima build date: 2015-09-18 21:03:17
Host type: i686-pc-mingw32
System type: Win32 6.2.9200 X86
Lisp implementation type: SBCL
Lisp implementation version: 1.2.7
zeroa+zerob is arguably zero. This is the sum of two signed zeros +0 and -0.
Trying the example with commit ff883f32a (post 5.47) with SBCL 2.1.11 on Linux returns a result in terms of polylogarithm functions. I don't know if it's correct.
Copying message from RJF via email.
"""
I think this is wrong. Evaluated numerically and expanded Maxima gives
-(4.934802200544679*%i)-1.5707963267948966
But the integral evaluated directly numerically (using romberg() ..) gets 0.696094....
Mathematica gets
1/8 \[Pi] (-1 + Log[16])
which is 0.696094...Exploring whether
li[2]
is computed wrong.. Mathematica saysPolyLog[2,-1/2]//N
is -0.448..Maxima says
li[2](-1/2)
is -0.448.. So that's not it.Note that this expression ex can be anti-differentiated to give a messy expression, call it v.
ratsimp(diff(v,x)-ex)
gives 0. So Maxima knows how to compute v, the indefinite integral.Plotting the expression ex between 0 and pi/2 shows nothing bothersome for integrating. No singularities.
Using the Fundamental Theorem of Calculus evaluating v at 3.1415926/2 and 0.0 ...
gives
0.4712901434518321*%i+0.6960939634530774
and
0.47129014345183173*%i
so the difference is 0.69609.... and FTC gets the right answer.
But the definite integral seems to be using some other code, and comes up with something wrong.
"""