simplim%signum() does not address symbolic cases.
(%i5) load(pw)$
(%i6) limit(signum(a*x+b),x,inf);
(%o6) unit_spike(a) * signum(b) + signum(a)
This is a more general answer. I am enhancing limit without going into Lisp
coding (so far). I have been wondering if anyone thinks this answer is too
opaque. For any degree polynomial argument to signum() it is possible to
get an answer for limit(signum(p(x)),x,inf). There is a simple recursive
way to generate the answer (for polynomials of any finite degree).
OABTW unit_spike is a simplifying function defined in pw.mac
Rich
On Mon, Jan 25, 2010 at 1:54 PM, Barton Willis <willisb at unk.edu> wrote:
> I know little to nothing about the limit code; nevertheless, how about:
>
> (setf (get '%signum 'simplim%function) 'simplim%signum)
>
> (defun simplim%signum (e x pt)
> (let ((sgn))
> (setq e (limit (cadr e) x pt 'think))
> (setq sgn ($csign e))
> (cond ((eq sgn '$zero) '$ind)
> ((memq sgn '($neg $pn $pos))
> (take '(%signum) e)) ;; OK, this does sign(e) twice,...
> (t (throw 'limit ())))))
>
> Examples:
>
> (%i2) limit(signum(x^2-3),x,5);
> (%o2) 1
>
> (%i3) limit(signum(x),x,a);
> (%o3) 'limit(signum(x+a),x,0)
>
> (%i4) assume(a > 0);
> (%o4) [a > 0]
>
> (%i5) limit(signum(x),x,a);
> (%o5) 1
>
> (%i6) limit(signum(x^3-1),x,inf);
> (%o6) 1
>
>
> (%i7) limit(signum(x^3-7),x,minf);
> (%o7) -1
>
> (%i8) limit(x * signum(x),x,0);
> (%o8) 0
>
> Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>