Examples using the DifferentialThomas Package
Consistency check
restart;
with⁡DifferentialThomas
ComplementOfDecomposition,Display,Equations,Inequations,IntersectDecompositions,LinearCombination,NormalForm,PowerSeriesSolution,Ranking,ReducedForm,ThomasDecomposition,Tools
withTools:
Ranking⁡x,y,u:
Eq1 ≔ diffux, y, y diffux, y, x+diffux, y, x+1=0, diffux, y, x, x ux, y−diffux, y, y2+ux, y=0
Eq1≔∂∂yu⁡x,y⁢∂∂xu⁡x,y+∂∂xu⁡x,y+1=0,∂2∂x2u⁡x,y⁢u⁡x,y−∂∂yu⁡x,y2+u⁡x,y=0
TD≔ThomasDecomposition⁡Eq1
TD≔
This shows that system Eq1 is inconsistent.
Eq2 ≔ diffux, y, y diffux, y, x+diffux, y, x+1, diffux, y, x, x ux, y−diffux, y, y2−diffux, y, x
Eq2≔∂∂yu⁡x,y⁢∂∂xu⁡x,y+∂∂xu⁡x,y+1,∂2∂x2u⁡x,y⁢u⁡x,y−∂∂yu⁡x,y2−∂∂xu⁡x,y
TD≔ThomasDecomposition⁡Eq2
TD≔DifferentialSystem
This shows that system Eq2 is consistent.
EquationsTD
∂∂xu⁡x,y=−1∂∂yu⁡x,y+1,∂∂yu⁡x,y3=−∂∂yu⁡x,y2+1
Namely, there is a non-empty set of equations in the output simple system.
Eq3 ≔ diffux, y, y diffux, y, x+diffux, y, x+1=0, ax, y ux, y+diffux, y, x, x ux, y−diffux, y, y2−diffux, y, x=0, diffax, y, x=0, diffax, y, y=0
Eq3≔∂∂yu⁡x,y⁢∂∂xu⁡x,y+∂∂xu⁡x,y+1=0,a⁡x,y⁢u⁡x,y+∂2∂x2u⁡x,y⁢u⁡x,y−∂∂yu⁡x,y2−∂∂xu⁡x,y=0,∂∂xa⁡x,y=0,∂∂ya⁡x,y=0
Eq3 is the extension of Eq2 with the constant (parameter) 'a', here represented by a function of x,y with null partial derivatives
Rankingx,y,u,a
ranking
TD≔ThomasDecomposition⁡Eq3
EquationsTD1
∂∂xu⁡x,y3=−∂∂xu⁡x,y2−2⁢∂∂xu⁡x,y−1,∂∂xu⁡x,y=−1∂∂yu⁡x,y+1,a⁡x,y=0
The last equation in the output system above shows that consistency holds if and only if a=0.
InequationsTD1
u⁡x,y≠0
To display the equations and inequations of the returned decomposition, as differential polynomials equal to or different than 0, use Display
DisplayTD1
−∂∂xu⁡x,y3−∂∂xu⁡x,y2−2⁢∂∂xu⁡x,y−1=0,∂∂yu⁡x,y⁢∂∂xu⁡x,y+∂∂xu⁡x,y+1=0,a⁡x,y=0,u⁡x,y≠0
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
ivar≔t,x
Rank the dependent variables in equation footing and use a non-elimination ranking
dvar≔u,v,w
Ranking⁡ivar,dvar
To check the last ranking set, you can call Ranking with no arguments
Ranking
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
L ≔ 12 diffut, x, t2+diffvt, x, t2 ut, x diffwt, x, x+diffwt, x, t diffut, x, t+diffvt, x, x
L≔∂∂tu⁡t,x22+∂∂tv⁡t,x2⁢u⁡t,x⁢∂∂xw⁡t,x+∂∂tw⁡t,x⁢∂∂tu⁡t,x+∂∂xv⁡t,x
The corresponding Euler-Lagrange equations are
EL ≔ −diffvt, x, t2 diffwt, x, x+diffut, x, t, t+diffwt, x, t, t = 0, 2 diffvt, x, t ut, x diffwt, x, t, x+2 diffvt, x, t, t ut, x diffwt, x, x+2 diffvt, x, t diffut, x, t diffwt, x, x+diffwt, x, t, x=0, 2 diffvt, x, t, x diffvt, x, t ut, x+diffvt, x, t2 diffut, x, x+diffut, x, t, t+diffvt, x, t, x=0
EL≔−∂∂tv⁡t,x2⁢∂∂xw⁡t,x+∂2∂t2u⁡t,x+∂2∂t2w⁡t,x=0,2⁢∂∂tv⁡t,x⁢u⁡t,x⁢∂2∂t∂xw⁡t,x+2⁢∂2∂t2v⁡t,x⁢u⁡t,x⁢∂∂xw⁡t,x+2⁢∂∂tv⁡t,x⁢∂∂tu⁡t,x⁢∂∂xw⁡t,x+∂2∂t∂xw⁡t,x=0,2⁢∂2∂t∂xv⁡t,x⁢∂∂tv⁡t,x⁢u⁡t,x+∂∂tv⁡t,x2⁢∂∂xu⁡t,x+∂2∂t2u⁡t,x+∂2∂t∂xv⁡t,x=0
TD≔ThomasDecomposition⁡EL
TD≔DifferentialSystem,DifferentialSystem,DifferentialSystem,DifferentialSystem,DifferentialSystem,DifferentialSystem
−2⁢∂2∂t∂xv⁡t,x⁢∂∂tv⁡t,x⁢u⁡t,x−∂∂tv⁡t,x2⁢∂∂xu⁡t,x−∂2∂t2u⁡t,x−∂2∂t∂xv⁡t,x=0,2⁢∂∂tv⁡t,x⁢u⁡t,x⁢∂2∂t∂xw⁡t,x+2⁢∂2∂t2v⁡t,x⁢u⁡t,x⁢∂∂xw⁡t,x+2⁢∂∂tv⁡t,x⁢∂∂tu⁡t,x⁢∂∂xw⁡t,x+∂2∂t∂xw⁡t,x=0,2⁢∂2∂t∂xv⁡t,x⁢∂∂tv⁡t,x⁢u⁡t,x+∂∂tv⁡t,x2⁢∂∂xu⁡t,x+∂∂tv⁡t,x2⁢∂∂xw⁡t,x+∂2∂t∂xv⁡t,x−∂2∂t2w⁡t,x=0,∂∂xw⁡t,x≠0,u⁡t,x≠0
In (20), the second equation is a (generalized) Lagrangian constraint.
DisplayTD3
u⁡t,x=0,∂2∂t∂xv⁡t,x=0,−∂2∂t2w⁡t,x=0,∂2∂t∂xw⁡t,x=0,∂∂xw⁡t,x=0
Here the first, second and fourth equations are Lagrangian constraints.
DisplayTD4
−∂2∂t2u⁡t,x=0,∂2∂t∂xu⁡t,x=0,∂∂xu⁡t,x=0,2⁢∂∂tv⁡t,x⁢u⁡t,x+1=0,−∂2∂t2w⁡t,x=0,∂2∂t∂xw⁡t,x=0,∂∂xw⁡t,x=0,u⁡t,x≠0
The second, third and fifth equations are Lagrangian constraints.
DisplayTD5
u⁡t,x=0,∂∂tv⁡t,x=0,−∂2∂t2w⁡t,x=0,∂2∂t∂xw⁡t,x=0,∂∂xw⁡t,x≠0
The first, second and fourth equations are Lagrangian constraints.
DisplayTD6
u⁡t,x=0,∂2∂t∂xv⁡t,x=0,∂∂tv⁡t,x2⁢∂∂xw⁡t,x−∂2∂t2w⁡t,x=0,∂2∂t∂xw⁡t,x=0,∂2∂x2w⁡t,x=0,∂∂xw⁡t,x≠0,∂∂tv⁡t,x≠0
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
Ranking⁡t,q1,q2
The Lagrangian and corresponding Euler-Lagrange equations
L ≔ q1t2 diffq2t, t2+2 q1t q2t diffq1t, t diffq2t, t+q2t2 diffq1t, t2+q1t2+q2t2
L≔q1⁡t2⁢ⅆⅆtq2⁡t2+2⁢q1⁡t⁢q2⁡t⁢ⅆⅆtq1⁡t⁢ⅆⅆtq2⁡t+q2⁡t2⁢ⅆⅆtq1⁡t2+q1⁡t2+q2⁡t2
EL ≔ 2 q1t q2t diffq2t, t, t+4 diffq1t, t q2t diffq2t, t+2 diffq1t, t, t q2t2−2 q1t=0, 2 q1t2 diffq2t, t, t+4 diffq1t, t q1t diffq2t, t+2 q1t q2t diffq1t, t, t−2 q2t=0
EL≔2⁢q1⁡t⁢q2⁡t⁢ⅆ2ⅆt2q2⁡t+4⁢ⅆⅆtq1⁡t⁢q2⁡t⁢ⅆⅆtq2⁡t+2⁢ⅆ2ⅆt2q1⁡t⁢q2⁡t2−2⁢q1⁡t=0,2⁢q1⁡t2⁢ⅆ2ⅆt2q2⁡t+4⁢ⅆⅆtq1⁡t⁢q1⁡t⁢ⅆⅆtq2⁡t+2⁢q1⁡t⁢q2⁡t⁢ⅆ2ⅆt2q1⁡t−2⁢q2⁡t=0
TD≔DifferentialSystem,DifferentialSystem,DifferentialSystem
The equations and inequations of the three simple systems returned by ThomasDecomposition
DisplayTD
q1⁡t+q2⁡t=0,2⁢q2⁡t⁢ⅆ2ⅆt2q2⁡t+2⁢ⅆⅆtq2⁡t2−1=0,q2⁡t≠0,q1⁡t−q2⁡t=0,2⁢q2⁡t⁢ⅆ2ⅆt2q2⁡t+2⁢ⅆⅆtq2⁡t2−1=0,q2⁡t≠0,q1⁡t=0,q2⁡t=0
The first expression q1⁡t+q2⁡t=0, and in the second system q1⁡t−q2⁡t=0,are local constraints. The complementary constrains in the third system are q1⁡t=0,q2⁡t=0.
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)
Burgers≔diffux,t,t+ux,t diffux,t,x−diffux,t,x,x;
Burgers≔∂∂tu⁡x,t+u⁡x,t⁢∂∂xu⁡x,t−∂2∂x2u⁡x,t
Application of WTC method
WTC_Bur≔subs⁡u⁡x,t=add⁡v‖j⁡x,t⁢f⁡x,tj,j=0..3f⁡x,t,Burgers
WTC_Bur≔∂∂tv0⁡x,t+v1⁡x,t⁢f⁡x,t+v2⁡x,t⁢f⁡x,t2+v3⁡x,t⁢f⁡x,t3f⁡x,t+v0⁡x,t+v1⁡x,t⁢f⁡x,t+v2⁡x,t⁢f⁡x,t2+v3⁡x,t⁢f⁡x,t3⁢∂∂xv0⁡x,t+v1⁡x,t⁢f⁡x,t+v2⁡x,t⁢f⁡x,t2+v3⁡x,t⁢f⁡x,t3f⁡x,tf⁡x,t−∂2∂x2v0⁡x,t+v1⁡x,t⁢f⁡x,t+v2⁡x,t⁢f⁡x,t2+v3⁡x,t⁢f⁡x,t3f⁡x,t
Num≔numerWTC_Bur
Num≔f⁡x,t2⁢v1⁡x,t⁢∂∂xv0⁡x,t+f⁡x,t2⁢v0⁡x,t⁢∂∂xv1⁡x,t−f⁡x,t⁢∂∂tf⁡x,t⁢v0⁡x,t+f⁡x,t⁢v0⁡x,t⁢∂∂xv0⁡x,t+2⁢f⁡x,t⁢∂∂xv0⁡x,t⁢∂∂xf⁡x,t+f⁡x,t⁢v0⁡x,t⁢∂2∂x2f⁡x,t−2⁢f⁡x,t4⁢v3⁡x,t⁢∂2∂x2f⁡x,t+f⁡x,t7⁢v3⁡x,t⁢∂∂xv3⁡x,t+2⁢f⁡x,t6⁢v3⁡x,t2⁢∂∂xf⁡x,t+f⁡x,t6⁢v2⁡x,t⁢∂∂xv3⁡x,t+f⁡x,t6⁢v3⁡x,t⁢∂∂xv2⁡x,t+f⁡x,t5⁢v1⁡x,t⁢∂∂xv3⁡x,t+f⁡x,t5⁢v2⁡x,t⁢∂∂xv2⁡x,t+f⁡x,t5⁢v3⁡x,t⁢∂∂xv1⁡x,t+f⁡x,t4⁢v2⁡x,t2⁢∂∂xf⁡x,t+f⁡x,t4⁢v1⁡x,t⁢∂∂xv2⁡x,t+2⁢f⁡x,t4⁢∂∂tf⁡x,t⁢v3⁡x,t+f⁡x,t4⁢v2⁡x,t⁢∂∂xv1⁡x,t+f⁡x,t4⁢v3⁡x,t⁢∂∂xv0⁡x,t+f⁡x,t4⁢v0⁡x,t⁢∂∂xv3⁡x,t−4⁢f⁡x,t4⁢∂∂xf⁡x,t⁢∂∂xv3⁡x,t−2⁢f⁡x,t3⁢v3⁡x,t⁢∂∂xf⁡x,t2+f⁡x,t3⁢v1⁡x,t⁢∂∂xv1⁡x,t+f⁡x,t3⁢∂∂tf⁡x,t⁢v2⁡x,t+f⁡x,t3⁢v2⁡x,t⁢∂∂xv0⁡x,t+f⁡x,t3⁢v0⁡x,t⁢∂∂xv2⁡x,t−2⁢f⁡x,t3⁢∂∂xf⁡x,t⁢∂∂xv2⁡x,t−f⁡x,t3⁢v2⁡x,t⁢∂2∂x2f⁡x,t+3⁢f⁡x,t5⁢v2⁡x,t⁢v3⁡x,t⁢∂∂xf⁡x,t+2⁢f⁡x,t4⁢v1⁡x,t⁢v3⁡x,t⁢∂∂xf⁡x,t+f⁡x,t3⁢v1⁡x,t⁢v2⁡x,t⁢∂∂xf⁡x,t+f⁡x,t3⁢v3⁡x,t⁢v0⁡x,t⁢∂∂xf⁡x,t−f⁡x,t⁢v1⁡x,t⁢v0⁡x,t⁢∂∂xf⁡x,t+f⁡x,t5⁢∂∂tv3⁡x,t+f⁡x,t4⁢∂∂tv2⁡x,t+∂∂tv1⁡x,t⁢f⁡x,t3+f⁡x,t2⁢∂∂tv0⁡x,t−v0⁡x,t2⁢∂∂xf⁡x,t−2⁢v0⁡x,t⁢∂∂xf⁡x,t2−f⁡x,t5⁢∂2∂x2v3⁡x,t−f⁡x,t4⁢∂2∂x2v2⁡x,t−f⁡x,t3⁢∂2∂x2v1⁡x,t−f⁡x,t2⁢∂2∂x2v0⁡x,t
P≔convertNum,D:
subs⁡f⁡x,t=0,P
−v0⁡x,t2⁢D1⁡f⁡x,t−2⁢v0⁡x,t⁢D1⁡f⁡x,t2
sol_v0≔solvev0⁡x,t≠0,=0,v0⁡x,t
sol_v0≔v0⁡x,t=−2⁢D1⁡f⁡x,t
convert⁡op⁡sol_v0,diff
v0⁡x,t=−2⁢∂∂xf⁡x,t
P≔expand⁡subs⁡convert⁡op⁡sol_v0,diff,Num
P≔2⁢f⁡x,t2⁢∂3∂x3f⁡x,t−2⁢f⁡x,t2⁢∂2∂t∂xf⁡x,t−4⁢f⁡x,t4⁢v3⁡x,t⁢∂2∂x2f⁡x,t+f⁡x,t7⁢v3⁡x,t⁢∂∂xv3⁡x,t+2⁢f⁡x,t6⁢v3⁡x,t2⁢∂∂xf⁡x,t+f⁡x,t6⁢v2⁡x,t⁢∂∂xv3⁡x,t+f⁡x,t6⁢v3⁡x,t⁢∂∂xv2⁡x,t+f⁡x,t5⁢v1⁡x,t⁢∂∂xv3⁡x,t+f⁡x,t5⁢v2⁡x,t⁢∂∂xv2⁡x,t+f⁡x,t5⁢v3⁡x,t⁢∂∂xv1⁡x,t+f⁡x,t4⁢v2⁡x,t2⁢∂∂xf⁡x,t+f⁡x,t4⁢v1⁡x,t⁢∂∂xv2⁡x,t+2⁢f⁡x,t4⁢∂∂tf⁡x,t⁢v3⁡x,t+f⁡x,t4⁢v2⁡x,t⁢∂∂xv1⁡x,t−6⁢f⁡x,t4⁢∂∂xf⁡x,t⁢∂∂xv3⁡x,t−4⁢f⁡x,t3⁢v3⁡x,t⁢∂∂xf⁡x,t2+f⁡x,t3⁢v1⁡x,t⁢∂∂xv1⁡x,t+f⁡x,t3⁢∂∂tf⁡x,t⁢v2⁡x,t−4⁢f⁡x,t3⁢∂∂xf⁡x,t⁢∂∂xv2⁡x,t−3⁢f⁡x,t3⁢v2⁡x,t⁢∂2∂x2f⁡x,t−2⁢f⁡x,t2⁢∂∂xf⁡x,t⁢∂∂xv1⁡x,t+2⁢f⁡x,t⁢∂∂tf⁡x,t⁢∂∂xf⁡x,t+2⁢f⁡x,t⁢v1⁡x,t⁢∂∂xf⁡x,t2−2⁢f⁡x,t⁢∂∂xf⁡x,t⁢∂2∂x2f⁡x,t−2⁢f⁡x,t2⁢v1⁡x,t⁢∂2∂x2f⁡x,t+3⁢f⁡x,t5⁢v2⁡x,t⁢v3⁡x,t⁢∂∂xf⁡x,t+2⁢f⁡x,t4⁢v1⁡x,t⁢v3⁡x,t⁢∂∂xf⁡x,t+f⁡x,t3⁢v1⁡x,t⁢v2⁡x,t⁢∂∂xf⁡x,t+f⁡x,t5⁢∂∂tv3⁡x,t+f⁡x,t4⁢∂∂tv2⁡x,t+∂∂tv1⁡x,t⁢f⁡x,t3−f⁡x,t5⁢∂2∂x2v3⁡x,t−f⁡x,t4⁢∂2∂x2v2⁡x,t−f⁡x,t3⁢∂2∂x2v1⁡x,t
P≔convertP,D:
P≔collectP,f⁡t,x:
Extraction of the coefficients at f⁡t,xj for j=1..3
forjto3dopj≔convert⁡coeff⁡P,f⁡x,t,j,diffenddo
p1≔−2⁢∂∂xf⁡x,t⁢∂2∂x2f⁡x,t+2⁢∂∂tf⁡x,t⁢∂∂xf⁡x,t+2⁢v1⁡x,t⁢∂∂xf⁡x,t2
p2≔−2⁢∂∂xv1⁡x,t⁢∂∂xf⁡x,t−2⁢v1⁡x,t⁢∂2∂x2f⁡x,t−2⁢∂2∂t∂xf⁡x,t+2⁢∂3∂x3f⁡x,t
p3≔−∂2∂x2v1⁡x,t+∂∂tv1⁡x,t−3⁢v2⁡x,t⁢∂2∂x2f⁡x,t−4⁢∂∂xf⁡x,t⁢∂∂xv2⁡x,t+∂∂tf⁡x,t⁢v2⁡x,t−4⁢v3⁡x,t⁢∂∂xf⁡x,t2+v1⁡x,t⁢∂∂xv1⁡x,t+v1⁡x,t⁢v2⁡x,t⁢∂∂xf⁡x,t
Ranking⁡x,t,v3,v2,v1,f
TD≔ThomasDecomposition⁡p1,p3
TD≔DifferentialSystem,DifferentialSystem
∂2∂x2v1⁡x,t=−4⁢v3⁡x,t⁢∂∂xf⁡x,t2−2⁢v1⁡x,t⁢v2⁡x,t⁢∂∂xf⁡x,t−2⁢∂∂tf⁡x,t⁢v2⁡x,t−4⁢∂∂xf⁡x,t⁢∂∂xv2⁡x,t+v1⁡x,t⁢∂∂xv1⁡x,t+∂∂tv1⁡x,t,∂2∂x2f⁡x,t=v1⁡x,t⁢∂∂xf⁡x,t+∂∂tf⁡x,t
EquationsTD2
∂2∂x2v1⁡x,t=∂∂tf⁡x,t⁢v2⁡x,t+v1⁡x,t⁢∂∂xv1⁡x,t+∂∂tv1⁡x,t,∂∂xf⁡x,t=0
Reduction of p2 modulo radical differential ideal generated by p1
NormalFormp2,TD1;
0
NormalFormp2,TD2;
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
∂∂tη⁡t,x+∂2∂x2η⁡t,x=0
the function defined by
zeta⁡t,x=∂∂xη⁡t,xη⁡t,x
is a solution to Burgers' equation
2⁢∂∂xzeta⁡t,x⁢zeta⁡t,x+∂2∂x2zeta⁡t,x+∂∂tzeta⁡t,x=0
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.
Rankingt,x, eta,zeta
We define the differential system which combines the heat equation in eta and Burgers' equation in zeta:
CH ≔ diffetat, x, t+diffetat, x, x, x=0, etat, x zetat, x−diffetat, x, x = 0
CH≔∂∂tη⁡t,x+∂2∂x2η⁡t,x=0,η⁡t,x⁢ζ⁡t,x−∂∂xη⁡t,x=0
We also include the assumption η≠0.
TD ≔ ThomasDecompositionCH, etat,x ≠ 0
η⁡t,x⁢ζ⁡t,x2+η⁡t,x⁢∂∂xζ⁡t,x+∂∂tη⁡t,x=0,η⁡t,x⁢ζ⁡t,x−∂∂xη⁡t,x=0,2⁢∂∂xζ⁡t,x⁢ζ⁡t,x+∂2∂x2ζ⁡t,x+∂∂tζ⁡t,x=0,η⁡t,x≠0
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
2⁢sV⁡t⁢ⅆⅆtsV⁡t−F1⁡t−F2⁡t+k⁢sV⁡t=0
sV⁡t2⁢ⅆⅆtc⁡t+2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t−c2⁡t⁢F2⁡t+c⁡t⁢k⁢sV⁡t−c1⁡t⁢F1⁡t=0
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.
Ranking⁡t,F1,F2,sV,c,c1,c2
We include the equations which express that c1 and c2 do not depend on time into the system.
L ≔ 2 diffsVt, tsVt−F1t−F2t+ksVt = 0, diffct, t sVt2−c2tF2t+ctksVt−c1tF1t+2 ctdiffsVt, tsVt = 0, diffc1t, t = 0, diffc2t, t = 0
L≔2⁢sV⁡t⁢ⅆⅆtsV⁡t−F1⁡t−F2⁡t+ksV⁡t=0,sV⁡t2⁢ⅆⅆtc⁡t−c2⁡t⁢F2⁡t+c⁡t⁢ksV⁡t−c1⁡t⁢F1⁡t+2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t=0,ⅆⅆtc1⁡t=0,ⅆⅆtc2⁡t=0
TD≔ThomasDecomposition⁡L,sVt≠0,c1t≠0,c2t≠0
The three resulting simple differential systems describe different structural behavior of the control system, corresponding to different configurations of the parameters c1 and c2.
S1≔Display⁡TD1
S1≔2⁢c2⁡t⁢sV⁡t⁢ⅆⅆtsV⁡t−c2⁡t⁢F1⁡t+c2⁡t⁢ksV⁡t+c1⁡t⁢F1⁡t−sV⁡t2⁢ⅆⅆtc⁡t−c⁡t⁢ksV⁡t−2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t=0,−sV⁡t2⁢ⅆⅆtc⁡t+c2⁡t⁢F2⁡t−c⁡t⁢ksV⁡t−2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t+2⁢c1⁡t⁢sV⁡t⁢ⅆⅆtsV⁡t−c1⁡t⁢F2⁡t+c1⁡t⁢ksV⁡t=0,ⅆⅆtc1⁡t=0,ⅆⅆtc2⁡t=0,c2⁡t≠0,c1⁡t≠0,−c2⁡t+c1⁡t≠0,sV⁡t≠0
collect⁡S11,F1⁡t
−c2⁡t+c1⁡t⁢F1⁡t+2⁢c2⁡t⁢sV⁡t⁢ⅆⅆtsV⁡t−sV⁡t2⁢ⅆⅆtc⁡t−2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t+c2⁡t⁢ksV⁡t−c⁡t⁢ksV⁡t=0
collect⁡S12,F2⁡t
c2⁡t−c1⁡t⁢F2⁡t−sV⁡t2⁢ⅆⅆtc⁡t+2⁢c1⁡t⁢sV⁡t⁢ⅆⅆtsV⁡t−2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t+c1⁡t⁢ksV⁡t−c⁡t⁢ksV⁡t=0
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.
S2≔Display⁡TD2
S2≔sV⁡t2⁢ⅆⅆtc⁡t+c⁡t⁢F1⁡t−c2⁡t⁢F1⁡t+c⁡t⁢F2⁡t−c2⁡t⁢F2⁡t=0,2⁢c2⁡t⁢sV⁡t⁢ⅆⅆtsV⁡t−sV⁡t2⁢ⅆⅆtc⁡t−2⁢c⁡t⁢ⅆⅆtsV⁡t⁢sV⁡t+c2⁡t⁢ksV⁡t−c⁡t⁢ksV⁡t=0,−c2⁡t+c1⁡t=0,ⅆⅆtc2⁡t=0,c2⁡t≠0,sV⁡t≠0,c⁡t−c2⁡t≠0
S3≔Display⁡TD3
S3≔2⁢sV⁡t⁢ⅆⅆtsV⁡t−F1⁡t−F2⁡t+ksV⁡t=0,c⁡t−c2⁡t=0,−c2⁡t+c1⁡t=0,ⅆⅆtc2⁡t=0,c2⁡t≠0,sV⁡t≠0
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
Ranking⁡t,u
We show two types of singular solutions, which are found by the differential Thomas decomposition. The first system contains envelopes.
res ≔ ThomasDecompositiondiffut, t2−ut
res≔DifferentialSystem,DifferentialSystem
Display⁡res
−ⅆⅆtu⁡t2+u⁡t=0,u⁡t≠0,u⁡t=0
pdsolve1
u⁡t=14⁢t2−12⁢t⁢_C1+14⁢_C12
plots:-displayplotmapa→subs_C1=a,rhs1,$−5..5,t=−3..3,0..10,color=black$11,plot0,−3..3,thickness=3,color=red;
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.
res ≔ ThomasDecomposition−ut3+diffut, t2
Displayres;
u⁡t3−ⅆⅆtu⁡t2=0,u⁡t≠0,u⁡t=0
u⁡t=𝒫⁡213⁢t2+_C1;0,0⁢223
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:
L ≔ diffut,t2−4 t diffut,t−4 ut+8 t2=0
L≔ⅆⅆtu⁡t2−4⁢t