>>>>> "Richard" == Richard Fateman <fateman at cs.berkeley.edu> writes:
Richard> Commercial Macsyma and Mathematica give the same results as you show.
Richard> The answers look OK to me.
Richard> Raymond Toy wrote:
>> Maxima currently says
>>
>> integrate(x/(1-x^2),x) ->
>> -log(1-x^2)/2
>>
>> and
>>
>> integrate(x/(x^2-1),x) ->
>> log(x^2-1)/2
>>
I think the result are correct, but information is missing.
Here is what's happening in bug 1374700.
integrate((1+tan(x)^2)/tan(x),x) is converted to
integrate(cos(x)/sin(x)*(1+sin(x)^2/cos(x)^2),x) by replacing tan with
sin/cos.
Maxima recognizes this form and uses the substitution y = sin(x) to
get a new integral integrate(1/y*(1+y^2/(1-y^2)),y), which maxima
figures is
log(y)-log(y^2-1)/2.
Substitute back to get the final answer
log(sin(x)) - log(sin(x)^2-1)/2.
So the result isn't a real number for real x.
If, however, maxima chose the different integral for y, by doing
integrate(expand(1/y*(1+y^2/(1-y^2)),y)), we would have gotten
log(y)-log(1-y^2)/2
with a final result of
log(sin(x)) - log(1-sin(x)^2)/2.
(Of course, this isn't quite right either because we're assuming
sin(x) > 0.)
Perhaps this isn't an issue, and we should just live with the result.
Ray