83.3.13 problem 13

Internal problem ID [18990]
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. Exercise II (B) at page 9
Problem number : 13
Date solved : Thursday, March 13, 2025 at 01:18:09 PM
CAS classification : [_separable]

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

Maple. Time used: 0.016 (sec). Leaf size: 35
ode:=(x^2-x^2*y(x))*diff(y(x),x)+y(x)^2+x*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = x \,{\mathrm e}^{\frac {\operatorname {LambertW}\left (-\frac {{\mathrm e}^{\frac {-c_{1} x +1}{x}}}{x}\right ) x +c_{1} x -1}{x}} \]
Mathematica. Time used: 5.123 (sec). Leaf size: 30
ode=(x^2-y[x]*x^2)*D[y[x],x]+(y[x]^2+x*y[x]^2)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{W\left (-\frac {e^{\frac {1}{x}-c_1}}{x}\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.029 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)**2 + (-x**2*y(x) + x**2)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x e^{C_{1} + W\left (- \frac {e^{- C_{1} + \frac {1}{x}}}{x}\right ) - \frac {1}{x}} \]