29.19.6 problem 519

Internal problem ID [5115]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 19
Problem number : 519
Date solved : Tuesday, March 04, 2025 at 07:59:11 PM
CAS classification : [_separable]

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

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