83.16.1 problem 1 (a)

Internal problem ID [22042]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Examination I. page 253
Problem number : 1 (a)
Date solved : Thursday, October 02, 2025 at 08:22:40 PM
CAS classification : [_separable]

\begin{align*} x^{2} y^{\prime }+y^{2}&=x^{2} y y^{\prime }-x y^{2} \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 32
ode:=x^2*diff(y(x),x)+y(x)^2 = x^2*y(x)*diff(y(x),x)-x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \,{\mathrm e}^{\frac {\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-c_1 +\frac {1}{x}}}{x}\right ) x +c_1 x -1}{x}} \]
Mathematica. Time used: 3.995 (sec). Leaf size: 30
ode=x^2*D[y[x],x]+y[x]^2==x^2*y[x]*D[y[x],x]-x*y[x]^2; 
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: 0.568 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*y(x)*Derivative(y(x), x) + x**2*Derivative(y(x), x) + x*y(x)**2 + 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}} \]