how to load(sign-shift.lisp) in wxmaxima 0.8.0



how to load(sign-shift.lisp) in wxmaxima 0.8.0

I read form Maxima Digest, Vol 39, Issue 33 and  try to load(sign-shift.lisp)
(%i4) load(sign-shift.lisp)
Could not find `sign-shift.lisp' using paths in file_search_maxima,file_search_lisp.
 -- an error.  To debug this try debugmode(true);



> From: maxima-request at math.utexas.edu
> Subject: Maxima Digest, Vol 39, Issue 33
> To: maxima at math.utexas.edu
> Date: Sat, 10 Oct 2009 16:14:55 -0500
> 
> Send Maxima mailing list submissions to
> 	maxima at math.utexas.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.math.utexas.edu/mailman/listinfo/maxima
> or, via email, send a message with subject or body 'help' to
> 	maxima-request at math.utexas.edu
> 
> You can reach the person managing the list at
> 	maxima-owner at math.utexas.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Maxima digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: plotting a parametric integral (Richard Hennessy)
>    2. Re: how to solve x,y in R,  |x-2|+|2x+y-4|=0 (Richard Hennessy)
>    3. Re: how to plot f(x)=ax^2+bx+c with 5-point and line in	the
>       same fig (Richard Hennessy)
>    4. Re: Further code to improve the assume database (Dieter Kaiser)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 10 Oct 2009 15:09:32 -0400
> From: "Richard Hennessy" <rich.hennessy at verizon.net>
> Subject: Re: [Maxima] plotting a parametric integral
> To: "Leo Butler" <l.butler at ed.ac.uk>
> Cc: maxima at math.utexas.edu
> Message-ID: <51FF2100AFC8494CBDAB8038D6133762 at RichardsLaptop>
> Content-Type: text/plain; format=flowed; charset=iso-8859-1;
> 	reply-type=original
> 
> Well, yes, I knew that was it but I don't know if bug reports on stuff in
>  the share/contrib would be acted upon.  That is another concern.
> 
> Rich
> 
> 
> ----- Original Message ----- 
> From: "Richard Hennessy" <rich.hennessy at verizon.net>
> To: "Leo Butler" <l.butler at ed.ac.uk>
> Cc: <maxima at math.utexas.edu>
> Sent: Saturday, October 10, 2009 1:56 PM
> Subject: Re: [Maxima] plotting a parametric integral
> 
> 
> > Well, yes, I knew that was it but I don't know if bug reports on stuff in
> > the share/contrib directory should get a bug report.
> >
> > Rich
> >
> > ----- Original Message ----- 
> > From: "Leo Butler" <l.butler at ed.ac.uk>
> > To: "Richard Hennessy" <rich.hennessy at verizon.net>
> > Cc: "Stanislav Maslovski" <stanislav.maslovski at gmail.com>;
> > <maxima at math.utexas.edu>
> > Sent: Saturday, October 10, 2009 4:55 AM
> > Subject: Re: [Maxima] plotting a parametric integral
> >
> >
> >>
> >>
> >> On Fri, 9 Oct 2009, Richard Hennessy wrote:
> >>
> >> < Of course as stated before if k is known then Maxima can do the 
> >> problem.
> >> It
> >> < cannot do the general case for arbitrary k.
> >> <
> >> <
> >> < Rich
> >> <
> >> < ----- Original Message ----- From: "Richard Hennessy"
> >> < <rich.hennessy at verizon.net>
> >> < To: "Leo Butler" <l.butler at ed.ac.uk>; "Stanislav Maslovski"
> >> < <stanislav.maslovski at gmail.com>
> >> < Cc: <maxima at math.utexas.edu>
> >> < Sent: Friday, October 09, 2009 9:04 PM
> >> < Subject: Re: [Maxima] plotting a parametric integral
> >> <
> >> <
> >> < > This integral cannot be done by Maxima.  Try
> >> < >
> >> < > (%i4) display2d:false;
> >> < >
> >> < > (%o4) false
> >> < > (%i5) load(noninteractive);
> >> < >
> >> < > (%o5)
> >> < >
> >> "C:/Maxima-5.19.2/share/maxima/5.19.2/share/contrib/noninteractive/noninteractive.mac"
> >> < > (%i6) integrate(exp(%i*k*x)*sin(x)/x,x,minf,inf);
> >> < >
> >> < > (%o6) if k-1 < 0 then integrate(%e^(%i*k*x)*sin(x)/x,x,minf,inf)
> >> elseif
> >> < > equal(k-1,0) then %pi else 0
> >> < >
> >> < > The answer shows that when k-1<0 Maxima can't do the integration.
> >>
> >> Rich,
> >> This shows a weakness in the noninteractive code. If you walk through
> >> the cases that 'integrate' throws up, you will see that it does
> >> correctly identify all the various conditions on k. The noninteractive
> >> result you show is not following the various cases that are thrown up.
> >>
> >> Leo
> >>
> >> -- 
> >> The University of Edinburgh is a charitable body, registered in
> >> Scotland, with registration number SC005336.
> >>
> >>
> >
> >
> > _______________________________________________
> > Maxima mailing list
> > Maxima at math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> > 
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 10 Oct 2009 15:17:53 -0400
> From: "Richard Hennessy" <rich.hennessy at verizon.net>
> Subject: Re: [Maxima] how to solve x,y in R,  |x-2|+|2x+y-4|=0
> To: =?big5?B?tsAguM62rw==?= <bear.tw at hotmail.com>,	"Adam"
> 	<maxima at math.utexas.edu>
> Message-ID: <BEAC5736E2544966AB732F209A438DC4 at RichardsLaptop>
> Content-Type: text/plain; charset="big5"
> 
> There are 2 equations so solve for 2 unknowns.  I think this is a weirdness in solve because solving for just one of the unknowns that you are interested in does not work and new users try that a lot and get frustrated with Maxima because of this.  It happened to me when I first discovered Maxima.  FWIW
> 
> (%i1) eq1:x-2=0;
> (%o1)                                                                              x - 2 = 0
> (%i2) eq2:2*x+y-4=0;
> (%o2)                                                                           y + 2 x - 4 = 0
> (%i3) solve(eq1);
> (%o3)                                                                               [x = 2]
> (%i4) solve([eq1,eq2],[x,y]);
> (%o4)                                                                          [[x = 2, y = 0]]
> (%i5)
> 
> Rich
> 
> 
>   ----- Original Message ----- 
>   From: ?? ???? 
>   To: Adam 
>   Sent: Saturday, October 10, 2009 2:05 PM
>   Subject: how to solve x,y in R, |x-2|+|2x+y-4|=0
> 
> 
>   how to solve x,y in R,  |x-2|+|2x+y-4|=0
>   that is clearly, x=2,y=0.
>   I try to solve in maxima
>   eq1:x-2=0;
>   eq2:2*x+y-4=0;
>   solve(eq1);
> 
>   (%o1) x-2=0
>   (%i2) 
>   (%o2) y+2*x-4=0
>   (%o3) [x=2]
> 
>   how to use the solve of x and input eq2 to solve y=0?
> 
>   > From: maxima-request at math.utexas.edu
>   > Subject: Maxima Digest, Vol 39, Issue 30
>   > To: maxima at math.utexas.edu
>   > Date: Sat, 10 Oct 2009 12:00:05 -0500
>   > 
>   > Send Maxima mailing list submissions to
>   > maxima at math.utexas.edu
>   > 
>   > To subscribe or unsubscribe via the World Wide Web, visit
>   > http://www.math.utexas.edu/mailman/listinfo/maxima
>   > or, via email, send a message with subject or body 'help' to
>   > maxima-request at math.utexas.edu
>   > 
>   > You can reach the person managing the list at
>   > maxima-owner at math.utexas.edu
>   > 
>   > When replying, please edit your Subject line so it is more specific
>   > than "Re: Contents of Maxima digest..."
>   > 
>   > 
>   > Today's Topics:
>   > 
>   > 1. Further code to improve the assume database (Dieter Kaiser)
>   > 
>   > 
>   > ----------------------------------------------------------------------
>   > 
>   > Message: 1
>   > Date: Sat, 10 Oct 2009 17:43:53 +0200
>   > From: Dieter Kaiser <drdieterkaiser at web.de>
>   > Subject: Further code to improve the assume database
>   > To: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
>   > Message-ID: <1255189433.3499.2.camel at dieter-laptop>
>   > Content-Type: text/plain
>   > 
>   > We have the known bug ID: 1045920 "a>1 and b>1, is a+b>2?" 
>   > 
>   > (%i2) assume(a>1,b>1);
>   > (%o2) [a > 1,b > 1]
>   > 
>   > (%i3) sign(a+b-2);
>   > (%o3) pnz
>   > 
>   > I have a routine sign-shift which will correct this result:
>   > 
>   > (%i4) load("sign-shift.lisp");
>   > (%o4) "sign-shift.lisp"
>   > 
>   > (%i5) sign(a+b-2);
>   > (%o5) p! os
>   &g t; 
>   > It will work for a lot of more cases too:
>   > 
>   > (%i8) assume(a > 1,b > 1,c > 2)$
>   > 
>   > (%i2) is(b+a > 2)
>   > (%o2) true
>   > 
>   > (%i4) is(b+2*a > 3)
>   > (%o4) true
>   > 
>   > (%i6) is(c^2+b+2*a > 7)
>   > (%o6) true
>   > 
>   > It works for negative bounds too:
>   > 
>   > (%i8) assume(x < -1,y < -2,z < -2)$
>   > 
>   > (%i10) is(y+x < -3)
>   > (%o10) true
>   > 
>   > (%i12) is(y+2*x < -4)
>   > (%o12) true
>   > 
>   > z^2 is positive and the following sign is unknown:
>   > 
>   > (%i14) is(z^2+y+2*x < -7)
>   > (%o14) unknown
>   > 
>   > z^3 is negative and the test will give true again:
>   > 
>   > (%i16) is(z^3+y+2*x < -12)
>   > (%o16) true
>   > 
>   > I have no problems with the testsuite and the share_testsuite with the
>   > exception of one example:
>   > 
>   > ********************** Problem 40 ***************
>   > Input:
>   > fourier_elim(fourier_elim(eqs, [y, x, z]), [z, y, x])
>   > 
>   > 
>   > Result:
>   > [0 < z, z < min(4, - y - x + 4), 0 < y, y < 1, 0 < x, x < 1]
>   > 
>   > This differed from the expected result:
>   > [0 < z, z < 4 - x - y, 0 < y, y < 1, 0 < x, x < 1]
>   > 
>   > 124/125 tests passed (not counting 5 expected errors).
>   > 
>   > 
>   > I know nothing about the code of fourier_elim. My question is, if the
>   > new result is really an error or if we can accept it. Perhaps
>   > fourier_elim can be improved to take advantage of the extended
>   > functionality of $sign?
>   > 
>   > This is the code of sign-shift:
>   > 
>   > (defun sign-shift (expr)
>   > (do ((l (append (cdr (facts1 '$learndata)) (cdr (facts1 $context)))
>   > (cdr l))
>   > (e expr)
>   > (flag) (fact) (num))
>   > ((null l) (if flag ($expand e) expr))
>   > (setq fact (car l))
>   > (when (eq (caar fact) 'mgreaterp)> ;; Do we have something like a>2 or a<-1 on the list of facts?
>   > (cond ((and (symbolp (cadr fact))
>   > (not ($freeof (cadr fact) e))
>   > (not (member (cadr fact) '($%pi $%e $%gamma $%phi)))
>   > (mnump (setq num (caddr fact)))
>   > (not (zerop1 num)))
>   > (setq flag t)
>   > (if (mminusp num) (setq num (mul -1 num)))
>   > (setq e (maxima-substitute (add (cadr fact) num) (cadr
>   > fact) e)))
>   > ((and (symbolp (caddr fact))
>   > (not ($freeof (caddr fact) e))
>   > (not (member (caddr fact) '($%pi $%e $%gamma $%phi)))
>   > (mnump (setq num (cadr fact)))
>   > (not (zerop1 num)))
>   > (setq flag t)
>   > (if (mminusp num) (setq num (mul -1 num)))
>   > (setq e (maxima-substitute
>   > (sub (caddr fact) num) (caddr fact) e)))))))
>   > 
>   > 
>   > The routine sign-shift has to be called in the routine signsum in
>   > compar.lisp:
>   > 
>   > (defun signsum (x)
>   > (setq x (sign-shift x))
>   > ;; x might be simplified to an atom in sign-shift
>   > (when (atom x) (setq x (cons '(mplus) (list x))))
>   > 
>   > 
>   > Dieter Kaiser
>   > 
>   > 
>   > 
>   > ------------------------------
>   > 
>   > _______________________________________________
>   > Maxima mailing list
>   > Maxima at math.utexas.edu
>   > http://www.math.utexas.edu/mailman/listinfo/maxima
>   > 
>   > 
>   > End of Maxima Digest, Vol 39, Issue 30
>   > **************************************
> 
> 
> ------------------------------------------------------------------------------
>   ?U?? Windows Live Messenger 9.0?A?h?????q?B?????????A?M?Y???q?T?n???u?W?P???I?X ???Y?U?? 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
>   _______________________________________________
>   Maxima mailing list
>   Maxima at math.utexas.edu
>   http://www.math.utexas.edu/mailman/listinfo/maxima
> -------------- next part --------------
> URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20091010/48abe47e/attachment-0001.htm 
> 
> ------------------------------
> 
> Message: 3
> Date: Sat, 10 Oct 2009 16:38:56 -0400
> From: "Richard Hennessy" <rich.hennessy at verizon.net>
> Subject: Re: [Maxima] how to plot f(x)=ax^2+bx+c with 5-point and line
> 	in	the	same fig
> To: =?big5?B?tsAguM62rw==?= <bear.tw at hotmail.com>,	"Adam"
> 	<maxima at math.utexas.edu>
> Message-ID: <C05F35FFF5984296A052D603D4C49377 at RichardsLaptop>
> Content-Type: text/plain; charset="big5"
> 
> Hi again,
> 
> Try draw2d instead of plot2d.
> 
> (%i31) load(draw)$
> (%i33) m:makelist([j,F(j)],j,i-2,i+2);
> (%o33)                                     [[- 3, 11], [- 2, 5], [- 1, 3], [0, 5], [1, 11]]
> (%i34) draw2d(point_type=circle, point_size = 2, color=red, points(m), color=blue, explicit(F(x),x,-10,10));
> (%o34)                                                 [gr2d(points, explicit)
> 
> Rich
> -------------- next part --------------
> URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20091010/bd3d84e1/attachment-0001.htm 
> 
> ------------------------------
> 
> Message: 4
> Date: Sat, 10 Oct 2009 23:13:38 +0200
> From: Dieter Kaiser <drdieterkaiser at web.de>
> Subject: Re: [Maxima] Further code to improve the assume database
> To: Dieter Kaiser <drdieterkaiser at web.de>
> Cc: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
> Message-ID: <1255209218.3499.21.camel at dieter-laptop>
> Content-Type: text/plain
> 
> Am Samstag, den 10.10.2009, 20:06 +0200 schrieb Dieter Kaiser:
> > Am Samstag, den 10.10.2009, 12:35 -0500 schrieb Barton Willis:
> > > -----maxima-bounces at math.utexas.edu wrote: -----
> > > 
> > > 
> > > >I have no problems with the testsuite and the share_testsuite with the
> > > >exception of one example:
> > > >
> > > >********************** Problem 40 ***************
> > > >Input:
> > > >fourier_elim(fourier_elim(eqs, [y, x, z]), [z, y, x])
> > > >
> > > >
> > > >Result:
> > > >[0 < z, z < min(4, - y - x + 4), 0 < y, y < 1, 0 < x, x < 1]
> > > >
> > > >This differed from the expected result:
> > > >[0 < z, z < 4 - x - y, 0 < y, y < 1, 0 < x, x < 1]
> > > 
> > > The new result isn't wrong, but the old answer is better, isn't it? Since
> > > 0 < x < 1 and 0 < y < 1, we have -y - x + 4 < 4. So min(4, - y - x + 4)
> > > should simplify to -y - x + 4. There is a source code comment in
> > > Fourier elimination code: (What is the story with dosimp?)
> > 
> > Hello Barton,
> > 
> > thank you for the answer.
> > 
> > I will try to find the reason why we get a difference only for this
> > example.
> 
> I have got the error. The routine sign-shift was wrong. Now the
> testsuite and the share_testsuite run without a failure.
> 
> This is a correct version:
> 
> (defun sign-shift (expr)
>   (do ((l (append (cdr (facts1 '$learndata)) (cdr (facts1 $context)))
> (cdr l))
>        (e expr)
>        (flag) (fact) (num))
>       ((null l)
>        (if flag ($expand e) expr))
>     (setq fact (car l))
>     (cond ((and (eq (caar fact) 'mgreaterp)
>                (symbolp (cadr fact))
>                (not ($freeof (cadr fact) e))
>                (not (member (cadr fact) '($%pi $%e $%gamma $%phi)))
>                (mnump (setq num (caddr fact)))
>                (eq ($sign num) '$pos))
>            ;; symbol > positive number
>            (setq flag t)
>            (setq e (maxima-substitute (add (cadr fact) num) (cadr fact)
> e)))
>           ((and (eq (caar fact) 'mgreaterp)
>                 (symbolp (caddr fact))
>                 (not ($freeof (caddr fact) e))
>                 (not (member (caddr fact) '($%pi $%e $%gamma $%phi)))
>                 (mnump (setq num (cadr fact)))
>                 (eq ($sign num) '$neg))
>            ;; negative number > symbol
>            (setq flag t)
>            (setq e 
>                  (maxima-substitute (add (caddr fact) num) (caddr fact)
> e))))))
> 
> Dieter Kaiser
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
> 
> 
> End of Maxima Digest, Vol 39, Issue 33
> **************************************
 		 	   		  
_________________________________________________________________
?U?? Windows Live Messenger 9.0?A?h?????q?B?????????A?M?Y?????T?n???u?W?P???I?X ???Y?U??
http://download.live.com/messenger