2.2.34 Problem 37
Internal
problem
ID
[13240]
Book
:
Handbook
of
exact
solutions
for
ordinary
differential
equations.
By
Polyanin
and
Zaitsev.
Second
edition
Section
:
Chapter
1,
section
1.2.
Riccati
Equation.
1.2.2.
Equations
Containing
Power
Functions
Problem
number
:
37
Date
solved
:
Wednesday, December 31, 2025 at 12:21:34 PM
CAS
classification
:
[_rational, _Riccati]
2.2.34.1 Solved using first_order_ode_riccati
3.259 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime } x&=x y^{2}+a y+b \,x^{n} \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {x y^{2}+a y+b \,x^{n}}{x} \end{align*}
This is a Riccati ODE. Comparing the ODE to solve
\[
y' = \textit {the\_rhs}
\]
With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows
that \(f_0(x)=\frac {b \,x^{n}}{x}\), \(f_1(x)=\frac {a}{x}\) and \(f_2(x)=1\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u} \tag {1} \end{align*}
Using the above substitution in the given ODE results (after some simplification) in a second
order ODE to solve for \(u(x)\) which is
\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}
But
\begin{align*} f_2' &=0\\ f_1 f_2 &=\frac {a}{x}\\ f_2^2 f_0 &=\frac {b \,x^{n}}{x} \end{align*}
Substituting the above terms back in equation (2) gives
\[
u^{\prime \prime }\left (x \right )-\frac {a u^{\prime }\left (x \right )}{x}+\frac {b \,x^{n} u \left (x \right )}{x} = 0
\]
Entering second order bessel ode
solverWriting the ode as \begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )-a x \left (\frac {d u}{d x}\right )+x^{n} b x u = 0\tag {1} \end{align*}
Bessel ode has the form
\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (\frac {d u}{d x}\right ) x +\left (-n^{2}+x^{2}\right ) u = 0\tag {2} \end{align*}
The generalized form of Bessel ode is given by Bowman (1958) as the following
\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (1-2 \alpha \right ) x \left (\frac {d u}{d x}\right )+\left (\beta ^{2} \gamma ^{2} x^{2 \gamma }-n^{2} \gamma ^{2}+\alpha ^{2}\right ) u = 0\tag {3} \end{align*}
With the standard solution
\begin{align*} u&=x^{\alpha } \left (c_1 \operatorname {BesselJ}\left (n , \beta \,x^{\gamma }\right )+c_2 \operatorname {BesselY}\left (n , \beta \,x^{\gamma }\right )\right )\tag {4} \end{align*}
Comparing (3) to (1) and solving for \(\alpha ,\beta ,n,\gamma \) gives
\begin{align*} \alpha &= \frac {1}{2}+\frac {a}{2}\\ \beta &= \frac {2 \sqrt {b}}{n +1}\\ n &= -\frac {a +1}{n +1}\\ \gamma &= \frac {n}{2}+\frac {1}{2} \end{align*}
Substituting all the above into (4) gives the solution as
\begin{align*} u = c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )+c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) \end{align*}
Taking derivative gives
\begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselJ}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}+\frac {c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselY}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u} \\
y &= -\frac {\frac {c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselJ}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}+\frac {c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselY}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}}{c_1 \,x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )+c_2 \,x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )} \\
\end{align*}
Doing change of
constants, the above solution becomes \[
y = -\frac {\frac {x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselJ}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}+\frac {c_3 \,x^{\frac {1}{2}+\frac {a}{2}} \left (\frac {1}{2}+\frac {a}{2}\right ) \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{x}+\frac {2 c_3 \,x^{\frac {1}{2}+\frac {a}{2}} \left (-\operatorname {BesselY}\left (-\frac {a +1}{n +1}+1, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )-\frac {\left (a +1\right ) x^{-\frac {n}{2}-\frac {1}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}{2 \sqrt {b}}\right ) \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}} \left (\frac {n}{2}+\frac {1}{2}\right )}{x \left (n +1\right )}}{x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselJ}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )+c_3 \,x^{\frac {1}{2}+\frac {a}{2}} \operatorname {BesselY}\left (-\frac {a +1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )}
\]
Simplifying the above gives \begin{align*}
y &= \frac {x^{\frac {n}{2}-\frac {1}{2}} \sqrt {b}\, \left (\operatorname {BesselY}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_3 +\operatorname {BesselJ}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )\right )}{c_3 \operatorname {BesselY}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )+\operatorname {BesselJ}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {x^{\frac {n}{2}-\frac {1}{2}} \sqrt {b}\, \left (\operatorname {BesselY}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_3 +\operatorname {BesselJ}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )\right )}{c_3 \operatorname {BesselY}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )+\operatorname {BesselJ}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )} \\
\end{align*}
2.2.34.2 ✓ Maple. Time used: 0.002 (sec). Leaf size: 139
ode:=x*diff(y(x),x) = x*y(x)^2+a*y(x)+b*x^n;
dsolve(ode,y(x), singsol=all);
\[
y = \frac {x^{-\frac {1}{2}+\frac {n}{2}} \sqrt {b}\, \left (\operatorname {BesselY}\left (\frac {-a +n}{1+n}, \frac {2 \sqrt {b}\, x^{\frac {1}{2}+\frac {n}{2}}}{1+n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {-a +n}{1+n}, \frac {2 \sqrt {b}\, x^{\frac {1}{2}+\frac {n}{2}}}{1+n}\right )\right )}{\operatorname {BesselY}\left (\frac {-a -1}{1+n}, \frac {2 \sqrt {b}\, x^{\frac {1}{2}+\frac {n}{2}}}{1+n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {-a -1}{1+n}, \frac {2 \sqrt {b}\, x^{\frac {1}{2}+\frac {n}{2}}}{1+n}\right )}
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
trying inverse linear
trying homogeneous types:
trying Chini
differential order: 1; looking for linear symmetries
trying exact
Looking for potential symmetries
trying Riccati
trying Riccati sub-methods:
trying Riccati_symmetries
trying Riccati to 2nd Order
-> Calling odsolve with the ODE, diff(diff(y(x),x),x) = 1/x*a*diff(y(x),x)-b
*x^(-1+n)*y(x), y(x)
*** Sublevel 2 ***
Methods for second order ODEs:
--- Trying classification methods ---
trying a symmetry of the form [xi=0, eta=F(x)]
checking if the LODE is missing y
-> Trying an equivalence, under non-integer power transformations,
to LODEs admitting Liouvillian solutions.
-> Trying a Liouvillian solution using Kovacics algorithm
<- No Liouvillian solutions exists
-> Trying a solution in terms of special functions:
-> Bessel
<- Bessel successful
<- special function solution successful
<- Riccati to 2nd Order successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \left (\frac {d}{d x}y \left (x \right )\right )=x y \left (x \right )^{2}+a y \left (x \right )+b \,x^{13240} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\frac {x y \left (x \right )^{2}+a y \left (x \right )+b \,x^{13240}}{x} \end {array} \]
2.2.34.3 ✓ Mathematica. Time used: 0.448 (sec). Leaf size: 855
ode=x*D[y[x],x]==x*y[x]^2+a*y[x]+b*x^n;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} \text {Solution too large to show}\end{align*}
2.2.34.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
n = symbols("n")
y = Function("y")
ode = Eq(-a*y(x) - b*x**n - x*y(x)**2 + x*Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE Derivative(y(x), x) - (a*y(x) + b*x**n + x*y(x)**2)/x cannot be solved by the factorable group method