78.8.17 problem 17

Internal problem ID [18144]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 17
Date solved : Monday, March 31, 2025 at 05:13:36 PM
CAS classification : [_exact]

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

Maple. Time used: 0.011 (sec). Leaf size: 16
ode:=y(x)^2*exp(x*y(x))+cos(x)+(exp(x*y(x))+x*y(x)*exp(x*y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {LambertW}\left (-x \left (c_1 +\sin \left (x \right )\right )\right )}{x} \]
Mathematica. Time used: 60.264 (sec). Leaf size: 19
ode=(y[x]^2*Exp[x*y[x]]+Cos[x])+(Exp[x*y[x]]+x*y[x]*Exp[x*y[x]] )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {W(x (-\sin (x)+c_1))}{x} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x)*exp(x*y(x)) + exp(x*y(x)))*Derivative(y(x), x) + y(x)**2*exp(x*y(x)) + cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out