This limit is computed correctly:
(%i3) limit(log(4*sin(t)**2)-log(t**2), t, 0, plus);
(%o3) log(4)
This limit isn't:
(%i6) limit(log(4*sin(t)**2)-log(t**2), t, 0, minus);
(%o6) log(4) - 2 log(- 1)
(Observe that the function is even.)
Observed using
Maxima 5.45.1 https://maxima.sourceforge.io
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
installed from Debian.
I think this isn't a bug since it appears to coming from the action of
logexpandwhich istrueby default. Looking at the expression by itself,so, trying the limit again with
logexpand = false,seems to give the expected result.
@dgildea @macrakis can I ask you for a second opinion on this? As I was saying in the previous comment, I think it's not a bug.
@robert_dodier, I agree completely. How is limit supposed to know that
2*log(t)came fromlog(t^2)?We could think about finer-grained settings for the
logexpandflag, e.g.,logexpand:'absmakeslog(x^EVEN) => EVEN*log(abs(x))(since everything is assumed real by default) andlog(PZ^EXP) => EXP*log(PZ), but nothing else, but that's another issue.Added the logexpand proposal as https://sourceforge.net/p/maxima/feature-requests/170/ to the "feature request" tracker.
Marking this ticket as not a bug. Thanks, Stavros, for weighing in on the subject.