Sorry but word wrapping in my email client altered the code. I have rechecked after fixing that. I think this is is a
bug
(%i13) limit(signum(a*x+b),x,1/a);
(out13) 'limit(signum(a*x+b+1),x,0)
The plus one is okay but a*x should not be in there. I think the answer should be 'limit(signum(b+1),x,0) or just
signum(b+1). A similar argument applies for the others.
(%i2) load(nulim);
(out2) C:/Maxima-5.20.1/share/maxima/5.20.1/share/contrib/nulim.lisp
(%i3) load(abs_integrate)$
(%i12) display2d:false;
(out12) false
(%i13) limit(signum(a*x+b),x,1/a);
(out13) 'limit(signum(a*x+b+1),x,0)
(%i14) limit(signum(a*x+b),x,1/a,'minus);
(out14) 'limit(signum(a*x+b+1),x,0,minus)
(%i15) limit(signum(a*x+b),x,1/a,'plus);
(out15) 'limit(signum(a*x+b+1),x,0,plus)
(%i16) limit(signum(a*x+b),x,-1/a);
(out16) 'limit(signum(a*x+b-1),x,0)
(%i17) limit(signum(a*x+b),x,-1/a,'minus);
(out17) 'limit(signum(a*x+b-1),x,0,minus)
(%i18) limit(signum(a*x+b),x,-1/a,'plus);
(out18) 'limit(signum(a*x+b-1),x,0,plus)
(%i19) limit(signum(a*x^2+b),x,-1/a);
(out19) 'limit(signum(a*(x-1/a)^2+b),x,0)
(%i20) simp_assuming(limit(signum(a*x^2+b),x,-1/a),a>0);
(out20) simp_assuming('limit(signum(a*(x-1/a)^2+b),x,0),a > 0)
(%i21) simp_assuming(limit(signum(a*x^2+b),x,-1/a),a>0);
Rich
--------------------------------------------------
From: "Richard Hennessy" <rich.hennessy at verizon.net>
Sent: Wednesday, February 03, 2010 3:07 PM
To: "Barton Willis" <willisb at unk.edu>; <maxima at math.utexas.edu>
Subject: Re: [Maxima] limits of signum expressions
> 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
>>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>