diff and D notation - Maple Help

Home : Support : Online Help : Physics : diff and D notation

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:

$\frac{{\partial }^{2}}{\partial {{\mathrm{\theta }}}_{1}\partial {{\mathrm{\theta }}}_{2}}f\left({{\mathrm{\theta }}}_{1},{{\mathrm{\theta }}}_{2}\right)={\mathrm{D}}_{1,2}\left(f\right)\left({{\mathrm{\theta }}}_{1},{{\mathrm{\theta }}}_{2}\right)$

 where the derivative above should be interpreted as: first differentiate with respect to ${\mathrm{\theta }}_{1}$, then with respect to ${\mathrm{\theta }}_{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).

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)
 > $\mathrm{Setup}\left(\mathrm{anticommutativepre}=\mathrm{θ}\right)$
 $\mathrm{* Partial match of \text{'}}\mathrm{anticommutativepre}\mathrm{\text{'} against keyword \text{'}}\mathrm{anticommutativeprefix}\text{'}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{anticommutativeprefix}}{=}\left\{{\mathrm{\theta }}\right\}\right]$ (2)

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

 > $f\left(x,y,z,{\mathrm{θ}}_{1},{\mathrm{θ}}_{2},{\mathrm{θ}}_{3}\right)$
 ${f}{}\left({x}{,}{y}{,}{z}{,}{{\mathrm{\theta }}}_{{1}}{,}{{\mathrm{\theta }}}_{{2}}{,}{{\mathrm{\theta }}}_{{3}}\right)$ (3)
 > $\frac{{\partial }^{6}}{\partial {\mathrm{θ}}_{2}\partial z\partial {\mathrm{θ}}_{1}\partial y\partial {\mathrm{θ}}_{3}\partial x}$
 $\frac{{{\partial }}^{{6}}}{{\partial }{x}{\partial }{y}{\partial }{z}{\partial }{{\mathrm{\theta }}}_{{1}}{\partial }{{\mathrm{\theta }}}_{{2}}{\partial }{{\mathrm{\theta }}}_{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}{,}{{\mathrm{\theta }}}_{{1}}{,}{{\mathrm{\theta }}}_{{2}}{,}{{\mathrm{\theta }}}_{{3}}\right)$ (4)

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

 > $\mathrm{lprint}\left(\right)$
 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.

 > $\mathrm{convert}\left(,\mathrm{D}\right)$
 ${{\mathrm{D}}}_{{1}{,}{2}{,}{3}{,}{4}{,}{5}{,}{6}}{}\left({f}\right){}\left({x}{,}{y}{,}{z}{,}{{\mathrm{\theta }}}_{{1}}{,}{{\mathrm{\theta }}}_{{2}}{,}{{\mathrm{\theta }}}_{{3}}\right)$ (5)
 > $\mathrm{convert}\left(,\mathrm{diff}\right)$
 $\frac{{{\partial }}^{{6}}}{{\partial }{x}{\partial }{y}{\partial }{z}{\partial }{{\mathrm{\theta }}}_{{1}}{\partial }{{\mathrm{\theta }}}_{{2}}{\partial }{{\mathrm{\theta }}}_{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}{,}{{\mathrm{\theta }}}_{{1}}{,}{{\mathrm{\theta }}}_{{2}}{,}{{\mathrm{\theta }}}_{{3}}\right)$ (6)