DEtools
riccati_system
solve a system of Riccati differential equations or convert it into a matrix form
Calling Sequence
Parameters
Description
Examples
riccati_system(deqns, vars)
riccati_system(deqns, vars, matrix_only)
deqns
-
set of riccati equations and/or initial conditions
vars
name or set of names to be solved for
matrix_only
indicator to convert into a matrix form without solving
riccati_system can find a closed-form solution for certain systems of riccati ODEs. A system of riccati ODEs of n variables is:
x1⁢' ⁢t=P1⁡x1⁡t,...,xn⁡t
...
xn⁢' ⁢t=Pn⁡x1⁡t,...,xn⁡t
with initial conditions
x1⁡t0=c1..xn⁡t0⁢ = ⁢cn
where x1..xn are the unknown functions and P1..Pn are polynomials in x1..xn of second degree with function coefficients.
To solve this system, riccati_system tries to convert it into a matrix equation,
Z⁢' ⁡t=Z⁡t·A⁡t·Z⁡t+Z⁡t·K⁡t+transpose⁡K⁡t·Z⁡t
with
Z⁡t0=Z0
where Z,A,K, and Z0 are n by n matrices. The user can request this matrix form instead of a full solution by using the 'matrix_only' option. In this case a sequence Z,A,K,Z0,t0 is returned.
This function is part of the DEtools package, and so it can be used in the form riccati_system(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[riccati_system](..).
with⁡DEtools:
Solve the system:
e1≔t⁢y⁡t2−x⁡t2+2⁢x⁡t⁢y⁡t+2⁢c⁢x⁡t=diff⁡x⁡t,t
e1≔t⁢y⁡t2−x⁡t2+2⁢x⁡t⁢y⁡t+2⁢c⁢x⁡t=ⅆⅆtx⁡t
e2≔y⁡t2−x⁡t2−t⋅2⁢x⁡t⁢y⁡t+2⁢c⁢y⁡t=diff⁡y⁡t,t
e2≔y⁡t2−x⁡t2−2⁢t⁢x⁡t⁢y⁡t+2⁢c⁢y⁡t=ⅆⅆty⁡t
sol≔riccati_system⁡e1,e2,x⁡0=_C1,y⁡0=_C2,x⁡t,y⁡t
sol≔x⁡t=4⁢ⅇt⁢c2⁢c2⁢2⁢ⅇ2⁢t⁢c⁢_C12⁢c⁢t+2⁢ⅇ2⁢t⁢c⁢_C22⁢c⁢t−ⅇ2⁢t⁢c⁢_C12−ⅇ2⁢t⁢c⁢_C22+4⁢_C1⁢c2+_C12+_C224⁢ⅇ2⁢t⁢c2⁢_C12⁢c2⁢t2+4⁢ⅇ2⁢t⁢c2⁢_C22⁢c2⁢t2+4⁢ⅇ2⁢t⁢c2⁢_C12⁢c2−4⁢ⅇ2⁢t⁢c2⁢_C12⁢c⁢t+4⁢ⅇ2⁢t⁢c2⁢_C22⁢c2−4⁢ⅇ2⁢t⁢c2⁢_C22⁢c⁢t+16⁢ⅇ2⁢t⁢c⁢_C1⁢c3⁢t−8⁢ⅇ2⁢t⁢c⁢_C12⁢c2+4⁢ⅇ2⁢t⁢c⁢_C12⁢c⁢t−8⁢ⅇ2⁢t⁢c⁢_C22⁢c2+4⁢ⅇ2⁢t⁢c⁢_C22⁢c⁢t−16⁢ⅇ2⁢t⁢c⁢_C2⁢c3+ⅇ2⁢t⁢c2⁢_C12+ⅇ2⁢t⁢c2⁢_C22−8⁢ⅇ2⁢t⁢c⁢_C1⁢c2+4⁢_C12⁢c2+4⁢_C22⁢c2+16⁢_C2⁢c3+16⁢c4−2⁢ⅇ2⁢t⁢c⁢_C12−2⁢ⅇ2⁢t⁢c⁢_C22+8⁢_C1⁢c2+_C12+_C22,y⁡t=−8⁢ⅇt⁢c2⁢c3⁢ⅇ2⁢t⁢c⁢_C12+ⅇ2⁢t⁢c⁢_C22−_C12−_C22−2⁢_C2⁢c4⁢ⅇ2⁢t⁢c2⁢_C12⁢c2⁢t2+4⁢ⅇ2⁢t⁢c2⁢_C22⁢c2⁢t2+4⁢ⅇ2⁢t⁢c2⁢_C12⁢c2−4⁢ⅇ2⁢t⁢c2⁢_C12⁢c⁢t+4⁢ⅇ2⁢t⁢c2⁢_C22⁢c2−4⁢ⅇ2⁢t⁢c2⁢_C22⁢c⁢t+16⁢ⅇ2⁢t⁢c⁢_C1⁢c3⁢t−8⁢ⅇ2⁢t⁢c⁢_C12⁢c2+4⁢ⅇ2⁢t⁢c⁢_C12⁢c⁢t−8⁢ⅇ2⁢t⁢c⁢_C22⁢c2+4⁢ⅇ2⁢t⁢c⁢_C22⁢c⁢t−16⁢ⅇ2⁢t⁢c⁢_C2⁢c3+ⅇ2⁢t⁢c2⁢_C12+ⅇ2⁢t⁢c2⁢_C22−8⁢ⅇ2⁢t⁢c⁢_C1⁢c2+4⁢_C12⁢c2+4⁢_C22⁢c2+16⁢_C2⁢c3+16⁢c4−2⁢ⅇ2⁢t⁢c⁢_C12−2⁢ⅇ2⁢t⁢c⁢_C22+8⁢_C1⁢c2+_C12+_C22
Verify the solution - see odetest
odetest⁡sol,e1,e2
0,0
Get the matrix form:
Z,A,K,Z0,t0≔riccati_system⁡e1,e2,x⁡0=_C1,y⁡0=_C2,x⁡t,y⁡t,matrix_only
Z,A,K,Z0,t0≔x⁡ty⁡ty⁡t−x⁡t,−t11t,c00c,_C1_C2_C2−_C1,0
Solve the matrix form (see matrix_riccati)
RSM_sol≔matrix_riccati⁡A,K,Z0,t=t0:
Recalling the form of the matrix Z, construct the solution from RSM_sol
sol≔x⁡t=RSM_sol1,1,y⁡t=RSM_sol1,2
Verify this solution:
See Also
dsolve
matrix_riccati
odetest
riccatisol
Download Help Document