[Maxima] Customizing Maxima

Richard Hennessy rvh2007 at comcast.net
Sun Oct 5 10:33:31 CDT 2008


No response.  Well, I got it.  I should have said 
matchdeclare(aa,true,xx,symbolp); 

instead of 

matchdeclare(aa,true,xx,symbolp(xx));



----- Original Message ----- 
From: "Richard Hennessy" <rvh2007 at comcast.net>
To: "Maxima List" <maxima at math.utexas.edu>
Sent: Sunday, October 05, 2008 1:42 AM
Subject: Customizing Maxima


I am having a problem.

I try to do this and I get major problems.

(%i1) matchdeclare(aa,true,xx,symbolp(xx));
(eq1) done
(%i2) tellsimpafter('diff(unit_step(xx-aa),xx),DiracDelta(xx-aa));
xx+-aa*1 partitions `sum'

-aa*1 Will be matched uniquely since sub-parts would otherwise be ambigious.

(eq2) [derivativerule1,simpderiv]

(%i3) (-x^2/15-25/3)*(unit_step(10+x)-unit_step(5+x));
(eq3) (-x^2/15-25/3)*(unit_step(x+10)-unit_step(x+5))

(%i4) diff(%, x);
Maxima encountered a Lisp error: Error in DEFINITELY-SO [or a callee]: DEFINITELY-SO [or a callee] requires less than 
two arguments.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

If I do it this way instead it works but only if the variable is x.

(%i1) matchdeclare(aa,true);
(eq1) done

(%i2) tellsimpafter('diff(unit_step(x-aa),x),DiracDelta(x-aa));
(eq2) [derivativerule1,simpderiv]

(%i3) (-x^2/15-25/3)*(unit_step(10+x)-unit_step(5+x));
(eq3) (-x^2/15-25/3)*(unit_step(x+10)-unit_step(x+5))

(%i4) diff(%, x);
(eq4) (-x^2/15-25/3)*(DiracDelta(x+10)-DiracDelta(x+5))-(2*x*(unit_step(x+10)-unit_step(x+5)))/15

If the variable is y it does not work.

(%i1) matchdeclare(aa,true);
(eq1) done
(%i2) tellsimpafter('diff(unit_step(x-aa),x),DiracDelta(x-aa));
(eq2) [derivativerule1,simpderiv]
(%i3) (-y^2/15-25/3)*(unit_step(10+y)-unit_step(5+y));
(eq3) (-y^2/15-25/3)*(unit_step(y+10)-unit_step(y+5))
(%i4) diff(%, x);
(eq4) 0

How can I say to Maxima that xx is a variable without getting an error?

Rich




More information about the Maxima mailing list