75.5.2 problem 101

Internal problem ID [16667]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 5. Homogeneous equations. Exercises page 44
Problem number : 101
Date solved : Monday, March 31, 2025 at 03:04:26 PM
CAS classification : [_linear]

\begin{align*} x -y+x y^{\prime }&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=x-y(x)+x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.024 (sec). Leaf size: 14
ode=(x-y[x])+x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (-\log (x)+c_1) \]
Sympy. Time used: 0.161 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + x - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} - \log {\left (x \right )}\right ) \]