22.1.62 problem 63

Internal problem ID [4368]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 63
Date solved : Tuesday, September 30, 2025 at 07:23:36 AM
CAS classification : [[_1st_order, _with_linear_symmetries]]

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