80.3.31 problem 34

Internal problem ID [21195]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 34
Date solved : Thursday, October 02, 2025 at 07:26:09 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} x +y^{2}+x y y^{\prime }&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=x+y(x)^2+x*y(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {-6 x^{3}+9 c_1}}{3 x} \\ y &= \frac {\sqrt {-6 x^{3}+9 c_1}}{3 x} \\ \end{align*}
Mathematica. Time used: 0.136 (sec). Leaf size: 46
ode=(x+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 -\frac {\sqrt {-\frac {2 x^3}{3}+c_1}}{x}\\ y(x)&\to \frac {\sqrt {-\frac {2 x^3}{3}+c_1}}{x} \end{align*}
Sympy. Time used: 0.251 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) + x + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {C_{1} - 6 x^{3}}}{3 x}, \ y{\left (x \right )} = \frac {\sqrt {C_{1} - 6 x^{3}}}{3 x}\right ] \]