The casesplit routine can be used for many different purposes. These examples are organized as follows: first, some typical situations; then, three worked examples in the framework of integrating factors and symmetries for second order ODEs; and finally, an illustration of how different rankings can be used to obtain different results in a DE system with many variables.
For convenience, first declare some functions of to be displayed using only their names (for example, as ), and as the prime variable (see PDEtools[declare]).
The splitting of a single nonlinear ODE into three cases (two of them related to singular solutions) is illustrated here.
To see a graphical representation of this splitting use the caseplot option
To identify which of these cases lead to the singular solutions, it suffices to note that singular solutions depend on fewer arbitrary constants, that is, they are solutions to ODEs of lower differential order. If there is only one input equation, it can be given directly (no braces or square brackets are required) and there is no need for a ranking specification.
When there are more variables, the ranking given can lead to different regular systems. For the following example, the ranking was chosen by casesplit's heuristics.
If infolevel is set to a greater integer (possible settings are 1 through 5), more detailed information about the computation method is displayed.
-> Solving ordering to be used: [y, x]
Ranking for 1st round is: [[y, x]]
Ranking for 2nd round is: [y, x]
1st round is performed, original system is split into 1 cases
2nd round is performed; processing answer ...
| |
Here, the results of the other possible ranking, , are shown.
Ranking for 1st round is: [[x, y]]
Ranking for 2nd round is: [x, y]
1st round is performed, original system is split into 1 cases
2nd round is performed, original system is now split into 2 cases. Processing answer ...
| |
This also shows that different rankings may lead to a different number of cases. However, the union of the set of solutions to each case is always equal to the solution to the original problem independent of the ranking used.
The uncoupling of systems with many variables is a more difficult problem. In some cases, as in the following ODE system, the uncoupling ordering determined by casesplit succeeds.
-> Solving ordering to be used: [j, h]
Ranking for 1st round is: [[j, h, f, _F1, g, _F2]]
Ranking for 2nd round is: [j, h, f, _F1, g, _F2]
1st round is performed, original system is split into 2 cases
2nd round is performed; processing answer ...
| |
In the answer above, we see from the displayed information (userinfo) that the ranking chosen by casesplit's heuristics was . This means that each returned case has expressed in terms of , then in terms of , in terms of and, eventually, a condition on alone. This is the case for all input systems provided that they are not subdetermined (for instance, too many functions for too few equations).
Regarding the functions and displayed in the userinfo, they were introduced to transform the non-polynomial system into a polynomial one by extending the system with auxiliary functions and and related auxiliary equations. They are removed before returning the answer. To see the polynomial version of the problem actually processed use the dpolyform command.
It is important to remember that, depending on the input system, the ranking chosen by casesplit heuristics may not be the best one. It could, for example, lead to an uncoupling process with too many large intermediate equations. In such a case, the user's suggestion in the form of a different ranking may solve the problem.
In other cases, independent of the ranking, the differential elimination process may be to expensive in time. For these cases one can use the ctl=N optional argument to impose a timelimit of seconds per case, at the cost of missing the output of cases requiring more time to compute.
casesplit works with systems involving mathematical functions whose arguments are arbitrary algebraic expressions provided they can be represented in differential polynomial form, which is possible provided that each constituting part of the expression, by itself, admits a differential polynomial form. For example
A differential polynomial form for this expression is
These differential polynomial forms can be verified for correctness as usual using odetest or pdetest when it is the case of PDEs. In this case, we test that satisfies this ODE
So, if such an expression appears in the system of equations received by casesplit its differential polynomial form is constructed as in the above, this equation is added to the system and the expression replaced by the auxiliary unknown , this extended system is processed and before returning a result is replaced back by the original expression it represented.
When unknown functions whose arguments are algebraic expressions (i.e. not variables of type name) are present in the system, when possible, a change of variables is performed such that the transformed functions all depend on variables of type name, the transformed system is tackled, and a further change of variables to revert to the original variables is performed before the result is returned. For example,
The natural ranking for this system takes higher than or (i.e. write as a function of the other ones)
Writing or as a function of , however, turns evident the (otherwise implicit) relationship between the derivatives of (or ) and . To see this, rank and higher
These arbitrary objects whose arguments are not of type name can appear nested, and provided a differential polynomial form exists for each component of the composition of expressions, a differential polynomial form exists for the composition, and with that casesplit can handle the case when it appears in a given system of equations. For example, a differential polynomial form for this composite expression is:
When the system involves D derivatives evaluated at points that are represented by algebraic expressions, these derivative can be mapped into a function of variables not of type name that can in turn be represented in differential polynomial form as explained in the Description section. This is particularly useful to tackle PDEs. For example
A differential polynomial form for this pde is given by
This is a higher order PDE that can be solved in terms of arbitrary functions
and from this solution, a solution to the original problem can be derived.
A PDE example where we indicate that 'f(x,y,z)' is our solving variable. Hence, and are viewed as function parameters of the problem.
The following is a PDE system which is inconsistent.
Warning: System is inconsistent
| |
A series of worked examples follows.
Worked example I
Show that the ode[3] has no integrating factors depending on less than three variables.
There are three possible cases to consider: (x,y), (x,y'), and (y,y'). Starting with (x,y), we first set the PDE which must be satisfied by this integrating factor (see odepde).
Now, noting that the PDE above is polynomial in and (represented by and , respectively), take the corresponding coefficients and set each one to zero to obtain a PDE system for (x,y). These tasks (setting the determining PDE above and splitting it into a system by setting each coefficient of equal to zero) are automatically performed by gensys.
Taking into account the integrability conditions implicit in the system above, this system simplifies to the following.
This shows that there is no solution other than the trivial = 0.
For the case (x,y'):
So, there is no solution of the form (x,y'). Finally, for (y,y'):
From these three results, we conclude that ode[3] has no integrating factors depending on only two variables.
Worked example II
Show that ode[4] has only one point symmetry, .
First, set up the PDE system for the symmetry (the infinitesimal symmetry generators and ). Again, this can be done by using odepde to obtain the determining PDE and then splitting it by taking coefficients or in one step by using gensys.
The system above has only the solution , which is equivalent to .
Worked example III
Determine the conditions on such that ode[5] has point symmetries with both infinitesimals different from zero.
First, set up the determining PDE system for the infinitesimals and .
Note that the dependent variable is also specified. Otherwise, gensys complains since ode[5] contains derivatives of both and , and it cannot determine the dependent variable of the problem. could be specified as the second argument as well. Now state, using inequations, that both infinitesimals should be different from zero.
Next, run casesplit. In doing so, different rankings could lead to what is wanted. Use to solve for as functions of , plus separated extra conditions on alone (these are the conditions we want). When solving for , do not uncouple from . This uncoupling is irrelevant since it would take more time and resources to be computed, and only the conditions on are wanted.
In the answer above, we see three systems, each one associated to different conditions on , and both and expressed in terms of each other and .
The last example illustrates the use of different rankings. Consider the following PDE system.
You can assign the ranking for the unknowns and/or the ordering used for the independent variables by passing the optional arguments rankingused = R and/or ivarsused = ii, where the right-hand sides, R and ii, can actually be any assignable objects. For example, discarding the singular cases for simplicity, the triangularization of this system and ranking and ordering of independent variables used for that are:
Suppose however that you are interested in an answer expressing , , and in terms of and , as well as some conditions on and is wanted. Then, the corresponding ranking is:
If, in addition, these conditions on and expressed with as a function of , as well as a condition involving alone, are wanted, then the ranking would be . If, moreover, as a function of and is wanted, the ranking would be . The ranking also works, but in general, when asking for "more uncoupling", the time and memory spent is greater. For the purpose assumed in this example, is the least expensive ranking leading to what is requested, while is the most expensive one.
To see what the specified ranking represents more formally, one can query the diffalg[print_ranking] command as follows. Define the differential ring of the problem and then issue the query.
In lists, leftmost elements are greater than rightmost ones.
The derivatives of [mu, A, B] are ordered by grlexA:
_U [tau] > _V [phi] when
|tau| > |phi| or
|tau| = |phi| and _U > _V w.r.t. the list of indeterminates or
|tau| = |phi| and _U = _V and tau > phi w.r.t. [x, y]
Any derivative of [mu, A, B] is greater than any derivative of [F, H]
The derivatives of [F, H] are ordered by grlexA.
| |
casesplit also works with anticommutative variables, using the approach explained in PerformOnAnticommutativeSystem.
Set first and as suffixes for variables of type/anticommutative (see Setup)
A PDE system example with one unknown anticommutative function of four variables, two commutative and two anticommutative; to avoid redundant typing in the input that follows and redundant display of information on the screen, use PDEtools:-declare, and PDEtools:-diff_table, that also handles anticommutative variables by automatically using Physics:-diff when Physics is loaded
Now we can enter derivatives directly as the function's name indexed by the differentiation variables and see the display the same way; two PDEs
The simplification of this system taking into account its integrability conditions