Examples using the DifferentialThomas Package
|
Consistency check
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
This shows that system Eq1 is inconsistent.
>
|
|
| (4) |
>
|
|
| (5) |
This shows that system Eq2 is consistent.
| (6) |
Namely, there is a non-empty set of equations in the output simple system.
>
|
|
| (7) |
Eq3 is the extension of Eq2 with the constant (parameter) 'a', here represented by a function of x,y with null partial derivatives
>
|
|
>
|
|
| (9) |
| (10) |
The last equation in the output system above shows that consistency holds if and only if .
To display the equations and inequations of the returned decomposition, as differential polynomials equal to or different than 0, use Display
| (12) |
|
|
Computation of Lagrangian constraints (Eq.13, V.P.Gerdt, D.Robertz. Lagrangian constraints and differential Thomas decomposition. Advances in Applied Mathematics 72, 113-138, 2016)
|
|
Use a ranking for the independent variables that will produce ODEs when possible
Rank the dependent variables in equation footing and use a non-elimination ranking
| (14) |
>
|
|
To check the last ranking set, you can call Ranking with no arguments
The current Ranking for the independent variables [t, x] and the dependent variables [u, v, w] is:
Matrixordering with Matrix(5, 5, [[1,0,0,0,0],[0,1,0,0,0],[0,0,1,1,1],[0,0,0,0,-1],[0,0,0,-1,0]])
| |
The Lagrangian is given by
>
|
|
| (17) |
The corresponding Euler-Lagrange equations are
>
|
|
| (18) |
>
|
|
| (19) |
| (20) |
In (20), the second equation is a (generalized) Lagrangian constraint.
| (21) |
Here the first, second and fourth equations are Lagrangian constraints.
| (22) |
The second, third and fifth equations are Lagrangian constraints.
| (23) |
The first, second and fourth equations are Lagrangian constraints.
| (24) |
The first, second and fourth equations are Lagrangian constraints.
The following picture illustrates the tree of case distinctions constructed by the Thomas algorithm:
|
|
Computation of Lagrangian constraints (Eq.8.1, A. Deriglazov. Classical mechanics, Hamiltonian and Lagrangian formalism. Springer, Heidelberg, 2010)
|
|
This application of the differential Thomas decomposition is taken from V.P.Gerdt, D.Robertz, "Lagrangian constraints and differential Thomas decomposition", Advances in Applied Mathematics, 72, 113-138, 2016
>
|
|
The Lagrangian and corresponding Euler-Lagrange equations
>
|
|
| (26) |
>
|
|
| (27) |
>
|
|
| (28) |
The equations and inequations of the three simple systems returned by ThomasDecomposition
| (29) |
The first expression , and in the second system are local constraints. The complementary constrains in the third system are .
|
|
Painlevé test for Burgers' equations (Ex.1, Fuding Xie, Yong Chen. An algorithmic method in Painleve analysis of PDE. Computer Physics Communications 154, 197-204, 2004)
|
|
>
|
|
| (30) |
Application of WTC method
>
|
|
| (31) |
| (32) |
>
|
|
>
|
|
| (33) |
>
|
|
| (34) |
>
|
|
| (35) |
>
|
|
| (36) |
>
|
|
>
|
|
Extraction of the coefficients at for j=1..3
>
|
|
| |
| |
| (37) |
>
|
|
>
|
|
| (39) |
| (40) |
| (41) |
Reduction of modulo radical differential ideal generated by
>
|
|
>
|
|
In this context, zero in (42) and (43) means that (30) possesses the Painleve property.
|
|
Cole-Hopf transformation (Ex.3.8, T. Baechler, V. Gerdt, M. Lange-Hegermann, D. Robertz. Algebraic Thomas decomposition of algebraic and differential systems. Journal of Symbolic Computation, 47, 1233-1266, 2012)
|
|
We demonstrate how to study the Cole-Hopf transformation by using the differential Thomas decomposition.
The claim is that for every non-zero analytic solution of the heat equation
the function defined by
is a solution to Burgers' equation
We define a ranking on the ring of differential polynomials in eta and zeta such that any partial derivative of eta is ranked higher than any partial derivative of zeta.
>
|
|
We define the differential system which combines the heat equation in eta and Burgers' equation in zeta:
>
|
|
| (45) |
We also include the assumption .
>
|
|
| (46) |
| (47) |
The simple system of the resulting Thomas decomposition allows to read off that zeta as defined above is a solution of Burgers' equation if eta is a solution of the heat equation, which proves the original claim. Conversely, since the above simple differential system is consistent with the heat equation for eta by construction, we conclude that for any solution zeta of Burgers' equation there exists a solution eta of the heat equation such that the Cole-Hopf transformation of eta is zeta.
|
|
Continuous stirred-tank reactor as nonlinear control system (Ex.1.2, H. Kwakernaak, R. Sivan. Linear Optimal Control Systems. Wiley-Interscience, New York, 1972)
|
|
The following system of nonlinear ordinary differential equations is a model of a continuous stirred-tank reactor containing dissolved material of concentration c(t) with two inputs with constant concentrations c1 and c2 and flow rates F1(t) and F2(t), respectively.
The outward flow has a flow rate proportional to the square root of the volume V(t) of liquid in the tank. We denote that square root by sV(t) and replace V(t) by sV(t)^2. The model also depends on an experimental constant k.
This model is described in Example 1.2 in H. Kwakernaak, R. Sivan, Linear Optimal Control Systems. Wiley-Interscience, New York, 1972.
A study of this model by means of the differential Thomas decomposition was first demonstrated in M. Lange-Hegermann, D. Robertz, Thomas decompositions of parametric nonlinear control systems, in: Proceedings of the 5th Symposium on System Structure and Control, Grenoble (France), pp. 291-296, 2013.
The system of equations is
Using the package DifferentialThomas we investigate the dependence of the control-theoretic behavior on configurations of the parameters c1 and c2.
The ranking is chosen so that F1 and F2 are eliminated, and if this succeeds, sV and c are also eliminated.
>
|
|
We include the equations which express that c1 and c2 do not depend on time into the system.
>
|
|
| (49) |
>
|
|
| (50) |
The three resulting simple differential systems describe different structural behavior of the control system, corresponding to different configurations of the parameters c1 and c2.
| (51) |
| (52) |
| (53) |
The previous two equations show that F1(t) and F2(t) are observable with respect to c(t) and sV(t). This is true for the configuration of parameters c1 and c2 described by the first simple system S1. Besides the third and fourth equations for c1 and c2, which were part of the input, the first simple system does not contain any equation not involving F1(t) and F2(t). Due to the choice of ranking we conclude that there exist no consequences of the system which only involve c(t) and sV(t) (and possibly c1 and c2). Since F1(t) and F2(t) are observable with respect to c and sV, we conclude that (c(t), sV(t)) is a flat output of the system.
| (54) |
| (55) |
We note that the second and third simple systems S2 and S3 describe behaviors of the system for which the parameters c1 and c2 are equal. In this configuration we find consequences which involve c(t) and/or sV(t) only (together with the parameters c1 and c2), which shows that (c(t), sV(t)) is not a flat output of the system in this case.
|
|
Singular solutions of ODEs
|
|
J. F. Ritt. Differential Algebra, American Mathematical Society, New York, N. Y., 1950. II.§4, II.§19
We show two types of singular solutions, which are found by the differential Thomas decomposition. The first system contains envelopes.
>
|
|
| (57) |
| (58) |
| (59) |
>
|
|
The second kind of singular solutions are limits, i.e. the power series expansions of a general solution can come arbitrarily close to the singular solution.
>
|
|
| (60) |
| (61) |
| (62) |
>
|
|
Ex.2.2.60, D. Robertz. Formal Algorithmic Elimination for PDEs. Lecture Notes in Mathematics, Vol. 2121. Springer, Cham, 2014
This example demonstrate that the differential Thomas decomposition naturally distinguishes cases so that singular solutions are separated from the general solution.
We consider the following nonlinear ODE:
>
|
|
| (64) |
>
|
|
| (65) |
The first simple system of the Thomas decomposition yields the general solution of the given ODE:
| (66) |
The inequation contained in the first simple system is a consequence of the assumption that the separant of the given ODE does not vanish.
The second simple system defines a singular solution, which is a solution of the given ODE for which the separant vanishes.
As illustration we plot a few trajectories belonging to the general solution given by S1 as well as the singular solution given by S2 in the same diagram.
>
|
|
| (68) |
>
|
|
Note that the singular solution is an envelope of the general solution.
|
|
An example of an ODE not solved using DifferentialAlgebra or DEtools:-rifsimp
|
|
This example, from Kamke's book on ODEs, demonstrates different behavior of the packages DifferentialThomas, DifferentialAlgebra and DEtools.
>
|
|
| (70) |
>
|
|
| (71) |
We obtain a Thomas decomposition for the given ODE with five simple differential systems.
| (72) |
| (73) |
| (74) |
| (75) |
The DifferentialAlgebra package and the command rifsimp (in Maple 2017) do not terminate on the same input in reasonable time.
|
|
Automatic theorem proving: evolute of a tractrix (M. Lange-Hegermann, Counting Solutions of Differential Equations, PhD thesis, RWTH Aachen University, 2014)
|
|
Reduction differential equations w.r.t. simple differential system us allows to prove theorems automatically by deciding whether certain equations are consequences of a differential system.
As an example, we look at the relation of two curves, the template and the tractrix . The template curve pulls the tractrix curve as if these two curves were connected by a fixed rod. The tractrix moves in the direction of the template but keeps a constant distance ; thus, it is also called curve of pursuit. The template pushes the tractrix away when it moves in the direction of the tractrix. Thereby, one can model the parking process of a truck.
We prove that the evolute of the tractrix is given by the intersection points of the normals of template and tractrix.
Set the ranking.
In the following, the (algebraic) parameter stands for the distance. As it is a constant, we have .
>
|
|
The next simple procedure symbolically computes the normal of a curve .
>
|
|
| (78) |
The following differential equations describe the interrelation of template and tractrix curve.
>
|
|
| (79) |
Symbolically compute the intersection of the normals of template and tractrix:
>
|
|
| (80) |
>
|
|
| (81) |
>
|
|
| (82) |
Compute the evolute:
>
|
|
| (83) |
Check whether these two solutions are equivalent modulo our equations, i.e., whether their difference is zero modulo our equations.
Compute simple differential systems from the equations
>
|
|
| (84) |
and reduce the difference with respect to both systems to zero
>
|
|
| (85) |
>
|
|
>
|
|
which implies the claim.
|
|
Parameter identification in predator-prey equations (M. Lange-Hegermann. Counting Solutions of Differential Equations. PhD thesis, RWTH Aachen University, 2014)
|
|
Consider the Lotka-Volterra (predator-prey) equations.
•
|
|
•
|
|
In them models the number of prey and number of predators. Furthermore, and are constants. The goal of this example is to demonstrate elimination for parameter identification, i.e., to express the parameters and in terms of the functions and The parameters cannot directly be measured in nature, but the amount of predator and prey can (to a certain extend). Therefore, using a block ranking with , we model the parameters as functions with derivative zero.
For a better presentation, exclude the trivial cases where or .
>
|
|
| (88) |
>
|
|
>
|
|
| (90) |
>
|
|
| (91) |
The differential Thomas decomposition results in a single simple differential system. In this system, one can solve for the constants and see that there exist two equations in and only, characterizing all possible solutions of the Lotka-Volterra equations:
>
|
|
The solutions
| (92) |
The equations on and
| (93) |
|
Return to Index of Example Worksheets
|