 Riccati - Maple Help

Solving Riccati's ODEs Description

 • The general form of Riccati's equation is given by the following:
 > Riccati_ode := diff(y(x),x)-f(x)*y(x)^2-g(x)*y(x)-h(x);
 ${\mathrm{Riccati_ode}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{f}{}\left({x}\right){}{{y}{}\left({x}\right)}^{{2}}{-}{g}{}\left({x}\right){}{y}{}\left({x}\right){-}{h}{}\left({x}\right)$ (1)
 where $f\left(x\right)$, $g\left(x\right)$, and $h\left(x\right)$ are arbitrary functions.
 • The so-called "Special" form of Riccati's equation is given by:
 > Riccati_S := diff(y(x),x)+a*y(x)^2-b*x^c;
 ${\mathrm{Riccati_S}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{a}{}{{y}{}\left({x}\right)}^{{2}}{-}{b}{}{{x}}^{{c}}$ (2)
 See Differentialgleichungen, by E. Kamke, pp. 21-23. There is as yet no general solution for the regular Riccati ODE.
 • For $h\left(x\right)=0$, we have an ODE of Bernoulli type which can be solved in a direct manner by dsolve (see odeadvisor,Bernoulli). In the other cases, a good strategy might be to introduce an appropriate change of variables. A general transformation for canceling $h\left(x\right)$ is not yet known. Examples

 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{odeadvisor}\right)$
 $\left[{\mathrm{odeadvisor}}\right]$ (3)
 > $\mathrm{with}\left(\mathrm{PDEtools},\mathrm{dchange}\right)$
 $\left[{\mathrm{dchange}}\right]$ (4)
 > $\mathrm{odeadvisor}\left(\mathrm{Riccati_ode}\right)$
 $\left[{\mathrm{_Riccati}}\right]$ (5)
 > $\mathrm{odeadvisor}\left(\mathrm{Riccati_S}\right)$
 $\left[\left[{\mathrm{_Riccati}}{,}{\mathrm{_special}}\right]\right]$ (6)

The following transformation

 > $\mathrm{ITR}≔\left\{x=t,y\left(x\right)=u\left(t\right)h\left(t\right)\right\}$
 ${\mathrm{ITR}}{≔}\left\{{x}{=}{t}{,}{y}{}\left({x}\right){=}{u}{}\left({t}\right){}{h}{}\left({t}\right)\right\}$ (7)

leads to another Riccati ODE, but with h(x) -> 1:

 > $\mathrm{ode_draft}≔\mathrm{dchange}\left(\mathrm{ITR},\mathrm{Riccati_ode},\mathrm{known}=\left\{f\left(x\right),g\left(x\right),h\left(x\right)\right\},\left[t,u\left(t\right)\right]\right):$
 > $\mathrm{ode2}≔\mathrm{diff}\left(u\left(t\right),t\right)=\mathrm{solve}\left(\mathrm{ode_draft},\mathrm{diff}\left(u\left(t\right),t\right)\right):$
 > $\mathrm{new_ode}≔\mathrm{collect}\left(\mathrm{ode2},u\left(t\right),\mathrm{normal}\right)$
 ${\mathrm{new_ode}}{≔}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right){=}{1}{+}{h}{}\left({t}\right){}{f}{}\left({t}\right){}{{u}{}\left({t}\right)}^{{2}}{+}\frac{\left({h}{}\left({t}\right){}{g}{}\left({t}\right){-}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{h}{}\left({t}\right)\right){}{u}{}\left({t}\right)}{{h}{}\left({t}\right)}$ (8)

The following transformation

 > $\mathrm{ITR}≔\left\{x=t,y\left(x\right)=u\left(t\right)\mathrm{exp}\left(\mathrm{int}\left(g\left(t\right),t\right)\right)\right\}$
 ${\mathrm{ITR}}{≔}\left\{{x}{=}{t}{,}{y}{}\left({x}\right){=}{u}{}\left({t}\right){}{{ⅇ}}^{{\int }{g}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}}\right\}$ (9)

leads to another Riccati ODE but without the "linear in u(t)" term:

 > $\mathrm{ode_draft}≔\mathrm{dchange}\left(\mathrm{ITR},\mathrm{Riccati_ode},\mathrm{known}=\left\{f\left(x\right),g\left(x\right),h\left(x\right)\right\},\left[t,u\left(t\right)\right]\right):$
 > $\mathrm{ode2}≔\mathrm{isolate}\left(\mathrm{ode_draft},\mathrm{diff}\left(u\left(t\right),t\right)\right):$
 > $\mathrm{new_ode}≔\mathrm{collect}\left(\mathrm{ode2},u\left(t\right),\mathrm{simplify}\right)$
 ${\mathrm{new_ode}}{≔}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right){=}{{ⅇ}}^{{\int }{g}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}}{}{f}{}\left({t}\right){}{{u}{}\left({t}\right)}^{{2}}{+}{h}{}\left({t}\right){}{{ⅇ}}^{{-}\left({\int }{g}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}\right)}$ (10)

Depending on the case, the system might be able to solve the problem using one of the transformations above; the above transformations can also be used as departure point for guessing another transformation suitable for the given problem. It is also possible to introduce a change of variables leading to a linear ODE of the second order (see below).

Concerning Riccati ODEs of Special type, the solving scheme can be summarized as follows. The first thing worth noting is that, for $c=0$ the system succeeds in solving the ODE:

 > $\mathrm{dsolve}\left(\mathrm{subs}\left(c=0,\mathrm{Riccati_S}\right)\right)$
 ${y}{}\left({x}\right){=}\frac{{\mathrm{tanh}}{}\left({\mathrm{_C1}}{}\sqrt{{a}{}{b}}{+}{x}{}\sqrt{{a}{}{b}}\right){}\sqrt{{a}{}{b}}}{{a}}$ (11)

Now, for $c\ne 0$, Riccati Special ODEs can be reduced, step by step, to the case $c=0$, provided that $c$ can be written as ${c}_{n}=-\frac{4n}{2n-1}$ (integer $n$). Examples of possible values for $c$:

 > $c\left[n\right]=\mathrm{seq}\left(-\frac{4i}{2i-1},i=-3..3\right)$
 ${{c}}_{{n}}{=}\left({-}\frac{{12}}{{7}}{,}{-}\frac{{8}}{{5}}{,}{-}\frac{{4}}{{3}}{,}{0}{,}{-4}{,}{-}\frac{{8}}{{3}}{,}{-}\frac{{12}}{{5}}\right)$ (12)

The idea is to change variables so as to obtain another ODE of type Riccati Special, but with c[n->0], until reaching ${c}_{0}=0$. There are two variable transformations leading to the desired reduction, depending on the sign of $n$ in ${c}_{n}$ above (see examples at the end).

1) Riccati Special ODE with $c=-\frac{8}{3}$ (${c}_{2}=-\frac{8}{3}$)

 > $\mathrm{ode}≔\mathrm{subs}\left(c=-\frac{8}{3},\mathrm{Riccati_S}\right)$
 ${\mathrm{ode}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{a}{}{{y}{}\left({x}\right)}^{{2}}{-}\frac{{b}}{{{x}}^{{8}}{{3}}}}$ (13)

The general transformation for n > 0 (in ${c}_{n}$), in order to reduce $c$ is given by

 > $\mathrm{itr}≔\left\{x={r}^{\frac{1}{c+3}},y\left(x\right)=\frac{1}{s\left(r\right){r}^{\frac{2}{c+3}}}+\frac{1}{a{r}^{\frac{1}{c+3}}}\right\}$
 ${\mathrm{itr}}{≔}\left\{{x}{=}{{r}}^{\frac{{1}}{{c}{+}{3}}}{,}{y}{}\left({x}\right){=}\frac{{1}}{{s}{}\left({r}\right){}{{r}}^{\frac{{2}}{{c}{+}{3}}}}{+}\frac{{1}}{{a}{}{{r}}^{\frac{{1}}{{c}{+}{3}}}}\right\}$ (14)

In each step, you must introduce the corresponding value of $c$ before using it.

 > $\mathrm{ITR}≔\mathrm{subs}\left(c=-\frac{8}{3},\mathrm{itr}\right)$
 ${\mathrm{ITR}}{≔}\left\{{x}{=}{{r}}^{{3}}{,}{y}{}\left({x}\right){=}\frac{{1}}{{s}{}\left({r}\right){}{{r}}^{{6}}}{+}\frac{{1}}{{a}{}{{r}}^{{3}}}\right\}$ (15)

The change of variables plus a few simplifications leads to the desired new_ode of type Riccati Special with the order of $c$ reduced by one.

 > $\mathrm{ode_draft}≔\mathrm{dchange}\left(\mathrm{ITR},\mathrm{ode},\left[s\left(r\right),r\right]\right):$
 > $\mathrm{ode2}≔\mathrm{op}\left(\mathrm{solve}\left(\mathrm{ode_draft},\left\{\mathrm{diff}\left(s\left(r\right),r\right)\right\}\right)\right):$
 > $\mathrm{new_ode}≔\mathrm{expand}\left(\mathrm{combine}\left(\mathrm{ode2},\mathrm{symbolic}\right)\right)$
 ${\mathrm{new_ode}}{≔}\frac{{ⅆ}}{{ⅆ}{r}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{s}{}\left({r}\right){=}{-}{3}{}{b}{}{{s}{}\left({r}\right)}^{{2}}{+}\frac{{3}{}{a}}{{{r}}^{{4}}}$ (16)

The exponent of $r$ was reduced from ${c}_{2}=-\frac{8}{3}$ to ${c}_{1}=-4$. Keep doing that until the value $c=0$ is reached. Then, as shown above, a solution is already known.

The same idea applies when n < 0 (in c[n]). For this case, the change of variables is given by

 > $\mathrm{itr}≔\left\{x={r}^{-\frac{1}{c+1}},y=\frac{1}{s\left(r\right){r}^{2}+\frac{\left(c+1\right)r}{b}}\right\}$
 ${\mathrm{itr}}{≔}\left\{{x}{=}{{r}}^{{-}\frac{{1}}{{c}{+}{1}}}{,}{y}{=}\frac{{1}}{{s}{}\left({r}\right){}{{r}}^{{2}}{+}\frac{\left({c}{+}{1}\right){}{r}}{{b}}}\right\}$ (17)

The case in which f(x) + g(x) + h(x) = 0

 > $\mathrm{ode}≔\mathrm{subs}\left(h\left(x\right)=-f\left(x\right)-g\left(x\right),\mathrm{Riccati_ode}\right)$
 ${\mathrm{ode}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){-}{f}{}\left({x}\right){}{{y}{}\left({x}\right)}^{{2}}{-}{g}{}\left({x}\right){}{y}{}\left({x}\right){+}{f}{}\left({x}\right){+}{g}{}\left({x}\right)$ (18)
 > $\mathrm{dsolve}\left(\mathrm{ode},y\left(x\right)\right)$
 ${y}{}\left({x}\right){=}{1}{-}\frac{{2}{}{{ⅇ}}^{{\int }\left({2}{}{f}{}\left({x}\right){+}{g}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}}{{\mathrm{_C1}}{+}{2}{}\left({\int }{f}{}\left({x}\right){}{{ⅇ}}^{{\int }\left({2}{}{f}{}\left({x}\right){+}{g}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)}$ (19)

Finally, it is also possible to convert Riccati ODEs in second order linear homogeneous ODEs, by using convert,ODEs), as follows:

 > $\mathrm{convert}\left(\mathrm{Riccati_ode},\mathrm{linearODE}\right)$
 $\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{_a}{}\left({x}\right){=}\frac{\left({g}{}\left({x}\right){}{f}{}\left({x}\right){+}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{_a}{}\left({x}\right)\right)}{{f}{}\left({x}\right)}{-}{f}{}\left({x}\right){}{h}{}\left({x}\right){}{\mathrm{_a}}{}\left({x}\right){,}\left\{{y}{}\left({x}\right){=}{-}\frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{_a}{}\left({x}\right)}{{f}{}\left({x}\right){}{\mathrm{_a}}{}\left({x}\right)}\right\}$ (20)

In the above, the first operand is the second order linear ODE and the second operand is the transformation of variables used.