D_Dx - Maple Help

PDEtools

 D_Dx
 differentiate expressions in function or jet notation, with respect to independent or dependent (function) variables of the jet space.

 Calling Sequence D_Dx(expression, x, ... , DepVars, 'options'='value')

Parameters

 expression - any algebraic expression or algebraic equation x, ... - differentiation variables, can include functions of the jet spece (dependent variables) or their derivatives DepVars - a function or a list of them indicating the dependent variables of the problem jetnotation = ... - (optional) can be true (default, the notation found in expression), false (function notation), jetvariables, jetvariableswithbrackets, jetnumbers or jetODE; to respectively return or not using the different jet notations available

Description

 • The D_Dx command computes total derivatives, as diff does, but for D_Dx the input and/or the output can be in jet notation. Also, D_Dx can compute partial derivatives with respect to dependent variables of the jet space (functions in DepVars) or their derivatives. D_Dx also works with anticommutative variables set using the Physics package.
 • The first argument, expression, is the object being differentiated, followed by the differentiation variables, and then the last argument, $\mathrm{DepVars}$, is always an indication of the dependent variables of the problem, either as a function (could be that way when there is only one) or as a list of them.
 • The differentiation variables can include any name but also functions of the jet space, that is, functions in DepVars or their partial derivatives. When the differentiation variable is a name the total derivative is computed, so for instance $x$, $f\left(x\right)$ and $\mathrm{f\text{'}}\left(x\right)$ are all considered functions of $x$. When the differentiation variable is a function, however, a partial derivative is computed in that, for instance, $f\left(x\right)$ and $\mathrm{f\text{'}}\left(x\right)$ are considered independent objects. This permits computing in a natural way objects like

$\frac{ⅆ}{ⅆt}\left(\frac{\partial }{\partial \stackrel{\mathbf{.}}{x}}L\left(x\left(t\right),\stackrel{\mathbf{.}}{x}\left(t\right)\right)\right)=\mathrm{D_Dx}\left(L\left(x\left(t\right),\stackrel{\mathbf{.}}{x}\left(t\right)\right),\stackrel{\mathbf{.}}{x}\left(t\right),t,\left[x\left(t\right)\right]\right)$

 where the right-hand-side is entered as D_Dx(L(x(t), diff(x(t), t)), diff(x(t), t), t, [x(t)]) and means to differentiate $L\left(x\left(t\right),\stackrel{\mathbf{.}}{x}\left(t\right)\right)$ with respect to $\stackrel{\mathbf{.}}{x}\left(t\right)$ followed by taking the total derivative with respect to $t$, taking $\left[x\left(t\right)\right]$ as the dependent variable defining the jet space.
 • The output is by default expressed in the jetnotation found in the input expression, whenever expression is written using jetnotation, or otherwise it is expressed in jetvariables notation when expression is passed in standard function notation. This default can be changed by passing the optional argument jetnotation = ..., where the right hand side can be false (to return in function notation), jetnumbers, jetvariables, jetvariableswithbrackets or jetODE; see the jet notations available.

Examples

Consider a PDE problem with three dependent variables

 > $\mathrm{with}\left(\mathrm{PDEtools},\mathrm{D_Dx},\mathrm{ToJet},\mathrm{FromJet}\right)$
 $\left[{\mathrm{D_Dx}}{,}{\mathrm{ToJet}}{,}{\mathrm{FromJet}}\right]$ (1)
 > $\mathrm{DepVars}≔\left[u\left(x,t\right),v\left(t\right),w\left(y\right)\right]$
 ${\mathrm{DepVars}}{≔}\left[{u}{}\left({x}{,}{t}\right){,}{v}{}\left({t}\right){,}{w}{}\left({y}\right)\right]$ (2)
 > $\mathrm{PDE}≔\mathrm{diff}\left(u\left(x,t\right)v\left(t\right)w\left(y\right),x\right)+\mathrm{diff}\left(u\left(x,t\right)v\left(t\right)w\left(y\right),t,y\right)$
 ${\mathrm{PDE}}{≔}\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{t}\right)\right){}{v}{}\left({t}\right){}{w}{}\left({y}\right){+}\left(\frac{{\partial }}{{\partial }{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{t}\right)\right){}{v}{}\left({t}\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{w}{}\left({y}\right)\right){+}{u}{}\left({x}{,}{t}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{v}{}\left({t}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{w}{}\left({y}\right)\right)$ (3)

Using the standard diff command you can compute the total derivative of this expression with respect to $x,t$ or $y$. It is not possible, however, to differentiate $\mathrm{PDE}$ with respect to any of the functions in $\mathrm{DepVars}$ or its partial derivatives. For that purpose you can use D_Dx

 > $\mathrm{D_Dx}\left(\mathrm{PDE},w\left(y\right),\mathrm{DepVars}\right)$
 ${v}{}{{u}}_{{x}}$ (4)

Note that the result is presented in jetvariables jet notation, a compact mathematical notation understood by all the symmetry commands of PDEtools. To have this result expressed in function notation use FromJet or directly call D_Dx with the option jetnotation = false

 > $\mathrm{FromJet}\left(,\mathrm{DepVars}\right)$
 ${v}{}\left({t}\right){}\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{t}\right)\right)$ (5)
 > $\mathrm{D_Dx}\left(\mathrm{PDE},w\left(y\right),\mathrm{DepVars},\mathrm{jetnotation}=\mathrm{false}\right)$
 ${v}{}\left({t}\right){}\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({x}{,}{t}\right)\right)$ (6)

In this other example it is computed the partial derivative with respect to $\frac{\partial }{\partial x}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)$ followed by the total derivative with respect to $t$

 > $\mathrm{D_Dx}\left(\mathrm{PDE},u\left[x\right],t,\mathrm{DepVars}\right)$
 ${{v}}_{{t}}{}{w}$ (7)

In the input above, instead of u[x] you can write diff(u(x,t), x) (function notation) or u[1] (this is the jetnumbers jetnotation), all of them representing the same mathematical object.

You can also work with $\mathrm{PDE}$ directly in more compact jetnotation; compare with (4.3)

 > $\mathrm{JPDE}≔\mathrm{ToJet}\left(\mathrm{PDE},\mathrm{DepVars}\right)$
 ${\mathrm{JPDE}}{≔}{u}{}{{v}}_{{t}}{}{{w}}_{{y}}{+}{v}{}{w}{}{{u}}_{{x}}{+}{v}{}{{u}}_{{t}}{}{{w}}_{{y}}$ (8)

Compute now the total derivative with respect to $t$ comparing the results of differentiating $\mathrm{PDE}$ and its jet version $\mathrm{JPDE}$

 > $\mathrm{D_Dx}\left(\mathrm{PDE},t,\mathrm{DepVars}\right)$
 ${u}{}{{v}}_{{t}{,}{t}}{}{{w}}_{{y}}{+}{v}{}{w}{}{{u}}_{{x}{,}{t}}{+}{v}{}{{u}}_{{t}{,}{t}}{}{{w}}_{{y}}{+}{w}{}{{u}}_{{x}}{}{{v}}_{{t}}{+}{2}{}{{u}}_{{t}}{}{{v}}_{{t}}{}{{w}}_{{y}}$ (9)
 > $\mathrm{D_Dx}\left(\mathrm{JPDE},t,\mathrm{DepVars}\right)$
 ${u}{}{{v}}_{{t}{,}{t}}{}{{w}}_{{y}}{+}{v}{}{w}{}{{u}}_{{x}{,}{t}}{+}{v}{}{{u}}_{{t}{,}{t}}{}{{w}}_{{y}}{+}{w}{}{{u}}_{{x}}{}{{v}}_{{t}}{+}{2}{}{{u}}_{{t}}{}{{v}}_{{t}}{}{{w}}_{{y}}$ (10)
 > $-$
 ${0}$ (11)