89.2.16 problem 16

Internal problem ID [24281]
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 : 16
Date solved : Thursday, October 02, 2025 at 10:06:51 PM
CAS classification : [[_homogeneous, `class A`]]

\begin{align*} x -y \ln \left (y\right )+y \ln \left (x \right )+x \left (\ln \left (y\right )-\ln \left (x \right )\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.023 (sec). Leaf size: 24
ode:=x-y(x)*ln(y(x))+y(x)*ln(x)+x*(ln(y(x))-ln(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (\frac {c_1}{x}\right ) x}{\operatorname {LambertW}\left (\ln \left (\frac {c_1}{x}\right ) {\mathrm e}^{-1}\right )} \]
Mathematica. Time used: 60.105 (sec). Leaf size: 28
ode=(x-y[x]*Log[y[x]]+y[x]*Log[x] )+x*(Log[y[x]]-Log[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x (-\log (x)+c_1)}{W\left (\frac {-\log (x)+c_1}{e}\right )} \end{align*}
Sympy. Time used: 0.818 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-log(x) + log(y(x)))*Derivative(y(x), x) + x + y(x)*log(x) - y(x)*log(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x}{W\left (\frac {C_{1}}{e} - \log {\left (x^{e^{-1}} \right )}\right )} - \log {\left (x^{\frac {x}{W\left (\frac {C_{1}}{e} - \log {\left (x^{e^{-1}} \right )}\right )}} \right )} \]