72.8.34 problem 34

Internal problem ID [19518]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 34
Date solved : Thursday, October 02, 2025 at 04:36:38 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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