Solving Riccati's ODEs
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);
where f⁡x, g⁡x, and h⁡x 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;
See Differentialgleichungen, by E. Kamke, pp. 21-23. There is as yet no general solution for the regular Riccati ODE.
For h⁡x=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⁡x is not yet known.
The following transformation
ITR ≔ x=t,y⁡x=u⁡t⁢h⁡t
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 ≔ ⅆⅆt⁢u⁡t=solve⁡ode_draft,ⅆⅆt⁢u⁡t:
new_ode ≔ collect⁡ode2,u⁡t,normal
ITR ≔ x=t,y⁡x=u⁡t⁢ⅇ∫g⁡tⅆt
leads to another Riccati ODE but without the "linear in u(t)" term:
ode2 ≔ isolate⁡ode_draft,ⅆⅆt⁢u⁡t:
new_ode ≔ collect⁡ode2,u⁡t,simplify
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:
Now, for c≠0, Riccati Special ODEs can be reduced, step by step, to the case c=0, provided that c can be written as cn=−4⁢n2⁢n−1 (integer n). Examples of possible values for c:
The idea is to change variables so as to obtain another ODE of type Riccati Special, but with c[n->0], until reaching c0=0. There are two variable transformations leading to the desired reduction, depending on the sign of n in cn above (see examples at the end).
1) Riccati Special ODE with c=−83 (c2=−83)
ode ≔ subs⁡c=−83,Riccati_S
The general transformation for n > 0 (in cn), in order to reduce c is given by
itr ≔ y⁡x=1s⁡r⁢r2c+3+1a⁢r1c+3,x=r1c+3
In each step, you must introduce the corresponding value of c before using it.
ITR ≔ subs⁡c=−83,itr
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,ⅆⅆr⁢s⁡r:
new_ode ≔ expand⁡combine⁡ode2,symbolic
The exponent of r was reduced from c2=−83 to c1=−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=1s⁡r⁢r2+c+1⁢rb,x=r−1c+1
The case in which f(x) + g(x) + h(x) = 0
ode ≔ subs⁡h⁡x=−f⁡x−g⁡x,Riccati_ode
Finally, it is also possible to convert Riccati ODEs in second order linear homogeneous ODEs, by using convert,ODEs), as follows:
In the above, the first operand is the second order linear ODE and the second operand is the transformation of variables used.
Download Help Document
What kind of issue would you like to report? (Optional)