# [Maxima] tell x*conjugate(x) is 1

Robert Dodier robert.dodier at gmail.com
Fri Oct 23 10:01:31 CDT 2009

```On 10/23/09, Leo Butler <l.butler at ed.ac.uk> wrote:

> Can I tell the simplifier that x*conjugate(x) is 1?

Well, maybe we should approach this via x*conjugate(x) => abs(x)^2
or cabs(x)^2 (I don't know what the effective difference is) and then
you could declare abs(x) = 1.

Be that as it may, it's tricky to work with simplification rules for "*"
and "+" because they are n-ary, commutative operators.
Essentially you'd have to sweep through every "*" looking for
terms which pass some predicate (e.g. unit modulus) and then
look for other terms (e.g. conjugate(x) for every unit modulus x).

I would be inclined to declare such a rule via defrule instead of
tellsimpafter so that the rule is applied only when it's explicitly
invoked, not automatically.

> tellsimp informs me that rules on '+' and '*' may not work -- and this appears true.

Well, rules on "*" and "+" can work, I've done it many times.
But it is a somewhat complex situation.

Sorry I can't be more helpful,

Robert Dodier
```