On 3/3/10 3:23 PM, Barton Willis wrote:
> (%i2) hgfred([1/2,1],[3/2],x^2);
> Is x zero or nonzero?zero;
> (%o2) atanh(x)/x
>
> (%i3) hgfred([1/2,1],[3/2],x^2);
> Is x zero or nonzero?nonzero;
> (%o3) log((x+1)/(1-x))/(2*x)
>
Cute!
This is caused by trig-log and trig-log-3-exec. It uses A&S 15.1.4 or
15.1.5 to figure out what to return. The question happens because
maxima already knows x^2 >= 0, and trig-log-3-exec is checking the sign
of x^2 to see if it is positive or negative. Perhaps we should also add
a check for x^2 = 0?
Also, I think this might be wrong: hgfred([1/2,1],[3/2],x) ->
atan(sqrt(x))/sqrt(x), when you answer neg for the sign of x. Shouldn't
the answer be atan(sqrt(-x))/sqrt(-x)?
Ray