29.24.2 problem 664

Internal problem ID [5255]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 24
Problem number : 664
Date solved : Sunday, March 30, 2025 at 07:31:54 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.016 (sec). Leaf size: 25
ode:=(1-x^2*y(x)^2)*diff(y(x),x) = (1+x*y(x))*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {1}{x} \\ y &= -\frac {\operatorname {LambertW}\left (-x \,{\mathrm e}^{-c_1}\right )}{x} \\ \end{align*}
Mathematica. Time used: 2.002 (sec). Leaf size: 43
ode=(1-x^2 y[x]^2)D[y[x],x]==(1+x y[x])y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{x} \\ y(x)\to -\frac {W\left (-e^{-c_1} x\right )}{x} \\ y(x)\to 0 \\ y(x)\to -\frac {1}{x} \\ \end{align*}
Sympy. Time used: 0.501 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*y(x) - 1)*y(x)**2 + (-x**2*y(x)**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {1}{x}, \ y{\left (x \right )} = - \frac {W\left (C_{1} x\right )}{x}\right ] \]