55.22.2 problem 2

Internal problem ID [13543]
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 : 2
Date solved : Wednesday, October 01, 2025 at 04:39:26 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y y^{\prime }-y&=A x +B \end{align*}
Maple. Time used: 0.268 (sec). Leaf size: 67
ode:=y(x)*diff(y(x),x)-y(x) = A*x+B; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-A +{\mathrm e}^{\operatorname {RootOf}\left (\left (A x +B \right )^{2} \left (-4 \,{\mathrm e}^{\textit {\_Z}} \cosh \left (\frac {\left (\textit {\_Z} +2 \ln \left (A x +B \right )+2 c_1 \right ) \sqrt {4 A +1}}{2}\right )^{2}+4 A +1\right )\right )}+\textit {\_Z} \right ) \left (A x +B \right )}{A} \]
Mathematica. Time used: 0.069 (sec). Leaf size: 88
ode=y[x]*D[y[x],x]-y[x]==A*x+B; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {\frac {2 \arctan \left (\frac {\frac {2 A y(x)}{A x+B}-1}{\sqrt {-4 A-1}}\right )}{\sqrt {-4 A-1}}+\log \left (-\frac {A y(x)^2}{(A x+B)^2}+\frac {y(x)}{A x+B}+1\right )}{2 A}=\frac {\log (A x+B)}{A}+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
A = symbols("A") 
B = symbols("B") 
y = Function("y") 
ode = Eq(-A*x - B + y(x)*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : argument of type Pow is not iterable