29.8.11 problem 216

Internal problem ID [4816]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 216
Date solved : Sunday, March 30, 2025 at 03:59:47 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

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