DEtools - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : DEtools : Solving Methods : DEtools/riccati_system

DEtools

 riccati_system
 solve a system of Riccati differential equations or convert it into a matrix form

 Calling Sequence riccati_system(deqns, vars) riccati_system(deqns, vars, matrix_only)

Parameters

 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

Description

 • riccati_system can find a closed-form solution for certain systems of riccati ODEs. A system of riccati ODEs of n variables is:

${x}_{1}\text{'}\left(t\right)={P}_{1}\left({x}_{1}\left(t\right),\mathrm{...},{x}_{n}\left(t\right)\right)$

$\mathrm{...}$

${x}_{n}\text{'}\left(t\right)={P}_{n}\left({x}_{1}\left(t\right),\mathrm{...},{x}_{n}\left(t\right)\right)$

 with initial conditions

${x}_{1}\left({t}_{0}\right)={c}_{1}..{x}_{n}\left({t}_{0}\right)={c}_{n}$

 where ${x}_{1}..{x}_{n}$ are the unknown functions and ${P}_{1}..{P}_{n}$ are polynomials in ${x}_{1}..{x}_{n}$ of second degree with function coefficients.
 • To solve this system, riccati_system tries to convert it into a matrix equation,

$Z\text{'}\left(t\right)=Z\left(t\right)·A\left(t\right)·Z\left(t\right)+Z\left(t\right)·K\left(t\right)+\mathrm{transpose}\left(K\left(t\right)\right)·Z\left(t\right)$

 with

$Z\left({t}_{0}\right)=\mathrm{Z0}$

 where $Z,A,K$, and $\mathrm{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,\mathrm{Z0},{t}_{0}$ 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](..).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

Solve the system:

 > $\mathrm{e1}≔t\left({y\left(t\right)}^{2}-{x\left(t\right)}^{2}\right)+2x\left(t\right)y\left(t\right)+2cx\left(t\right)=\frac{ⅆ}{ⅆt}x\left(t\right)$
 ${\mathrm{e1}}{≔}{t}{}\left({{y}{}\left({t}\right)}^{{2}}{-}{{x}{}\left({t}\right)}^{{2}}\right){+}{2}{}{x}{}\left({t}\right){}{y}{}\left({t}\right){+}{2}{}{c}{}{x}{}\left({t}\right){=}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right)$ (1)
 > $\mathrm{e2}≔{y\left(t\right)}^{2}-{x\left(t\right)}^{2}-t\cdot 2x\left(t\right)y\left(t\right)+2cy\left(t\right)=\frac{ⅆ}{ⅆt}y\left(t\right)$
 ${\mathrm{e2}}{≔}{{y}{}\left({t}\right)}^{{2}}{-}{{x}{}\left({t}\right)}^{{2}}{-}{2}{}{t}{}{x}{}\left({t}\right){}{y}{}\left({t}\right){+}{2}{}{c}{}{y}{}\left({t}\right){=}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right)$ (2)
 > $\mathrm{sol}≔\mathrm{riccati_system}\left(\left\{\mathrm{e1},\mathrm{e2},x\left(0\right)=\mathrm{_C1},y\left(0\right)=\mathrm{_C2}\right\},\left[x\left(t\right),y\left(t\right)\right]\right)$
 ${\mathrm{sol}}{≔}\left\{{x}{}\left({t}\right){=}\frac{{4}{}{\left({{ⅇ}}^{{t}{}{c}}\right)}^{{2}}{}{{c}}^{{2}}{}\left({2}{}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C1}}}^{{2}}{}{c}{}{t}{+}{2}{}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C2}}}^{{2}}{}{c}{}{t}{-}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C1}}}^{{2}}{-}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C2}}}^{{2}}{+}{4}{}{\mathrm{_C1}}{}{{c}}^{{2}}{+}{{\mathrm{_C1}}}^{{2}}{+}{{\mathrm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^{{2}}}\right\}$ (3)

Verify the solution - see odetest

 > $\mathrm{odetest}\left(\mathrm{sol},\left[\mathrm{e1},\mathrm{e2}\right]\right)$
 $\left[{0}{,}{0}\right]$ (4)

Get the matrix form:

 > $Z,A,K,\mathrm{Z0},\mathrm{t0}≔\mathrm{riccati_system}\left(\left\{\mathrm{e1},\mathrm{e2},x\left(0\right)=\mathrm{_C1},y\left(0\right)=\mathrm{_C2}\right\},\left[x\left(t\right),y\left(t\right)\right],\mathrm{matrix_only}\right)$
 ${Z}{,}{A}{,}{K}{,}{\mathrm{Z0}}{,}{\mathrm{t0}}{≔}\left[\begin{array}{cc}{x}{}\left({t}\right)& {y}{}\left({t}\right)\\ {y}{}\left({t}\right)& {-}{x}{}\left({t}\right)\end{array}\right]{,}\left[\begin{array}{cc}{-}{t}& {1}\\ {1}& {t}\end{array}\right]{,}\left[\begin{array}{cc}{c}& {0}\\ {0}& {c}\end{array}\right]{,}\left[\begin{array}{cc}{\mathrm{_C1}}& {\mathrm{_C2}}\\ {\mathrm{_C2}}& {-}{\mathrm{_C1}}\end{array}\right]{,}{0}$ (5)

Solve the matrix form (see matrix_riccati)

 > $\mathrm{RSM_sol}≔\mathrm{matrix_riccati}\left(A,K,\mathrm{Z0},t=\mathrm{t0}\right):$

Recalling the form of the matrix $Z$, construct the solution from $\mathrm{RSM_sol}$

 > $\mathrm{sol}≔\left\{x\left(t\right)={\mathrm{RSM_sol}}_{1,1},y\left(t\right)={\mathrm{RSM_sol}}_{1,2}\right\}$
 ${\mathrm{sol}}{≔}\left\{{x}{}\left({t}\right){=}\frac{{4}{}{\left({{ⅇ}}^{{t}{}{c}}\right)}^{{2}}{}{{c}}^{{2}}{}\left({2}{}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C1}}}^{{2}}{}{c}{}{t}{+}{2}{}{{ⅇ}}^{{2}{}{t}{}{c}}{}{{\mathrm{_C2}}}^{{2}}{}{c}{}{t}{-}{{ⅇ}}^{{2}{}{t}{}{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