4.28.38 \(x y''(x)-(2 x+1) y'(x)+(x+1) y(x)=x^2-x-1\)

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

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

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

Maple
cpu = 0.047 (sec), leaf count = 17

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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