6.5.32 problem 29

Internal problem ID [1656]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 29
Date solved : Tuesday, September 30, 2025 at 04:41:55 AM
CAS classification : [[_homogeneous, `class A`]]

\begin{align*} \left (y^{\prime } x -y\right ) \left (\ln \left (y\right )-\ln \left (x \right )\right )&=x \end{align*}
Maple. Time used: 0.025 (sec). Leaf size: 20
ode:=(x*diff(y(x),x)-y(x))*(ln(y(x))-ln(x)) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (c_1 x \right ) x}{\operatorname {LambertW}\left (\ln \left (c_1 x \right ) {\mathrm e}^{-1}\right )} \]
Mathematica. Time used: 60.104 (sec). Leaf size: 24
ode=(D[y[x],x]*x-y[x])*(Log[y[x]]-Log[x])==x; 
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.868 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x*Derivative(y(x), x) - y(x))*(-log(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 )} \]