2.2.48 Problem 51
Internal
problem
ID
[13254]
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
:
51
Date
solved
:
Wednesday, December 31, 2025 at 12:27:29 PM
CAS
classification
:
[_rational, _Riccati]
2.2.48.1 Solved using first_order_ode_riccati
3.470 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime } x^{2}&=x^{2} a y^{2}+b x y+c \,x^{n}+s \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {x^{2} a y^{2}+b x y+c \,x^{n}+s}{x^{2}} \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 {c \,x^{n}}{x^{2}}+\frac {s}{x^{2}}\), \(f_1(x)=\frac {b}{x}\) and \(f_2(x)=a\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u a} \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 {b a}{x}\\ f_2^2 f_0 &=a^{2} \left (\frac {c \,x^{n}}{x^{2}}+\frac {s}{x^{2}}\right ) \end{align*}
Substituting the above terms back in equation (2) gives
\[
a u^{\prime \prime }\left (x \right )-\frac {b a u^{\prime }\left (x \right )}{x}+a^{2} \left (\frac {c \,x^{n}}{x^{2}}+\frac {s}{x^{2}}\right ) u \left (x \right ) = 0
\]
Entering second order bessel ode
solverWriting the ode as \begin{align*} \left (\frac {d^{2}u}{d x^{2}}\right ) x^{2}-b \left (\frac {d u}{d x}\right ) x +\left (x^{n} a c +a s \right ) u = 0\tag {1} \end{align*}
Bessel ode has the form
\begin{align*} \left (\frac {d^{2}u}{d x^{2}}\right ) x^{2}+\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*} \left (\frac {d^{2}u}{d x^{2}}\right ) x^{2}+\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 {b}{2}\\ \beta &= \frac {2 \sqrt {a c}}{n}\\ n &= \frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}\\ \gamma &= \frac {n}{2} \end{align*}
Substituting all the above into (4) gives the solution as
\begin{align*} u = c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) \end{align*}
Taking derivative gives
\begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}+\frac {c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u a} \\
y &= -\frac {\frac {c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}+\frac {c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}}{a \left (c_1 \,x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+c_2 \,x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right )} \\
\end{align*}
Doing change of
constants, the above solution becomes \[
y = -\frac {\frac {x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}+\frac {c_3 \,x^{\frac {1}{2}+\frac {b}{2}} \left (\frac {1}{2}+\frac {b}{2}\right ) \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{x}+\frac {c_3 \,x^{\frac {1}{2}+\frac {b}{2}} \left (-\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\frac {\sqrt {-4 a s +b^{2}+2 b +1}\, x^{-\frac {n}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )}{2 \sqrt {a c}}\right ) \sqrt {a c}\, x^{\frac {n}{2}}}{x}}{a \left (x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+c_3 \,x^{\frac {1}{2}+\frac {b}{2}} \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right )}
\]
Simplifying the above gives \begin{align*}
y &= \frac {2 \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) c_3 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \sqrt {a c}\, x^{\frac {n}{2}}-\left (c_3 \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \left (\sqrt {-4 a s +b^{2}+2 b +1}+b +1\right )}{2 x a \left (c_3 \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right )} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {2 \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) c_3 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \sqrt {a c}\, x^{\frac {n}{2}}-\left (c_3 \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \left (\sqrt {-4 a s +b^{2}+2 b +1}+b +1\right )}{2 x a \left (c_3 \operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )+\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right )} \\
\end{align*}
2.2.48.2 ✓ Maple. Time used: 0.002 (sec). Leaf size: 263
ode:=x^2*diff(y(x),x) = a*x^2*y(x)^2+b*x*y(x)+c*x^n+s;
dsolve(ode,y(x), singsol=all);
\[
y = \frac {2 \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \sqrt {a c}\, x^{\frac {n}{2}}-\left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\right ) \left (\sqrt {-4 a s +b^{2}+2 b +1}+b +1\right )}{2 x a \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {a c}\, x^{\frac {n}{2}}}{n}\right )\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*b*diff(y(x),x)-a
*(x^(-2+n)*c*x^2+s)/x^2*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^{2} \left (\frac {d}{d x}y \left (x \right )\right )=a \,x^{2} y \left (x \right )^{2}+b x y \left (x \right )+c \,x^{13254}+s \\ \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 {a \,x^{2} y \left (x \right )^{2}+b x y \left (x \right )+c \,x^{13254}+s}{x^{2}} \end {array} \]
2.2.48.3 ✓ Mathematica. Time used: 0.865 (sec). Leaf size: 2281
ode=x^2*D[y[x],x]==a*x^2*y[x]^2+b*x*y[x]+c*x^n+s;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
Too large to display
2.2.48.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
n = symbols("n")
s = symbols("s")
y = Function("y")
ode = Eq(-a*x**2*y(x)**2 - b*x*y(x) - c*x**n - s + x**2*Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**2*y(x)**2 + b*x*y(x) + c*x**n + s)/x**2 cannot be solved by the factorable group method