[Maxima] diff(expr) and gradef
robert.dodier at gmail.com
Tue May 22 09:02:17 CDT 2007
On 5/22/07, Albert.Reiner at ecs.steyr.com <Albert.Reiner at ecs.steyr.com> wrote:
> Consider the following:
> (%i13) gradef(Vb, R, Sb) $
> (%i14) diff(Vb);
> (%o14) Sb del(R)
> (%i15) diff(3*Vb);
> (%o15) 3 del(Vb)
> Instead of %o15 I would have expected 3*Sb*del(R).
> Is there some setting that makes diff behave in this way?
> Or should I file a bug report?
This behavior seems to be intentional, but certainly is confusing.
The available documentation for gradef (probably derived from
the union of old documentation and what could be puzzled out
by reading the code) seems to distinguish gradef(F(x), ...) from
gradef(F, x, ...) although the intended effect of this distinction
Certainly the two cases are treated differently by the code.
gradef (Va(R), Sa);
:lisp (symbol-plist '|$Va|)
=> (GRAD ((r) $Sa))
gradef (Vb, R, Sa);
:lisp (symbol-plist '|$Vb|)
=> (MPROPS (NIL DEPENDS ($r) $ATOMGRAD (($r . $Sa))))
An easy fix would be to cause the two forms of gradef to
assign the same properties. But I don't know what else
that would break.
My advice at this point is to file a bug report.
Thanks for your help,
More information about the Maxima