convert derivatives between the diff and D notations - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Physics : Physics/conversions

Conversions between diff, D, and Physics[diff] - convert derivatives between the diff and D notations

Calling Sequence

convert(expr, diff)

convert(expr, D)




any valid Maple object



The Physics package provides a framework for computing with commutative, anticommutative, and noncommutative objects at the same time. Accordingly, it is possible to differentiate with respect to anticommutative variables; the command used to perform these derivatives is the diff command of the Physics package. (herein referred to as diff).


convert/D and convert/diff are converter routines between the D and diff formats for representing derivatives. The equivalence for anticommutative high order derivatives written in the D format and diff format of the Physics package is as in:



where the derivative above should be interpreted as: first differentiate with respect to θ1, then with respect to θ2 (or the opposite times −1); and the right hand side is not interpreted as a commutative higher order derivative.


Load the Physics package and set a prefix to identify anticommutative variables (see Setup for more information).


Setup(mathematicalnotation = true);



Setup(anticommutativepre = theta);

* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'




Consider a commutative function depending on commutative and anticommutative variables, and one higher order derivative of it.

f(x, y, z, theta[1], theta[2], theta[3]);



diff((3), x, theta[3], y, theta[1], z, theta[2]);



Note in the above that the commutative differentiation variables are collected as a group to be applied first, then the anticommutative ones.



Rewrite this expression in D notation, then convert back to diff notation.

convert((4), D);



convert((5), diff);




See Also

convert/D, convert/diff, D, diff, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics,diff, Physics,diff,anticommutative, Setup