78.6.14 problem 4 (a)

Internal problem ID [18103]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 10 (Linear equations). Problems at page 82
Problem number : 4 (a)
Date solved : Thursday, March 13, 2025 at 11:37:02 AM
CAS classification : [_exact, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \left ({\mathrm e}^{y}-2 x y\right ) y^{\prime }&=y^{2} \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 23
ode:=(exp(y(x))-2*x*y(x))*diff(y(x),x) = y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {x y^{2}-{\mathrm e}^{y}-c_1}{y^{2}} = 0 \]
Mathematica. Time used: 0.212 (sec). Leaf size: 22
ode=( Exp[y[x]] - 2*x*y[x] )*D[y[x],x]==y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {e^{y(x)}}{y(x)^2}+\frac {c_1}{y(x)^2},y(x)\right ] \]
Sympy. Time used: 0.958 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x*y(x) + exp(y(x)))*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x y^{2}{\left (x \right )} - e^{y{\left (x \right )}} = 0 \]