32.4.19 problem Recognizable Exact Differential equations. Integrating factors. Exercise 10.11, page 90

Internal problem ID [5830]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 10
Problem number : Recognizable Exact Differential equations. Integrating factors. Exercise 10.11, page 90
Date solved : Sunday, March 30, 2025 at 10:19:00 AM
CAS classification : [[_homogeneous, `class D`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.012 (sec). Leaf size: 20
ode:=(1+x*y(x))/y(x)+(2*y(x)-x)/y(x)^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x}{2 \operatorname {LambertW}\left (-\frac {{\mathrm e}^{\frac {x^{2}}{4}} c_1 x}{2}\right )} \]
Mathematica. Time used: 3.361 (sec). Leaf size: 37
ode=((x*y[x]+1)/y[x])+((2*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}{2 W\left (-\frac {1}{2} x e^{\frac {1}{4} \left (x^2-2 c_1\right )}\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x + 2*y(x))*Derivative(y(x), x)/y(x)**2 + (x*y(x) + 1)/y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out