Conversions between diff, D, and Physics[diff] - convert derivatives between the diff and D notations
Calling Sequence
convert(expr, diff)
convert(expr, D)
Parameters
expr
-
any valid Maple object
Description
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:
∂2∂θ1∂θ2f⁡θ1,θ2=D1,2⁡f⁡θ1,θ2
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.
Examples
Load the Physics package and set a prefix to identify anticommutative variables (see Setup for more information).
with⁡Physics:
Setup⁡mathematicalnotation=true
mathematicalnotation=true
Setup⁡anticommutativepre=θ
* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'
_______________________________________________________
anticommutativeprefix=θ
Consider a commutative function depending on commutative and anticommutative variables, and one higher order derivative of it.
f⁡x,y,z,θ1,θ2,θ3
diff⁡,x,θ3,y,θ1,z,θ2
∂6∂x∂y∂z∂θ1∂θ2∂θ3f⁡x,y,z,θ1,θ2,θ3
Note in the above that the commutative differentiation variables are collected as a group to be applied first, then the anticommutative ones.
lprint⁡
Physics:-diff(Physics:-diff(Physics:-diff(diff(diff(diff(f(x,y,z,theta[1],theta[2],theta[3]),x),y),z),theta[1]),theta[2]),theta[3])
Rewrite this expression in D notation, then convert back to diff notation.
convert⁡,D
D1,2,3,4,5,6⁡f⁡x,y,z,θ1,θ2,θ3
convert⁡,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
Download Help Document