77.3.5 problem 5

Internal problem ID [20346]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (B) at page 9
Problem number : 5
Date solved : Thursday, October 02, 2025 at 05:44:31 PM
CAS classification : [_separable]

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