58.6.12 problem 12

Internal problem ID [14643]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:45:35 AM
CAS classification : [_separable]

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