69.12.24 problem 298

Internal problem ID [18177]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 298
Date solved : Thursday, October 02, 2025 at 03:07:11 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \left (x -2 y x -y^{2}\right ) y^{\prime }+y^{2}&=0 \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 19
ode:=(x-2*x*y(x)-y(x)^2)*diff(y(x),x)+y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{\operatorname {RootOf}\left (-\textit {\_Z}^{2} x +{\mathrm e}^{\textit {\_Z}} c_1 +1\right )} \]
Mathematica. Time used: 0.114 (sec). Leaf size: 25
ode=(x-2*x*y[x]-y[x]^2)*D[y[x],x]+y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=y(x)^2+c_1 e^{\frac {1}{y(x)}-2} y(x)^2,y(x)\right ] \]
Sympy. Time used: 0.994 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x*y(x) + x - y(x)**2)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x e^{- \frac {1}{y{\left (x \right )}}}}{y^{2}{\left (x \right )}} - e^{- \frac {1}{y{\left (x \right )}}} = 0 \]