29.20.25 problem 572

Internal problem ID [5166]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 572
Date solved : Sunday, March 30, 2025 at 06:46:28 AM
CAS classification : [_separable]

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

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