4.6.9 \(x^2 y'(x)+2 (1-x) x y(x)=e^x \left (2 e^x-1\right )\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.198408 (sec), leaf count = 24

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

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

\[\left [y \left (x \right ) = \frac {\left (2 x +{\mathrm e}^{-x}+\textit {\_C1} \right ) {\mathrm e}^{2 x}}{x^{2}}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

dsolve(x^2*diff(y(x),x)+2*x*(1-x)*y(x) = exp(x)*(2*exp(x)-1), y(x))

Maple raw output

[y(x) = (2*x+exp(-x)+_C1)*exp(2*x)/x^2]