29.25.8 problem 705

Internal problem ID [5295]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 25
Problem number : 705
Date solved : Tuesday, March 04, 2025 at 09:16:30 PM
CAS classification : [[_homogeneous, `class G`], _rational]

\begin{align*} x \left (1-x y\right ) \left (1-x^{2} y^{2}\right ) y^{\prime }+\left (1+x y\right ) \left (1+x^{2} y^{2}\right ) y&=0 \end{align*}

Maple. Time used: 0.260 (sec). Leaf size: 42
ode:=x*(1-x*y(x))*(1-x^2*y(x)^2)*diff(y(x),x)+(1+x*y(x))*(1+x^2*y(x)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= -\frac {1}{x} \\ y \left (x \right ) &= \frac {{\mathrm e}^{\operatorname {RootOf}\left (-2 \,{\mathrm e}^{\textit {\_Z}} \ln \left (x \right )-{\mathrm e}^{2 \textit {\_Z}}+2 c_{1} {\mathrm e}^{\textit {\_Z}}+2 \textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}+1\right )}}{x} \\ \end{align*}
Mathematica. Time used: 0.221 (sec). Leaf size: 35
ode=x(1-x y[x])(1-x^2 y[x]^2)D[y[x],x]+(1+x y[x])(1+x^2 y[x]^2)y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{x} \\ \text {Solve}\left [x y(x)-\frac {1}{x y(x)}-2 \log (y(x))&=c_1,y(x)\right ] \\ \end{align*}
Sympy. Time used: 1.503 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-x*y(x) + 1)*(-x**2*y(x)**2 + 1)*Derivative(y(x), x) + (x*y(x) + 1)*(x**2*y(x)**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {1}{x}, \ - \frac {x y{\left (x \right )}}{2} - \log {\left (x \right )} + \log {\left (x y{\left (x \right )} \right )} + \frac {1}{2 x y{\left (x \right )}} = C_{1}\right ] \]