How to Find the Sign of a Polynomial with FindSign.m Package

Yuji Itaya
Department of Information Management
School of Business Administration
Asahi University
Hozumi, Motosu, Gifu, Japan
E-mail: itaya@alice.asahi-u.ac.jp

This package finds the sign of a given polynomial, assuming that the domains of 
variables are real.

Loading a package

Needs["findSign`"];

Finding the sign

To find the sign, just use findSign function. The output is either positive, 
nonnegative, zero, nonpositive, negative, or indeterminate.

findSign[-x^2-x-1]

findSign[Expand[(x-y)^4+y^2+1]]

findSign[x^2-x-1]

We can easily verify by using Plot that x^2-x-1 has no definite sign:

Plot[x^2-x-1,{x,-3,3}]

Logarithmic and exponential functions

The package has rules of logarithmic and exponential functions.

findSign[Expand[(x-y+1)^4+y^6+z^2+Exp[-x]]]

findSign[Log[1/(x^2+1)]]

findSign[Log[1+1/(x^2+1)]]

Polynomial of some variables which signs are known

The known signs of variables can be specified in options: 
Specify positive variables in positiveVariables;
	nonnegative variables in nonnegtiveVariables;
	zero variables ( which seems meaningless, but is introduced because of 
					symmetry to nonzeroVariables ) in 
zeroVariables;
	nonpositive variables in nonpositiveVariables;
	negative variables in negativeVariables;
	nonzero variables in nonzeroVariables.

findSign[x-y+z^2,positiveVariables->{x},negativeVariables->{y}]

findSign[Log[1+1/(x+1)],nonnegativeVariables->{x}]

Polynomial Structure

Set the option structureDisplay as True when we want to know the polynomial 
structure.

findSign[1+x,positiveVariables->{x},structureDisplay->True]

The second part of the output means that the given polynomial is the sum (Plus) 
of {positive, {1}} and {positive, {x}}. {positive, {1}} and {positive, {x}} 
indicate that 1 is positive and that x  is positive, respectively.

findSign[Expand[(x-y)^4+y^2+1],structureDisplay->True]

Note that the package finds the sign by changing the given polynomial to 
(1+y^2)+(-x+y)^4.

Tracing the procedure

Set the option tracing as On when we want to know the procedure of determining 
the sign.

findSign[x-y+z^2,positiveVariables->{x},negativeVariables->{y},tracing->On]