4.9.18 \(\left (x-e^x\right ) y'(x)+\left (1-e^x\right ) y(x)+e^x x=0\)

ODE
\[ \left (x-e^x\right ) y'(x)+\left (1-e^x\right ) y(x)+e^x x=0 \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0159076 (sec), leaf count = 25

\[\left \{\left \{y(x)\to \frac {c_1+e^x (x-1)}{e^x-x}\right \}\right \}\]

Maple
cpu = 0.01 (sec), leaf count = 21

\[ \left \{ y \left ( x \right ) ={\frac { \left ( -1+x \right ) {{\rm e}^{x}}+{\it \_C1}}{-x+{{\rm e}^{x}}}} \right \} \] Mathematica raw input

DSolve[E^x*x + (1 - E^x)*y[x] + (-E^x + x)*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> (E^x*(-1 + x) + C[1])/(E^x - x)}}

Maple raw input

dsolve((x-exp(x))*diff(y(x),x)+x*exp(x)+(1-exp(x))*y(x) = 0, y(x),'implicit')

Maple raw output

y(x) = ((-1+x)*exp(x)+_C1)/(-x+exp(x))