rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

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

Open rtoy opened 1 week ago

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 23:14:47 Created by alcarola on 2015-04-29 15:46:25 Original: https://sourceforge.net/p/maxima/bugs/2948


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")

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 23:14:48 Created by alcarola on 2015-04-29 18:49:13 Original: https://sourceforge.net/p/maxima/bugs/2948/#7eec


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")

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 23:14:51 Created by alcarola on 2015-05-09 11:24:38 Original: https://sourceforge.net/p/maxima/bugs/2948/#4073


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")

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 23:14:55 Created by sueyllam on 2015-05-09 16:35:33 Original: https://sourceforge.net/p/maxima/bugs/2948/#4073/038a


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]

Attachments: