89.2.18 problem 18

Internal problem ID [24283]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 27
Problem number : 18
Date solved : Thursday, October 02, 2025 at 10:07:03 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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