89.6.6 problem 6

Internal problem ID [24389]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Miscellaneous Exercises at page 45
Problem number : 6
Date solved : Thursday, October 02, 2025 at 10:24:12 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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