Subject: "Unexpected behavior of log() in complex plane"
From: Karl-Dieter Crisman
Date: Fri, 28 Oct 2011 13:51:27 -0400
Hi all,
There is a new Sage user who's been using quite a bit of the symbolic
capabilities of Sage (=Maxima) while considering porting from
Mathematica. He came across behavior along the following lines.
(%i1) declare(w,real);
(%o1) done
(%i2) assume(w<0);
(%o2) [w < 0]
(%i3) limit(log(w+%i*eps),eps,0);
(%o3) und
(%i4) limit(log(w+%i*eps),eps,0,plus);
(%o4) log(w) + %i %pi
Now, the user (and several commenters at
http://ask.sagemath.org/question/839/unexpected-behavior-of-log-in-complex-plane)
say that this is very wrong, because it should be log(-w) (or so I
understand the comments to indicate), because the i*pi takes care of
the minus sign and we get the usual log of the positive real thing
that's left, -w. I don't think anyone is complaining about the
imaginary part being i*pi, given the usual branch cut.
Well, I also know that Maxima tends to be pretty good with this sort
of thing, though bugs do creep in. But I'm wondering whether there
just isn't something inappropriate in how we/he are using declare,
assume, and limit together, since Maxima's own documentation says that
assume doesn't play well with other things.
And of course maybe I'm misunderstanding the intended behavior of log here?
Of course, if this *is* a bug, then I'll file a report. It does this in 5.25.0.
And if I just have completely forgotten my complex analysis since the
last time I taught it and this person is barking up the wrong tree,
please let me know that; all you can hurt is my pride :)
Thanks!