61.2.15 problem 15

Internal problem ID [11942]
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 : 15
Date solved : Sunday, March 30, 2025 at 09:24:58 PM
CAS classification : [_rational, _Riccati]

\begin{align*} x^{2} y^{\prime }&=a \,x^{2} y^{2}+b \,x^{n}+c \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 220
ode:=x^2*diff(y(x),x) = a*x^2*y(x)^2+b*x^n+c; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \sqrt {a b}\, \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a c +1}}{n}+1, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a c +1}}{n}+1, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right )\right ) x^{\frac {n}{2}}-\left (\sqrt {-4 a c +1}+1\right ) \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a c +1}}{n}, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a c +1}}{n}, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right )\right )}{2 x a \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a c +1}}{n}, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a c +1}}{n}, \frac {2 \sqrt {a b}\, x^{\frac {n}{2}}}{n}\right )\right )} \]
Mathematica. Time used: 0.981 (sec). Leaf size: 1779
ode=x^2*D[y[x],x]==a*x^2*y[x]^2+b*x^n+c; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*x**2*y(x)**2 - b*x**n - c + 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**n + c)/x**2 cannot be solved by the factorable group method