83.8.28 problem 29

Internal problem ID [19083]
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 : 29
Date solved : Monday, March 31, 2025 at 06:47:47 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{2}+x^{2} y^{\prime }&=x y y^{\prime } \end{align*}

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