Sometimes trigsimp and trigreduce seem to make

assumptions of the sign of variables. Consider:

(%i1) sqrt(r^2 * cos(x)^2 + r^2 * sin(x)^2);

(%o1) sqrt(r^2*sin(x)^2+r^2*cos(x)^2)

(%i2) trigsimp(%o1);

(%o2) r <--- should be |r|

(%i3) trigreduce(%o1);

(%o3) r <--- should be |r|

(%i4) trigreduce(sqrt(r^2));

(%o4) abs(r) <---- OK here

(%i5) trigsimp(sqrt(r^2));

(%o5) abs(r) <--- OK here too

And oh my! Using z instead of r makes the problem

go away.

(%i9) sqrt(z^2 * cos(x)^2 + z^2 * sin(x)^2);

(%o9) sqrt(sin(x)^2*z^2+cos(x)^2*z^2)

(%i10) trigsimp(%);

(%o10) abs(z) <--- OK here as well!

(%i6) build_info();

Maxima version: 5.9.1.1cvs

Maxima build date: 14:5 8/30/2005

host type: i686-pc-mingw32

lisp-implementation-type: GNU Common Lisp (GCL)

lisp-implementation-version: GCL 2.6.7

Barton