75.2.16 problem 36

Internal problem ID [16614]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 2. The method of isoclines. Exercises page 27
Problem number : 36
Date solved : Thursday, March 13, 2025 at 08:26:43 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 9
ode:=diff(y(x),x) = -y(x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_{1}}{x} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 16
ode=D[y[x],x]==-y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {c_1}{x} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.094 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x} \]