61.25.4 problem 4

Internal problem ID [12418]
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 : 4
Date solved : Monday, March 31, 2025 at 05:33:09 AM
CAS classification : [_exact, _rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (y+A \,x^{n}+a \right ) y^{\prime }+n A \,x^{n -1} y+k \,x^{m}+b&=0 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 147
ode:=(y(x)+A*x^n+a)*diff(y(x),x)+n*A*x^(n-1)*y(x)+k*x^m+b = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {\left (m +1\right ) \left (-2 x^{m +1} k +\left (m +1\right ) \left (x^{2 n} A^{2}+2 A \,x^{n} a +a^{2}-2 b x -2 c_1 \right )\right )}-A \left (m +1\right ) x^{n}-a m -a}{m +1} \\ y &= \frac {-A \left (m +1\right ) x^{n}-a m -\sqrt {\left (m +1\right ) \left (-2 x^{m +1} k +\left (m +1\right ) \left (x^{2 n} A^{2}+2 A \,x^{n} a +a^{2}-2 b x -2 c_1 \right )\right )}-a}{m +1} \\ \end{align*}
Mathematica. Time used: 14.653 (sec). Leaf size: 118
ode=(y[x]+A*x^n+a)*D[y[x],x]+n*A*x^(n-1)*y[x]+k*x^m+b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {\frac {1}{x}} \sqrt {x \left (\left (a+A x^n\right )^2-\frac {2 x \left (b m+b+k x^m\right )}{m+1}+c_1\right )}-a-A x^n \\ y(x)\to \sqrt {\frac {1}{x}} \sqrt {x \left (\left (a+A x^n\right )^2-\frac {2 x \left (b m+b+k x^m\right )}{m+1}+c_1\right )}-a-A x^n \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
A = symbols("A") 
a = symbols("a") 
b = symbols("b") 
k = symbols("k") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(A*n*x**(n - 1)*y(x) + b + k*x**m + (A*x**n + a + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out