89.4.13 problem 14

Internal problem ID [24335]
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. Exercises at page 39
Problem number : 14
Date solved : Thursday, October 02, 2025 at 10:18:59 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} x y \left (1+y^{2}\right )+\left (x^{2} y^{2}-2\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 49
ode:=x*y(x)*(1+y(x)^2)+(x^2*y(x)^2-2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\frac {x^{2}}{4}+\frac {c_1}{2}} \sqrt {2}}{\sqrt {-\frac {x^{2} {\mathrm e}^{\frac {x^{2}}{2}+c_1}}{\operatorname {LambertW}\left (-\frac {x^{2} {\mathrm e}^{\frac {x^{2}}{2}+c_1}}{2}\right )}}} \]
Mathematica. Time used: 15.01 (sec). Leaf size: 192
ode=x*y[x]*( y[x]^2+1  )+( x^2*y[x]^2-2 )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {i \sqrt {2} \sqrt {W\left (-\frac {1}{2} \sqrt {x^4 e^{x^2-2 c_1}}\right )}}{x}\\ y(x)&\to \frac {i \sqrt {2} \sqrt {W\left (-\frac {1}{2} \sqrt {x^4 e^{x^2-2 c_1}}\right )}}{x}\\ y(x)&\to -\frac {i \sqrt {2} \sqrt {W\left (\frac {1}{2} \sqrt {x^4 e^{x^2-2 c_1}}\right )}}{x}\\ y(x)&\to \frac {i \sqrt {2} \sqrt {W\left (\frac {1}{2} \sqrt {x^4 e^{x^2-2 c_1}}\right )}}{x}\\ y(x)&\to 0\\ y(x)&\to -i\\ y(x)&\to i \end{align*}
Sympy. Time used: 0.747 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(y(x)**2 + 1)*y(x) + (x**2*y(x)**2 - 2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x^{2} \left (y^{2}{\left (x \right )} + 1\right )}{2} - 2 \log {\left (y{\left (x \right )} \right )} = 0 \]