83.8.12 problem 13

Internal problem ID [19067]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Misc examples on chapter II at page 25
Problem number : 13
Date solved : Monday, March 31, 2025 at 06:43:14 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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

Maple. Time used: 0.076 (sec). Leaf size: 33
ode:=y(x)+(a*x^2*y(x)^n-2*x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \left (y^{n} a x -n -2\right )^{n} y^{2 n} x^{-n}-c_1 = 0 \]
Mathematica. Time used: 0.199 (sec). Leaf size: 42
ode=y[x]+(a*x^2*y[x]^n-2*x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {n \left (\log (x)-\log \left (-a x y(x)^n+n+2\right )\right )}{n+2}-\frac {2 n \log (y(x))}{n+2}=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq((a*x**2*y(x)**n - 2*x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) + y(x)/(x*(a*x*y(x)**n - 2)) cannot be solved by the factorable group method