[Maxima] tell x*conjugate(x) is 1
l.butler at ed.ac.uk
Fri Oct 23 11:00:33 CDT 2009
On Fri, 23 Oct 2009, Stavros Macrakis wrote:
< How you want to handle this depends on what simplifications you expect Maxima to perform. I would think that the ab=>exp(%i*a) approach would enable the largest
< range of Maxima simplifications because Maxima 'knows' a lot about exponentiation; but it knows relatively little about conjugate. On the other hand, converting
< your result back into the ab form might give a messy result.
< And Maxima 'knows' nothing when you introduce a tellsimp -- that is strictly a mechanical rewrite.
< For example, ab:exp(%i*a) ... trigsimp(cabs(ab)) => 1, but cabs(ab) with the conjugate tellsimps (and ab declared complex) does nothing useful.
< On Fri, Oct 23, 2009 at 9:15 AM, Barton Willis <willisb at unk.edu> wrote:
< Your tellsimpafter almost works; does this code fix the problem?
< (%i1) matchdeclare(a, lambda([s], mapatom(s) and get(s, unit_modulus)))$
< (%i2) block([simp : false], tellsimpafter(conjugate(a),1/a))$
< (%i3) declare(z,complex)$
< (%i4) put(z,true,'unit_modulus)$
< (%i5) conjugate(%i * z- 1/z);
< (%o5) -z-%i/z
< (%i6) conjugate(z * conjugate(z));
Thanks, Barton, it was the bit about wrapping tellsimpafter in a
block that turned off the simplifier that had me stumped. This works
quite nicely for my calculations, producing the output exactly like I
I appreciate your point Stavros, but in my case this route required
several extra simplification steps to put the output in the desired
form. I think this is more a reflection of the problem than any general
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Maxima