25.1.7 problem 3.1

Internal problem ID [6840]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 2
Problem number : 3.1
Date solved : Tuesday, September 30, 2025 at 03:54:10 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (y-x \right ) y^{\prime }+y&=0 \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 17
ode:=(y(x)-x)*diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x}{\operatorname {LambertW}\left (-x \,{\mathrm e}^{-c_1}\right )} \]
Mathematica. Time used: 2.863 (sec). Leaf size: 25
ode=(y[x]-x)*D[y[x],x]+y[x]==0; 
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.350 (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 )} \]