55.8.12 problem 21

Internal problem ID [13392]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. subsection 1.2.5-2
Problem number : 21
Date solved : Wednesday, October 01, 2025 at 09:37:35 AM
CAS classification : [_Riccati]

\begin{align*} x^{2} y^{\prime }&=y^{2} a^{2} x^{2}-y x +b^{2} \ln \left (x \right )^{n} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 251
ode:=x^2*diff(y(x),x) = y(x)^2*a^2*x^2-x*y(x)+b^2*ln(x)^n; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (x \right )^{\frac {n}{2}+1} \operatorname {BesselY}\left (\frac {n +3}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right ) \sqrt {a^{2} b^{2}}\, c_1 +\operatorname {BesselJ}\left (\frac {n +3}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right ) \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}-\operatorname {BesselY}\left (\frac {1}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right ) c_1 -\operatorname {BesselJ}\left (\frac {1}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right )}{\left (\operatorname {BesselY}\left (\frac {1}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right ) c_1 +\operatorname {BesselJ}\left (\frac {1}{n +2}, \frac {2 \sqrt {a^{2} b^{2}}\, \ln \left (x \right )^{\frac {n}{2}+1}}{n +2}\right )\right ) a^{2} x \ln \left (x \right )} \]
Mathematica. Time used: 30.774 (sec). Leaf size: 2140
ode=x^2*D[y[x],x]==a^2*x^2*y[x]^2-x*y[x]+b^2*(Log[x])^n; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a**2*x**2*y(x)**2 - b**2*log(x)**n + x**2*Derivative(y(x), x) + x*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a**2*y(x)**2 - b**2*log(x)**n/x**2 + Derivative(y(x), x) + y(x)/x cannot be solved by the factorable group method