Menu ▾ ▴

#2948 conjugate(z)*z doesn't simplify to abs(z)^2

None
open
nobody
5
2015-05-11
2015-04-29
Mikael
No

Hello,

Thank you to everyone involved for a great, free CAS!

It surprises me that the following returns false.

declare(z,complex);
is(conjugate(z)*z-abs(z)^2=0);

Is this behaviour is intentional or should it be fixed?

build_info(version="5.32.1",timestamp="2014-01-10 01:52:55",host="x86_64-unknown-linux-gnu",lisp_name="GNU Common Lisp (GCL)",lisp_version="GCL 2.6.10")

Discussion

  • Mikael

    Mikael - 2015-04-29

    Also, the following expression should perhaps simplify to conjugate(a), which it does not?

    conjugate(sqrt(a))^2

    This time on another build:
    build_info(version="5.30.0",timestamp="2013−04−22 13:48:12",host="i386−apple−darwin11.4.2",lisp_name="SBCL",lisp_version="1.0.55.0−abb03f9")

     
  • Mikael

    Mikael - 2015-05-09

    I just checked and these "features" are still there in Maxima 5.36.1:

    (%i7) build_info();
    (%o7) build_info(version="5.36.1",timestamp="2015-05-08 21:35:46",host="i686-pc-linux-gnu",lisp_name="GNU Common Lisp (GCL)",lisp_version="GCL 2.6.7")

     
    • Hisham Sueyllam

      Hisham Sueyllam - 2015-05-09

      you need to do:

      declare([a,b],real,w,complex);
      w:a+b*%i;
      is(expand(w*conjugate(w))-cabs(w)^2=0);
      

      to get true... hisham...

      [EDIT: format code, & remove quoted message]

       

      Last edit: Robert Dodier 2017-08-18
  • Mikael

    Mikael - 2015-05-11

    Thanks for your response! I wasn't aware of cabs. However, your example still returns false in Maxima 5.32.1.

     

Log in to post a comment.