56.1.1 problem Ex 1

Internal problem ID [14079]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 8. Exact differential equations. Page 11
Problem number : Ex 1
Date solved : Thursday, October 02, 2025 at 09:10:37 AM
CAS classification : [[_homogeneous, `class D`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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