23.1.677 problem 672

Internal problem ID [5284]
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 : 672
Date solved : Tuesday, September 30, 2025 at 12:07:15 PM
CAS classification : [_separable]

\begin{align*} \left (x^{2}+1\right ) \left (1+y^{2}\right ) y^{\prime }+2 x y \left (1-y\right )^{2}&=0 \end{align*}
Maple. Time used: 0.018 (sec). Leaf size: 40
ode:=(x^2+1)*(1+y(x)^2)*diff(y(x),x)+2*x*y(x)*(1-y(x))^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (\ln \left (x^{2}+1\right ) {\mathrm e}^{\textit {\_Z}}+2 c_1 \,{\mathrm e}^{\textit {\_Z}}+\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}-\ln \left (x^{2}+1\right )-2 c_1 -\textit {\_Z} -2\right )} \]
Mathematica. Time used: 0.193 (sec). Leaf size: 53
ode=(1+x^2)(1+y[x]^2)D[y[x],x]+2 x y[x](1-y[x])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {K[1]^2+1}{(K[1]-1)^2 K[1]}dK[1]\&\right ]\left [-\log \left (x^2+1\right )+c_1\right ]\\ y(x)&\to 0\\ y(x)&\to 1 \end{align*}
Sympy. Time used: 0.254 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*(1 - y(x))**2*y(x) + (x**2 + 1)*(y(x)**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x^{2} + 1 \right )} + \log {\left (y{\left (x \right )} \right )} - \frac {2}{y{\left (x \right )} - 1} = C_{1} \]