20.4.40 problem Problem 58

Internal problem ID [3675]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 58
Date solved : Sunday, March 30, 2025 at 02:04:47 AM
CAS classification : [[_homogeneous, `class G`]]

\begin{align*} y^{\prime }&=\frac {y \left (\ln \left (x y\right )-1\right )}{x} \end{align*}

Maple. Time used: 0.074 (sec). Leaf size: 14
ode:=diff(y(x),x) = y(x)/x*(ln(x*y(x))-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\frac {x}{c_1}}}{x} \]
Mathematica. Time used: 0.218 (sec). Leaf size: 24
ode=D[y[x],x]==y[x]/x*(Log[x*y[x]]-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {e^{e^{c_1} x}}{x} \\ y(x)\to \frac {1}{x} \\ \end{align*}
Sympy. Time used: 0.429 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (log(x*y(x)) - 1)*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{C_{1} x}}{x} \]