20.5.1 problem Problem 1

Internal problem ID [3684]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.9, Exact Differential Equations. page 91
Problem number : Problem 1
Date solved : Sunday, March 30, 2025 at 02:05:40 AM
CAS classification : [`x=_G(y,y')`]

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

Maple
ode:=y(x)*exp(x*y(x))+(2*y(x)-x*exp(x*y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=y[x]*Exp[x*y[x]]+(2*y[x]-x*Exp[x*y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*exp(x*y(x)) + 2*y(x))*Derivative(y(x), x) + y(x)*exp(x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - y(x)*exp(x*y(x))/(x*exp(x*y(x)) - 2*y(x)) cannot be solved by the factorable group method