23.1.448 problem 438

Internal problem ID [5055]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 438
Date solved : Tuesday, September 30, 2025 at 11:30:36 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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