81.4.24 problem 5-25

Internal problem ID [21538]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 5. Integrating factors. Page 72.
Problem number : 5-25
Date solved : Thursday, October 02, 2025 at 07:47:09 PM
CAS classification : [`y=_G(x,y')`]

\begin{align*} y^{\prime }&=\frac {-y x +\ln \left (x^{2}\right )}{x^{2}+x \,{\mathrm e}^{y}} \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 43
ode:=diff(y(x),x) = (-x*y(x)+ln(x^2))/(x^2+x*exp(y(x))); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (\frac {{\mathrm e}^{\frac {\ln \left (x^{2}\right )^{2}-4 c_1}{4 x}}}{x}\right )+\frac {\ln \left (x^{2}\right )^{2}-4 c_1}{4 x} \]
Mathematica. Time used: 5.663 (sec). Leaf size: 51
ode=D[y[x],x] ==(-x*y[x]+Log[x^2])/(x^2+x*Exp[ y[x]]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {-4 x W\left (\frac {e^{\frac {\log ^2\left (x^2\right )+4 c_1}{4 x}}}{x}\right )+\log ^2\left (x^2\right )+4 c_1}{4 x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (-x*y(x) + log(x**2))/(x**2 + x*exp(y(x))),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-x*y(x) + log(x**2))/(x*(x + exp(y(x)))) cannot be solved by the factorable group method