61.25.1 problem 1

Internal problem ID [12415]
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 : 1
Date solved : Monday, March 31, 2025 at 05:32:47 AM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (A y+B x +a \right ) y^{\prime }+B y+k x +b&=0 \end{align*}

Maple. Time used: 0.181 (sec). Leaf size: 85
ode:=(A*y(x)+B*x+a)*diff(y(x),x)+B*y(x)+k*x+b = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {-\left (A k -B^{2}\right ) \left (\left (k x +b \right ) A -B^{2} x -B a \right )^{2} c_1^{2}+A}+\left (-k \left (B x +a \right ) A +x \,B^{3}+a \,B^{2}\right ) c_1}{A c_1 \left (A k -B^{2}\right )} \]
Mathematica. Time used: 17.029 (sec). Leaf size: 106
ode=(A*y[x]+B*x+a)*D[y[x],x]+B*y[x]+k*x+b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\frac {\sqrt {\frac {(a+B x)^2}{A}+A c_1-x (2 b+k x)}}{\sqrt {\frac {1}{A}}}+a+B x}{A} \\ y(x)\to -\frac {a+B x}{A}+\sqrt {\frac {1}{A}} \sqrt {\frac {(a+B x)^2}{A}+A c_1-x (2 b+k x)} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
A = symbols("A") 
B = symbols("B") 
a = symbols("a") 
b = symbols("b") 
k = symbols("k") 
y = Function("y") 
ode = Eq(B*y(x) + b + k*x + (A*y(x) + B*x + a)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-B*y(x) - b - k*x)/(A*y(x) + B*x + a) cannot be solved by the factorable group method