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)

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,2fθ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).

withPhysics:

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

Setupanticommutativepre=θ

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

_______________________________________________________

anticommutativeprefix=θ

(2)

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

fx,y,z,θ1,θ2,θ3

fx,y,z,θ1,θ2,θ3

(3)

6θ2zθ1yθ3x

6xyzθ1θ2θ3fx,y,z,θ1,θ2,θ3

(4)

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,6fx,y,z,θ1,θ2,θ3

(5)

convert,diff

6xyzθ1θ2θ3fx,y,z,θ1,θ2,θ3

(6)

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