50.3.21 problem 4(a)

Internal problem ID [7845]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.4 First Order Linear Equations. Page 15
Problem number : 4(a)
Date solved : Sunday, March 30, 2025 at 12:29:38 PM
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: 19
ode:=(exp(y(x))-2*x*y(x))*diff(y(x),x) = y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ x +\frac {-{\mathrm e}^{y}-c_1}{y^{2}} = 0 \]
Mathematica. Time used: 0.236 (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.998 (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 \]