Dieter Kaiser - 2011-10-27

Again some examples to show the reported problem:

(%i1) assume(abs(x)<1);
(%o1) [abs(x) < 1]

(%i2) sign(4-x^2);
(%o2) pos

(%i3) sign(16-x^2);
(%o3) pos

(%i4) sign(64-x^2);
(%o4) pos

(%i5) sign(100-x^2);
(%o5) pos

If the number has an integer root, Maxima can determine the sign. But not for a number, which has not an integer root.

(%i6) sign(5-x^2);
(%o6) pnz

The reason is within the algorithm of the Lisp function sign. Expressions are factored by the Lisp function signfactor to determine the sign. Maxima can evaluate the sign of the factored expression.

(%i7) factor(4-x^2);
(%o7) -(x-2)*(x+2)
(%i8) sign(%);
(%o8) pos

But for a number, which does not have an integer root, the expression can not be factored. For this case Maxima does not have an algorithm to evaluate the sign.

(%i11) factor(5-x^2);
(%o11) -(x^2-5)

This might be called a missing feature. The Maxima function sign has a lot of more limitations.

Dieter Kaiser