58.5.15 problem 15

Internal problem ID [14609]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.3 (Linear equations). Exercises page 56
Problem number : 15
Date solved : Thursday, October 02, 2025 at 09:44:11 AM
CAS classification : [_separable]

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