55.25.18 problem 18

Internal problem ID [13727]
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.4-2.
Problem number : 18
Date solved : Thursday, October 02, 2025 at 04:36:40 AM
CAS classification : [_separable]

\begin{align*} \left (A x y+B \,x^{2}+k x \right ) y^{\prime }&=A y^{2}+B x y+\left (A b +k \right ) y+B b x +b k \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 26
ode:=(A*x*y(x)+B*x^2+k*x)*diff(y(x),x) = A*y(x)^2+B*x*y(x)+(A*b+k)*y(x)+B*b*x+b*k; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-B x -k}{A} \\ y &= c_1 x -b \\ \end{align*}
Mathematica. Time used: 0.041 (sec). Leaf size: 41
ode=(A*x*y[x]+B*x^2+k*x)*D[y[x],x]==A*y[x]^2+B*x*y[x]+(A*b+k)*y[x]+B*b*x+b*k; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {B x+k}{A}\\ y(x)&\to -b+c_1 x\\ y(x)&\to -\frac {B x+k}{A} \end{align*}
Sympy. Time used: 0.309 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
A = symbols("A") 
B = symbols("B") 
k = symbols("k") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-A*y(x)**2 - B*b*x - B*x*y(x) - b*k - (A*b + k)*y(x) + (A*x*y(x) + B*x**2 + k*x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {- B x - k}{A}, \ y{\left (x \right )} = C_{1} x - b\right ] \]