23.1.527 problem 517

Internal problem ID [5134]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 517
Date solved : Tuesday, September 30, 2025 at 11:43:54 AM
CAS classification : [_separable]

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