87.5.21 problem 28

Internal problem ID [23314]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 47
Problem number : 28
Date solved : Thursday, October 02, 2025 at 09:31:40 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y-\left (x -2 y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 17
ode:=y(x)-(x-2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x}{2 \operatorname {LambertW}\left (-\frac {x \,{\mathrm e}^{-\frac {c_1}{2}}}{2}\right )} \]
Mathematica. Time used: 3.319 (sec). Leaf size: 31
ode=y[x]-(x-2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {x}{2 W\left (-\frac {1}{2} e^{-\frac {c_1}{2}} x\right )}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.382 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x + 2*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 (- \frac {x e^{- C_{1}}}{2}\right )} \]