15.1.16 problem 16

Internal problem ID [2856]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 16
Date solved : Sunday, March 30, 2025 at 12:34:35 AM
CAS classification : [_separable]

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

Maple. Time used: 0.021 (sec). Leaf size: 19
ode:=y(x)+x*diff(y(x),x) = x*y(x)*(diff(y(x),x)-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-x}}{x c_1}\right ) \]
Mathematica. Time used: 2.911 (sec). Leaf size: 28
ode=y[x]+x*D[y[x],x]==x*y[x]*(D[y[x],x]-1); 
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.310 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(Derivative(y(x), x) - 1)*y(x) + x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - W\left (\frac {C_{1} e^{- x}}{x}\right ) \]