77.1.20 problem 36 (page 40)

Internal problem ID [17831]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 36 (page 40)
Date solved : Thursday, March 13, 2025 at 10:58:40 AM
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.010 (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 (-x \,\textit {\_Z}^{2}+c_{1} {\mathrm e}^{\textit {\_Z}}+1\right )} \]
Mathematica. Time used: 0.148 (sec). Leaf size: 23
ode=(x-2*y[x]*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)}} y(x)^2,y(x)\right ] \]
Sympy. Time used: 1.183 (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 \]