81.4.17 problem 5-18

Internal problem ID [21531]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 5. Integrating factors. Page 72.
Problem number : 5-18
Date solved : Thursday, October 02, 2025 at 07:46:57 PM
CAS classification : [_separable]

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