83.16.3 problem 2 (a)

Internal problem ID [22044]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Examination I. page 253
Problem number : 2 (a)
Date solved : Thursday, October 02, 2025 at 08:22:52 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.276 (sec). Leaf size: 15
ode:=x^2*diff(y(x),x)+y(x)^2 = x*y(x)*diff(y(x),x); 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -x \operatorname {LambertW}\left (-\frac {{\mathrm e}^{-1}}{x}\right ) \]
Mathematica. Time used: 1.167 (sec). Leaf size: 17
ode=y[x]^2+x^2*D[y[x],x]==x*y[x]*D[y[x],x]; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x W\left (-\frac {1}{e x}\right ) \end{align*}
Sympy. Time used: 0.309 (sec). Leaf size: 15
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 = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x W\left (- \frac {1}{e x}\right ) \]