DEtools
checkrank
illustrate ranking to be used for a rifsimp calculation
Calling Sequence
Parameters
Description
Examples
checkrank(system, options)
checkrank(system, vars, options)
system
-
list or set of polynomially nonlinear PDEs or ODEs (may contain inequations)
vars
(optional) list of the dependent variables to solve for
options
(optional) sequence of options to control the behavior of checkrank
To simplify systems of PDEs or ODEs, a ranking must be defined over all indeterminates present in the system. The ranking allows the algorithm to select an indeterminate for which to solve algebraically when looking at an equation. The checkrank function can be used to understand how the ranking-associated options define a ranking in rifsimp. For more detailed information about rankings, please see rifsimp[ranking].
The checkrank function takes in the system as input along with the options:
List of dependent variables (See Following)
indep=[indep vars]
List of independent variables (See Following)
ranking=[...]
Specification of exact ranking (See rifsimp[ranking])
degree=n
Use all derivatives to differential order n.
The output is a list that contains the derivatives in the system ordered from highest to lowest rank. If degree is given, all possible derivatives of all dependent variables up to the specified degree are used; otherwise, only the derivatives present in the input are used.
Default Ranking
When simplifying a system of PDEs or ODEs, you may want to eliminate higher order derivatives in favor of lower order derivatives. Do this by using a ranking by differential order, as is the default for rifsimp. Unfortunately, this says nothing about how ties are broken, for example, between two third order derivatives.
The breaking of ties is accomplished by first looking at the differentiations of the derivative with respect to each independent variable in turn. If they are of equal order, then the dependent variable itself is examined. The independent variable differentiations are examined in the order in which they appear in the dependency lists of the dependent variables, and the dependent variables are ordered alphabetically.
So, for example, given an input system containing f(x,y,z),g(x,y,z),h(x,z), the following will hold:
[x,y,z]
Order of independent variables
[f,g,h]
Order of dependent variables
f[x] < g[xx]
By differential order
g[xy] < f[xxz]
f[xy] < g[xx]
By differentiation with respect to x (x>y)
Note: differential order is equal
f[xzz] < g[xyz]
By differentiation with respect to y
g[xx] < f[xx]
By dependent variable
Note: differentiations are exactly equal
h[xz] < f[xz]
Note that, in the above example, the only time the dependent variable comes into play is when all differentiations are equal.
Changing the Default
To change the default ranking, use the vars, indep=[...], or ranking=[...] options. The vars can be specified in two distinct ways:
1. Simple List
If the vars are specified as a simple list, this option overrides the alphabetical order of the dependent variables described in the default ordering section.
2. Nested List
This option gives a solving order for the dependent variables. For example, if vars were specified as [[f],[g,h]], this would tell rifsimp to rank any derivative of f greater than all derivatives of g and h. Then, and when comparing g and h, the solving order would be differential order, then differentiations, and then dependent variable name as specified by the input [g,h]. This would help in obtaining a subset of the system that is independent of f; that is, a smaller PDE system in g and h only.
The indep=[...] option provides for the specification of the independent variables for the problem, as well as the order in which differentiations are examined. So if the option indep=[x, y] were used, then f[x] would be ranked higher than f[y], but if indep=[y, x] were specified, then the opposite would be true.
Before using the ranking=[...] option, please read rifsimp[ranking].
with⁡DEtools:
The first example uses the default ranking for a simple system.
sys≔diff⁡g⁡x,x,x−g⁡x=0,diff⁡f⁡x,x3−diff⁡g⁡x,x=0
sys≔ⅆ2ⅆx2g⁡x−g⁡x=0,ⅆⅆxf⁡x3−ⅆⅆxg⁡x=0
checkrank⁡sys
ⅆ2ⅆx2g⁡x,ⅆⅆxf⁡x,ⅆⅆxg⁡x,g⁡x
By default, the first equation would be solved for the second order derivative in g(x), while the second equation would be solved for the first order derivative in f(x). Suppose instead that we always want to solve for g(x) before f(x). We can use vars.
checkrank⁡sys,g,f
ⅆ2ⅆx2g⁡x,ⅆⅆxg⁡x,g⁡x,ⅆⅆxf⁡x
So here g(x) and all derivatives are ranked higher than f(x).
The next example shows the default for a PDE system in f(x,y), g(x,y), h(y) (where we use the degree=2 option to get all second order derivatives):
checkrank⁡f⁡x,y,g⁡x,y,h⁡y,degree=2
∂2∂x2f⁡x,y,∂2∂x2g⁡x,y,0,∂2∂x∂yf⁡x,y,∂2∂x∂yg⁡x,y,0,∂2∂y2f⁡x,y,∂2∂y2g⁡x,y,ⅆ2ⅆy2h⁡y,∂∂xf⁡x,y,∂∂xg⁡x,y,0,∂∂yf⁡x,y,∂∂yg⁡x,y,ⅆⅆyh⁡y,f⁡x,y,g⁡x,y,h⁡y
All second order derivatives are first (first 7 entries), then the first derivatives with respect to x ahead of the first derivatives with respect to y, and finally f⁡x,y, then g⁡x,y, then h⁡y.
Suppose we want to eliminate higher derivatives involving y before x. We can use indep for this as follows:
checkrank⁡f⁡x,y,g⁡x,y,h⁡y,indep=y,x,degree=2
∂2∂y2f⁡x,y,∂2∂y2g⁡x,y,ⅆ2ⅆy2h⁡y,∂2∂x∂yf⁡x,y,∂2∂x∂yg⁡x,y,0,∂2∂x2f⁡x,y,∂2∂x2g⁡x,y,0,∂∂yf⁡x,y,∂∂yg⁡x,y,ⅆⅆyh⁡y,∂∂xf⁡x,y,∂∂xg⁡x,y,0,f⁡x,y,g⁡x,y,h⁡y
Now to eliminate f(x,y) and derivatives in terms of g⁡x,y and h⁡y, and to rank y derivatives higher than x, we can combine the options to obtain the following.
checkrank⁡f⁡x,y,g⁡x,y,h⁡y,f,g,h,indep=y,x,degree=2
∂2∂y2f⁡x,y,∂2∂x∂yf⁡x,y,∂2∂x2f⁡x,y,∂∂yf⁡x,y,∂∂xf⁡x,y,f⁡x,y,∂2∂y2g⁡x,y,ⅆ2ⅆy2h⁡y,∂2∂x∂yg⁡x,y,0,∂2∂x2g⁡x,y,0,∂∂yg⁡x,y,ⅆⅆyh⁡y,∂∂xg⁡x,y,0,g⁡x,y,h⁡y
See Also
rifsimp
rifsimp[overview]
rifsimp[ranking]
Download Help Document