"Unexpected behavior of log() in complex plane"



The behavior you report below is not the behavior of the Maxima that I 
just tried it on, 5.23.2.

It reports for an answer, log(w).




Originally the limit program did not refer directly to assumptions or 
declarations, and so
lines %i1 and %i2 should be irrelevant.  Newer versions of limit, or  
subroutines called during
the computation of limits may refer to that information.

Also, originally, the limit program was aimed at computing  limits of 
real-valued functions.  If it works in other contexts, that's nice, but 
not something that was an original intent.

So complex log -- eh, not necessarily supported.  But log has multiple 
values,  and to distinguish between
log(w)+n*i*pi  for odd integer n,      and log(-w), is a kind of subtle 
point, not one that is easily handled by

... just tell me the limit, don't confuse me with, uh,  the mathematics...


So, one answer is:  upgrade Sage to a later Maxima.
Also, experts on the current limit may wish to respond.



On 10/28/2011 10:51 AM, Karl-Dieter Crisman wrote:
> 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!
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima