29.17.16 problem 475

Internal problem ID [5073]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 17
Problem number : 475
Date solved : Sunday, March 30, 2025 at 06:35:18 AM
CAS classification : [[_Abel, `2nd type`, `class B`]]

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

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