28.1.11 problem 11

Internal problem ID [4317]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 11
Date solved : Sunday, March 30, 2025 at 02:59:18 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.008 (sec). Leaf size: 10
ode:=x*diff(y(x),x) = y(x)*(1+ln(y(x))-ln(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \,{\mathrm e}^{c_1 x} \]
Mathematica. Time used: 0.208 (sec). Leaf size: 20
ode=x*D[y[x],x]==y[x]*(1+Log[y[x]]-Log[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x e^{e^{c_1} x} \\ y(x)\to x \\ \end{align*}
Sympy. Time used: 0.602 (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 )} = x e^{C_{1} x} \]