 Solving Riccati's ODEs - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : Classifying ODEs : First Order : odeadvisor/Riccati

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

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

The following transformation

 > ITR := {x=t,y(x)=u(t)*h(t)};
 ${\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:

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

 > ITR := {x=t,y(x)=u(t)*exp(int(g(t),t))};
 ${\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:

 > ode_draft := dchange(ITR,Riccati_ode,known={f(x),g(x),h(x)},[t,u(t)]):
 > ode2 := isolate(ode_draft,diff(u(t),t)):
 > new_ode := collect(ode2,u(t),simplify);
 ${\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:

 > dsolve(subs(c=0,Riccati_S));
 ${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[n] =seq(-4*i/(2*i-1),i=-3..3);
 ${{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}$)

 > ode := subs(c= -8/3,Riccati_S);
 ${\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

 > itr := {y(x)=1/(s(r)*r^(2/(c+3)))+1/(a*r^(1/(c+3))),x=r^(1/(c+3))};
 ${\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.

 > ITR := subs(c=-8/3,itr);
 ${\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.

 > ode_draft := dchange(ITR,ode,[s(r),r]):
 > ode2 := op(solve(ode_draft,{diff(s(r),r)})):
 > new_ode := expand(combine(ode2,symbolic));
 ${\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

 > itr := {y=1/(s(r)*r^2+(c+1)*r/(b)),x=r^(-1/(c+1))};
 ${\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

 > ode := subs(h(x) = -f(x) - g(x), Riccati_ode);
 ${\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)
 > dsolve(ode,y(x));
 ${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:

 > convert(Riccati_ode, linearODE);
 $\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.