Wrong simplification of log(1/z)



Hello Barton,

thank you for your suggestions. 

I think to set logexpand to false would not help much. It seems to me a bit
strange to tell the Maxima User the symbolically code will only work when
logexpand is false. When logexpand is true the user can get results like
Ei(z)=-E1(-z) which are wrong when z is a negative real value.

To give the results in terms of plog might be possible. For a real positive
argument plog simplifies correctly to zero. If the argument is real negative and
with some further help we get correctly -%i%pi for
1/2*(plog(z)-plog(1/z))-plog(z).

I will see.

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