Ratsimp and common factors of %i



The rational simplification does more than remove the (non-unit) common
factor of the numerator and denominator. It is also supposed to make the
denominator "positive".  That's why (1-a)/(1-b)  is changed to (a-1)/(b-1).

So some program should be looking at the "sign" of the leading term of the
denominator .... (%i*a+1),  decide that it is not "unit normal", and
multiply numerator and denominator by  an appropriate factor (1/%i).

Whose responsibility?   I suspect that for ratsimp, %i is just another
symbol like x,y,z  except if it is squared.

RJF

-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Stavros Macrakis
Sent: Saturday, August 18, 2007 7:25 AM
To: maxima
Subject: Ratsimp and common factors of %i

ex: (a+%i)/(a-%i)$
ex1: (%i*a-1)/(%i*a+1)$

Expressions ex and ex1 are equivalent, as can be seen by ratsimp(ex-ex1).

However, ratsimp(ex)=>ex and ratsimp(ex1)=>ex1.  It would be nicer if
ratsimp(ex) were the same as ratsimp(ex1).  Currently, the only way I
know to canonicalize ex1 to ex is gfactor.

The root cause is presumably that gcd(num(ex1),denom(ex1))=>1 (even
with gcd:algebraic).  This is correct, since gcd's are only unique up
to units. But the gcd's are also 1 for the num/denom of (1-a)/(1-b)
and (a-1)/(b-1), which ratsimp successfully canonicalizes.

It would be nice if ratsimp(ex1) => ex.

             -s
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima