65.6.13 problem 13

Internal problem ID [15706]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.2, page 63
Problem number : 13
Date solved : Thursday, October 02, 2025 at 10:23:36 AM
CAS classification : [_linear]

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