29.15.7 problem 415

Internal problem ID [5013]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 415
Date solved : Sunday, March 30, 2025 at 04:31:08 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=(x-exp(x))*diff(y(x),x)+x*exp(x)+(1-exp(x))*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-1+x \right ) {\mathrm e}^{x}+c_1}{-x +{\mathrm e}^{x}} \]
Mathematica. Time used: 0.114 (sec). Leaf size: 25
ode=(x-Exp[x])D[y[x],x]+x Exp[x]+(1-Exp[x])y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^x (x-1)+c_1}{e^x-x} \]
Sympy. Time used: 0.362 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*exp(x) + (1 - exp(x))*y(x) + (x - exp(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - x e^{x} + e^{x}}{x - e^{x}} \]