I think I found some bugs. Pw.mac is not loaded. Hopefully they are an easy fix.
(%i2) load(nulim);
(out2) C:/Maxima-5.20.1/share/maxima/5.20.1/share/contrib/nulim.lisp
(%i3) limit(signum(a*x+b),x,1/a);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i4) limit(signum(a*x+b),x,1/a, 'plus);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i5) limit(signum(a*x+b),x,-1/a);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i3) limit(signum(a*x+b),x,-1/a);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i6) limit(signum(a*x+b),x,-1/a,'minus);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i7) limit(signum(a*x+b),x,-1/a,'plus);
Maxima encountered a Lisp error:
Error in LET* [or a callee]: IS is an illegal COND clause.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i8)
Rich
--------------------------------------------------
From: "Barton Willis" <willisb at unk.edu>
Sent: Wednesday, February 03, 2010 7:35 AM
To: <maxima at math.utexas.edu>
Subject: limits of signum expressions
>
> Here is a proposal for a simplim%signum function. Comments?
>
> Return a nounform when nothing known about the limit point:
>
> (%i2) limit(signum(x),x,a);
> (%o2) 'limit(signum(x+a),x,0)
>
> Returning a conditional expression instead of a nounform isn't all
> that much of a simplification, I think.
>
> When Maxima knows that the limit point is nonzero, use substitution to find
> the limit
>
> (%i3) limit(signum(x),x,1/a);
> (%o3) signum(1/a)
>
> (%i4) limit(signum(x + a),x,inf);
> (%o4) 1
>
> Harmless, I think:
>
> (%i5) limit(signum(x),x,%i);
> (%o5) signum(%i)
>
> Two-sided limit toward 0 is undefined (the one-sided limits are defined)
>
> (%i8) limit(signum(x),x,0);
> (%o8) und
>
> Bug due do limit(a*x,x,inf) --> infinity
>
> (%i6) limit(signum(a*x+b),x,inf);
> (%o6) signum(infinity)
>
> The code
>
> (setf (get '%signum 'simplim%function) 'simplim%signum)
>
> (defun simplim%signum (e x pt)
> (let* ((e (limit (cadr e) x pt 'think)) (sgn (mnqp e 0)))
> (cond ((eq t sgn) (take '(%signum) e)) ;; limit of argument of signum
> is not zero
> ((eq nil sgn) '$und) ;; limit of argument of signum is zero
> (noncontinuous)
> (t (throw 'limit nil))))) ;; don't know
>
> Also, I've appended the following to rtest_signum:
>
> limit(signum(x),x,minf);
> -1$
>
> limit(signum(x),x,0,'minus);
> -1$
>
> limit(signum(x),x,0);
> und$
>
> limit(signum(x),x,0,'plus);
> 1$
>
> limit(signum(x),x,inf);
> 1$
>
> limit(x * signum(x),x,0);
> 0$
>
> limit(signum(x+a),x,minf);
> -1$
>
> limit(signum(x+a),x,inf);
> 1$
>
> (assume(notequal(a,0)),0);
> 0$
>
> limit(signum(x),x,a);
> signum(a)$
>
> limit(signum(a*x),x,minf);
> -signum(a)$
>
> limit(signum(a*x),x,inf);
> signum(a)$
>
> limit(signum(x),x,1/a);
> signum(1/a)$
>
> Barton
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>