61.24.8 problem 8

Internal problem ID [12342]
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.3-2.
Problem number : 8
Date solved : Monday, March 31, 2025 at 05:11:21 AM
CAS classification : [_rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y y^{\prime }&=x^{n -1} \left (\left (1+2 n \right ) x +a n \right ) y-n \,x^{2 n} \left (x +a \right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 153
ode:=y(x)*diff(y(x),x) = x^(n-1)*((2*n+1)*x+a*n)*y(x)-n*x^(2*n)*(x+a); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 \left (-\frac {\sqrt {-n^{2}}\, x \tan \left (\frac {\operatorname {RootOf}\left (-2 a n \,{\mathrm e}^{\textit {\_Z} +\textit {\_a}}-n x \,{\mathrm e}^{\textit {\_Z} +\textit {\_a}}-\tan \left (\frac {\textit {\_a} \sqrt {-n^{2}}}{2}\right ) \textit {\_Z} \sqrt {-n^{2}}\, x +2 c_1 x \,{\mathrm e}^{\textit {\_a}}\right ) \sqrt {-n^{2}}}{2}\right )}{2}+\left (a +\frac {x}{2}\right ) n \right ) x^{n}}{\tan \left (\frac {\operatorname {RootOf}\left (-2 a n \,{\mathrm e}^{\textit {\_Z} +\textit {\_a}}-n x \,{\mathrm e}^{\textit {\_Z} +\textit {\_a}}-\tan \left (\frac {\textit {\_a} \sqrt {-n^{2}}}{2}\right ) \textit {\_Z} \sqrt {-n^{2}}\, x +2 c_1 x \,{\mathrm e}^{\textit {\_a}}\right ) \sqrt {-n^{2}}}{2}\right ) \sqrt {-n^{2}}-n} \]
Mathematica
ode=y[x]*D[y[x],x]==x^(n-1)*((1+2*n)*x+a*n)*y[x]-n*x^(2*n)*(x+a); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq(n*x**(2*n)*(a + x) - x**(n - 1)*(a*n + x*(2*n + 1))*y(x) + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out