9.4.20 problem 21

Internal problem ID [2933]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 8, page 34
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 06:10:40 AM
CAS classification : [_exact]

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