I can't figure this out



I give up.  There is no way to fix that by adding code to noninteractive 
since that cannot fix the wrong output from integrate.

Rich

----- Original Message ----- 
From: "Richard Hennessy" <rvh2007 at comcast.net>
To: <maxima at math.utexas.edu>
Sent: Thursday, September 11, 2008 9:14 AM
Subject: Re: [Maxima] I can't figure this out


> Is there any way in Maxima to list all global variables defined at a
> position in the input (both Maxima and list globals)?  Also any globals in
> closures.
> I tried ev(infolists) but I am not sure if that lists everything.
>
>
> (%i3) /* some function here to display all globals
> (%i4) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o4) if n-m<0 then 0 elseif n-m>0 then 0
> (%i5) /* some function here to display all globals
> (%i6) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o6) 0
> (%i7) /* some function here to display all globals
>
> ----- Original Message ----- 
> From: Richard Hennessy
> To: maxima at math.utexas.edu
> Sent: Wednesday, September 10, 2008 8:14 PM
> Subject: Re: [Maxima] I can't figure this out
>
>
> I got it to work to this point.  It is a variable that is not set until
> after the first integrate.  I think.  I don't know which one yet.
>
> (%i1) load(noninteractive);
> (%o1)
> C:/Maxima-5.16.3/share/maxima/5.16.3/share/contrib/noninteractive/noninteractive.mac
> (%i2) declare([m,n],integer);
> (%o2) done
> (%i3) assume(n>0,m>0,not equal(n,m));
> (%o3) [n>0,m>0,notequal(n,m)]
> (%i4) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o4) if n-m<0 then 0 elseif n-m>0 then 0
> (%i5) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o5) 0
> (%i6) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o6) 0
> (%i7) integrate(cos(m*x)*cos(n*x),x,0,2*%pi);
> (%o7) 0
>
>
> ----- Original Message ----- 
> From: Richard Hennessy
> To: maxima at math.utexas.edu
> Sent: Wednesday, September 10, 2008 5:41 PM
> Subject: I can't figure this out
>
>
> I am trying to fix the noninteractive.mac to do the simplify better and it
> only sort of works.
>
> (%i1) load(noninteractive);
> (%o1)
> C:/Maxima-5.16.3/share/maxima/5.16.3/share/contrib/noninteractive/noninteractive.mac
> (%i2) matchdeclare([aa,bb,cc],true);
> (%o2) done
> (%i3) tellsimp(if aa then bb elseif cc then bb, if aa or cc then bb);
> (%o3) merror(Circular rule attempted - `tellsimp')
> (%i4) declare([m,n],integer);
> (%o4) done
> (%i5) assume(n>0,m>0,not equal(n,m));
> (%o5) [n>0,m>0,notequal(n,m)]
> (%i6) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o6) if n-m<0 then 0 elseif n-m>0 then 0
> (%i7) matchdeclare([aa,bb,cc],true);
> (%o7) done
> (%i8) tellsimp(if aa then bb elseif cc then bb, if aa or cc then bb);
> (%o8) merror(Circular rule attempted - `tellsimp')
> (%i9) integrate(sin(m*x)*sin(n*x),x,0,2*%pi);
> (%o9) 0
>
> Why is %o6 different than %o9?  I can't figure it out.  It works the 
> second
> time but not the first and the second time is not quite what I expected
> either.  I get an error too.  I also uncommented out the code in
> noninteractive that does a lot of collapsing of conditionals.
>
> Rich
>
>
>
>
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima