Wrong simplification of log(1/z)



Hello Barton,

O.k., I have tried to implement plog to get the correct phase factors in the
transformations. But plog is very annoying. I don't get it silent. I try to
declare almost everything to be complex, but it still continue to ask the
useless question: Is "THIS" positive or negative? Because I can't tell plog that
"THIS" is COMPLEX, I have to choose the wrong answer and then get a wrong
result.

I had again a look at the Log function. I think log(1/z) -> -log(z) is really a
bug.

The documentation says log(a/b) will only be simplified when logexpand is set to
super. That is not the standard. log(1/b) will allways be simplified when b is
an integer (only a positive integer works). But z is not an integer.

There is no reason to do the wrong simplification for log(1/z). It my opinion
there is also no reason to do the simplification log(a/b)->log(a)-log(b) when we
are not sure that a,b are real or complex and not negative real.

So, at the moment I set logexpand to false at hope the best.

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: willisb at unk.edu [mailto:willisb at unk.edu] 
Gesendet: Dienstag, 29. Juli 2008 14:50
An: Dieter Kaiser
Cc: maxima at math.utexas.edu
Betreff: Re: [Maxima] Wrong simplification of log(1/z)

-----maxima-bounces at math.utexas.edu wrote: -----

>Unfortunately, I have found the following wrong simplification:
>
>(%i49) 1/2*(log(z)-log(1/z))-log(z);
>(%o49) 0
>
>The reason is that Maxima simplifies:
>
>(%i50) log(1/z);
>(%o50) -log(z)
>
>But that is wrong for z an element of (-inf,0).

Maybe you want to set logexpand to false, or maybe you need to use plog
instead of log:

(%i1) log(1/z), logexpand : false;
(%o1) log(1/z)

(%i2) plog(1/z);
Is  z   positive or negative? pos;
(%o2) -log(z)

(%i3) declare(z,complex)$

(%i4) plog(1/z);
(%o4) plog(1/z)

Barton