On Fri, Jul 4, 2008 at 12:43 PM, Rupert Swarbrick
<rswarbrick at googlemail.com> wrote:
> It only works once (!) After which, pderivop seems broken and you get:
>
> (%i3) pderivop(lambda([x,y], u(sin(x), cos(y))),0,1);
>
> (%o3) lambda([x, y], u(sin(x), cos(y)))
> (0, 1)
> rather than what you get before:
>
> (%i2) pderivop(lambda([x,y], u(sin(x), cos(y))),0,1);
>
> (%o2) lambda([g1117, g1116], - sin(g1116) u (sin(g1117), cos(g1116)))
> (0, 1)
Rupert, I get the same output on second and later calls to pderivop.
Here's what I get with Maxima 5.15.0cvs + GCL + Linux:
(%i1) display2d : false;
(%o1) false
(%i2) load ("/tmp/polar2.mac");
(%o2) "/tmp/polar2.mac"
(%i3) pderivop (lambda ([x, y], u (sin (x), cos (y))), 0, 1);
(%o3) lambda([?g32437,?g32436],
-sin(?g32436)*?%pderivop(u,0,1)(sin(?g32437),
cos(?g32436)))
(%i4) pderivop (lambda ([x, y], u (sin (x), cos (y))), 0, 1);
(%o4) lambda([?g32445,?g32444],
-sin(?g32444)*?%pderivop(u,0,1)(sin(?g32445),
cos(?g32444)))
Same behavior for SBCL. What version of Maxima & Lisp are you working with?
A random comment -- if you load pdiff twice it could well be that stuff
gets messed up. Haven't tried it myself.
HTH
Robert Dodier