
Calling Sequence


difforder(a, x)


Parameters


a



algebraic expression, equation, inequation, set, or list

x



(optional) variable with respect to which the differential order must be evaluated





Description


•

The difforder command returns the general or particular differential order of a partial derivative or of an algebraic expression (or equation, inequation, set, or list). When called with only one argument, it returns the general differential order. When the first argument is an algebraic expression, then the order is given by the maximum order occurring inside it. If difforder is called with two arguments, it returns the differentiation order with respect to the indicated variable. difforder also works with anticommutative variables set using the Physics package.

•

In the case of a DESol structure, that is, an object that represents an ODE solution (no derivatives) but is written in terms of the differential equation (with derivatives), the difforder command returns the differential order of the highest derivative in the DESol structure. Derivatives of a DESol structure representing the solution of a linear ODE are of the same differential order as the DESol structure, because, given the solution of a linear ODE written in terms of the differential equation (that is a DESol structure), the derivative of this solution satisfies a linear ODE of the same order (see convert,DESol).

•

This function is part of the PDEtools package, and so it can be used in the form difforder(..) only after executing the command with(PDEtools). However, it can always be accessed through the long form of the command by using PDEtools[difforder](..).



Examples


>

eq1 := diff(f(u,v),u$2,v$3);

${\mathrm{eq1}}{\u2254}\frac{{{\partial}}^{{5}}}{{\partial}{{u}}^{{2}}{\partial}{{v}}^{{3}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{f}{}\left({u}{\,}{v}\right)$
 (1) 
>

difforder(eq1), difforder(eq1,u), difforder(eq1,v);

>

eq2 := D[1,2,2,3,3,3](f)(x,y,z);

${\mathrm{eq2}}{\u2254}{{\mathrm{D}}}_{{1}{,}{2}{,}{2}{,}{3}{,}{3}{,}{3}}{}\left({f}\right){}\left({x}{\,}{y}{\,}{z}\right)$
 (3) 
>

difforder(eq2), difforder(eq2,x), difforder(eq2,y), difforder(eq2,z);

${6}{,}{1}{,}{2}{,}{3}$
 (4) 
>

eq3 := h(t)*diff(f(x,y,z),x$2,z$3)+h(x,y,z)*Diff(D[2,2,2,2](j)(x,y,z),x);

${\mathrm{eq3}}{\u2254}{h}{}\left({t}\right){}\left(\frac{{{\partial}}^{{5}}}{{\partial}{{x}}^{{2}}{\partial}{{z}}^{{3}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{\,}{y}{\,}{z}\right)\right){+}{h}{}\left({x}{\,}{y}{\,}{z}\right){}\frac{{\textstyle {\partial}}}{{\textstyle {\partial}}{x}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{{\mathrm{D}}}_{{2}{,}{2}{,}{2}{,}{2}}{}\left({j}\right){}\left({x}{\,}{y}{\,}{z}\right)$
 (6) 
>

difforder(eq3,x), difforder(eq3,y), difforder(eq3,z), difforder(eq3,t);

${2}{,}{4}{,}{3}{,}{0}$
 (7) 
The following example uses difforder with an equation as the first argument.
>

eq4 := diff(f(x,y,z), `$`(x,2), `$`(z,3) ) = diff(j(x,y,z), `$`(y,5), x);

${\mathrm{eq4}}{\u2254}\frac{{{\partial}}^{{5}}}{{\partial}{{x}}^{{2}}{\partial}{{z}}^{{3}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{\,}{y}{\,}{z}\right){=}\frac{{{\partial}}^{{6}}}{{\partial}{x}{\partial}{{y}}^{{5}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{j}{}\left({x}{\,}{y}{\,}{z}\right)$
 (8) 
An example with an inequation as the first argument:
>

eq5 := diff(f(x,y,z),`$`(x,2), `$`(z,3) ) <> diff(j(x,y,z), `$`(y,5),x);

${\mathrm{eq5}}{\u2254}\frac{{{\partial}}^{{5}}}{{\partial}{{x}}^{{2}}{\partial}{{z}}^{{3}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{\,}{y}{\,}{z}\right){\ne}\frac{{{\partial}}^{{6}}}{{\partial}{x}{\partial}{{y}}^{{5}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{j}{}\left({x}{\,}{y}{\,}{z}\right)$
 (11) 
An example with DESol. The differential order is, by convention, that of the highest derivative.
>

DESol({f(x)*_Y(x)+diff(_Y(x),`$`(x,2))},{_Y(x)});

${\mathrm{DESol}}{}\left(\left\{{f}{}\left({x}\right){}{\mathrm{\_Y}}{}\left({x}\right){+}\frac{{{\ⅆ}}^{{2}}}{{\ⅆ}{{x}}^{{2}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{\mathrm{\_Y}}{}\left({x}\right)\right\}{\,}\left\{{\mathrm{\_Y}}{}\left({x}\right)\right\}\right)$
 (13) 
The derivative of a DESol structure has, by convention, the same differential order.
$\frac{{\ⅆ}}{{\ⅆ}{x}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{\mathrm{DESol}}{}\left(\left\{{f}{}\left({x}\right){}{\mathrm{\_Y}}{}\left({x}\right){+}\frac{{{\ⅆ}}^{{2}}}{{\ⅆ}{{x}}^{{2}}}\phantom{\rule[0.0ex]{0.4em}{0.0ex}}{\mathrm{\_Y}}{}\left({x}\right)\right\}{\,}\left\{{\mathrm{\_Y}}{}\left({x}\right)\right\}\right)$
 (15) 


