asksign(x^2) very broken! WAS problem with 'is zero or nonzero'



Argh!!

(%i1) asksign(x^2);
Is x zero or nonzero? z;
(%o1) zero                               <<< OK
(%i2) asksign(x^2);
Is x zero or nonzero? zero;
(%o2) zero                             <<< OK
(%i3) asksign(x^2);
Is x zero or nonzero? n;
(%o3) neg                          <<< !!!!
(%i4) asksign(x^2);
Is x zero or nonzero? nonzero;
(%o4) zero                          <<< !!!!

version=5.30.0,timestamp=2013-04-22
13:48:12,host=i386-apple-darwin11.4.2,lisp_name=SBCL,lisp_version=
1.0.55.0-abb03f9)

Reported as https://sourceforge.net/p/maxima/bugs/2647/

On Wed, Oct 23, 2013 at 4:48 PM, Przemek Klosowski <
przemek.klosowski at nist.gov> wrote:

>  (Maxima 5.30.0 using Lisp SBCL 1.1.8-2 on Fedora 19)
>
> I guess it is a Maxima-wide problem with resolving constant conditions,
> that I ran into back in July for integrate()
> and now with desolve().  Whenever Maxima asks 'Is ... zero or nonzero?'
> both  'nonzero' and 'zero' are interpreted as 'zero'.
> I suspect the only way to specify non-zero is to say 'n':
>
> atvalue ('diff (f(x), x), x = 0, v0)$
> atvalue (f(x), x = 0, x0)$
>
> desolve('diff(f(x),x,2)=-(w*w)*f(x), f(x));
> Is w zero or nonzero?
> nonzero;
> (%o16)                         f(x) = x0 + v0 x
>
> desolve('diff(f(x),x,2)=-(w*w)*f(x), f(x));
> Is w zero or nonzero?
> n;
>                                                      v0
> (%o17)          f(x) = x0 cos(w x) + -----  sin(w x)
>                                                      w
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>