89.6.24 problem 24

Internal problem ID [24407]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Miscellaneous Exercises at page 45
Problem number : 24
Date solved : Thursday, October 02, 2025 at 10:25:41 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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