89.4.6 problem 6

Internal problem ID [24328]
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 : 6
Date solved : Thursday, October 02, 2025 at 10:18:16 PM
CAS classification : [_separable]

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