4.30.26 \(x^2 y''(x)+4 x y'(x)+2 y(x)=e^x\)

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

[[_2nd_order, _exact, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.169049 (sec), leaf count = 19

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

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

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

DSolve[2*y[x] + 4*x*y'[x] + x^2*y''[x] == E^x,y[x],x]

Mathematica raw output

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

Maple raw input

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

Maple raw output

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