85.9.13 problem 2

Internal problem ID [22487]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 37
Problem number : 2
Date solved : Thursday, October 02, 2025 at 08:41:02 PM
CAS classification : [_separable]

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