55.22.5 problem 5

Internal problem ID [13546]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.3. Abel Equations of the Second Kind. subsection 1.3.1-2. Solvable equations and their solutions
Problem number : 5
Date solved : Sunday, October 12, 2025 at 03:39:15 AM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y y^{\prime }-y&=A x +\frac {B}{x}-\frac {B^{2}}{x^{3}} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 179
ode:=y(x)*diff(y(x),x)-y(x) = A*x+B/x-B^2/x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {\left (-B \,x^{2} y-B^{2} x \right ) \int _{}^{-\frac {x^{2}}{2 y x +2 B}}\frac {{\mathrm e}^{\frac {2 \,\operatorname {arctanh}\left (\frac {4 A \textit {\_a} -1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}}} \left (4 A \,\textit {\_a}^{2}-2 \textit {\_a} -1\right )}{\textit {\_a}^{2}}d \textit {\_a} +2 y \left (-x^{2} y^{2}+\left (x^{3}-2 B x \right ) y+A \,x^{4}+B \,x^{2}-B^{2}\right ) {\mathrm e}^{-\frac {2 \,\operatorname {arctanh}\left (\frac {2 A \,x^{2}+y x +B}{\sqrt {4 A +1}\, \left (y x +B \right )}\right )}{\sqrt {4 A +1}}}+x c_1 \left (y x +B \right )}{x \left (y x +B \right )} = 0 \]
Mathematica
ode=y[x]*D[y[x],x]-y[x]==A*x+B/x-B^2*x^(-3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

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