Definition of Riccati ODEs
Riccati ODEs are a mixture of first-order linear ODEs and Bernoulli ODEs, in the form of
\begin{equation}
\frac{dy}{dx} = Q_0(x) + Q_1(x)y + Q_2(x)y^2 \tag{1}
\end{equation}
Particularly, \( Q_0(x) \) is the non-homogeneous term in linear ODEs and \( Q_2(x)y^2 \) is the non-linear term in Bernoulli ODEs when \( n = 2 \).
Solution Method
One approach to obtain the general solution to a Riccati ODE depends on whether a particular solution \( y_p \) is already known beforehand. If it is indeed the case, then we can make a substitution \( y = y_p + 1/z \) and transform the equation into a linear ODE in \( z \) that can be readily dealt with. The heuristic reason that the guess form of the additional term is \( v = 1/z \) comes from the fact that the Bernoulli equations (see this tutorial), when \( n = 2 \), can be solved by making a similar substitution \( v = z^{1-2} = 1/z \). Below we show the details of the derivation:
\begin{align}
\frac{d}{dx}(y_p + \frac{1}{z}) &= Q_0(x) + Q_1(x)(y_p + \frac{1}{z}) + Q_2(x)(y_p + \frac{1}{z})^2 \\
\frac{dy_p}{dx} -\frac{1}{z^2}\frac{dz}{dx} &= Q_0(x) + Q_1(x)y_p + Q_1(x)\frac{1}{z} \\
&\quad+Q_2(x)y_p^2 + 2Q_2(x)\frac{y_p}{z} + Q_2(x)\frac{1}{z^2} \\
\frac{dy_p}{dx} -\frac{1}{z^2}\frac{dz}{dx} &= (Q_0(x) + Q_1(x)y_p +Q_2(x)y_p^2) \\
&\quad+ Q_1(x)\frac{1}{z} + 2Q_2(x)\frac{y_p}{z} + Q_2(x)\frac{1}{z^2} \\
-\frac{1}{z^2}\frac{dz}{dx} &= Q_1(x)\frac{1}{z} + 2Q_2(x)\frac{y_p}{z} + Q_2(x)\frac{1}{z^2} \tag{2}
\end{align}
because the particular solution \( y_p \) satisfies the original Riccati ODE \( dy_p/dx = Q_0(x) + Q_1(x)y_p + Q_2(x)y_p^2 \). After some rearrangement we arrive at the new equation:
\begin{equation}
\frac{dz}{dx} + (Q_1(x) + 2Q_2(x)y_p)z = -Q_2(x) \tag{3}
\end{equation}
Example
Our example is to solve the Riccati ODE
\begin{align}
\frac{dy}{dx} = xy^2 -y -\frac{1}{x^2} \tag{4}
\end{align}
It is not hard to see that \( y_p = 1/x \) is a particular solution of this. Let \( y = y_c + y_p = 1/z + 1/x \), \( dy/dx = -1/z^2 (dz/dx) -1/x^2 \), plugging in gives
\begin{align}
-\frac{1}{z^2} \frac{dz}{dx} -\frac{1}{x^2} &= x(\frac{1}{z} + \frac{1}{x})^2 -(\frac{1}{z} + \frac{1}{x}) -\frac{1}{x^2} \\
-\frac{1}{z^2} \frac{dz}{dx} &= x(\frac{1}{z^2} + \frac{2}{xz} + \frac{1}{x^2}) -(\frac{1}{z} + \frac{1}{x}) \\
-\frac{1}{z^2} \frac{dz}{dx} &= \frac{x}{z^2} + \frac{1}{z} \\
\frac{dz}{dx} &= -x -z \tag{5}
\end{align}
This is a linear ODE with an integrating factor of \( e^x \):
\begin{align}
e^{x}\frac{dz}{dx} + ze^{x} &= -xe^{x} \\
\frac{d}{dx}(e^x z) &= -xe^{x} \\
e^x z &= -\int xe^{x} dx \\
e^x z &= -xe^{x} + e^x + C \\
z &= 1 -x + Ce^{-x} \tag{6}
\end{align}
As a result,
\begin{align}
y &= \frac{1}{z} + \frac{1}{x} \\
&= \frac{1}{1 -x + Ce^{-x}} + \frac{1}{x} \\
&= \frac{1 + Ce^{-x}}{x(1 -x + Ce^{-x})} \tag{7}
\end{align}
Exercise
Find a particular solution for the Riccati ODE
\begin{equation}
\frac{dy}{dx} = \frac{y^2}{x^2} + 3\frac{y}{x} -(x^2 + x) \tag{8}
\end{equation}
(Hint: Try some polynomial \( x^m \)) and hence derive the general solution.
Answer
After some trial-and-error you should be able to see that \( y_p = x^2 \) is a particular solution. Hence we let \( y = x^2 + 1/z \), which gives
\begin{align}
\frac{d}{dx}(x^2 + \frac{1}{z}) &= \frac{(x^2 + \frac{1}{z})^2}{x^2} + 3\frac{(x^2 + \frac{1}{z})}{x} -(x^2 + x) \\
2x -\frac{1}{z^2}\frac{dz}{dx} &= \frac{x^4 + 2\frac{x^2}{z} + \frac{1}{z^2}}{x^2} + 3x + 3\frac{1}{xz} -(x^2 + x) \\
-\frac{1}{z^2}\frac{dz}{dx} &= \frac{2}{z} + \frac{1}{x^2z^2} + \frac{3}{xz} \\
\frac{dz}{dx} &= -2z -\frac{1}{x^2} -\frac{3z}{x} \\
\frac{dz}{dx} + (2 + \frac{3}{x}) z&= -\frac{1}{x^2}
\end{align}
The integrating factor is
\begin{align}
\exp(\int (2 + \frac{3}{x}) dx) = \exp(2x + 3\ln |x|) = x^3e^{2x}
\end{align}
So
\begin{align}
\frac{d}{dx} (x^3e^{2x}z) &= -xe^{2x} \\
x^3e^{2x}z &= -\int xe^{2x} dx = -\frac{1}{2}xe^{2x} + \frac{1}{4}e^{2x} + C \\
z &= -\frac{1}{2x^2}+ \frac{1}{4x^3} + C\frac{e^{-2x}}{x^3}
\end{align}
and the general solution is
\begin{align}
y &= x^2 + \frac{1}{\frac{1}{4x^3} -\frac{1}{2x^2} + C\frac{e^{-2x}}{x^3}} \\
&= x^2 + \frac{x^3}{\frac{1}{4} -\frac{x}{2} + Ce^{-2x}} \\
&= \frac{x^3 + x^2(\frac{1}{4} -\frac{x}{2} + Ce^{-2x})}{\frac{1}{4} -\frac{x}{2} + Ce^{-2x}} \\
&= \frac{\frac{x^3}{2} + \frac{x^2}{4} + Cx^2e^{-2x}}{\frac{1}{4} -\frac{x}{2} + Ce^{-2x}} \\
&= x^2\frac{\frac{x}{2} + \frac{1}{4} + Ce^{-2x}}{\frac{1}{4} -\frac{x}{2} + Ce^{-2x}}
\end{align}








Leave a Reply