4.28.14 \(x y''(x)+2 y'(x)-x y(x)=e^x\)

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

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.0301526 (sec), leaf count = 37

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

Maple
cpu = 0.078 (sec), leaf count = 23

\[ \left \{ y \left ( x \right ) ={\frac {\sinh \left ( x \right ) {\it \_C2}}{x}}+{\frac {\cosh \left ( x \right ) {\it \_C1}}{x}}+{\frac {{{\rm e}^{x}}}{2}} \right \} \] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

y(x) = sinh(x)/x*_C2+cosh(x)/x*_C1+1/2*exp(x)