4.32.46 \(-\left (-x^2-x+1\right ) y'(x)+(x+1)^2 y''(x)-(x+2) y(x)=0\)

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.417592 (sec), leaf count = 46

\[\left \{\left \{y(x)\to e^{-x} \left (c_2 \int _1^xe^{\frac {K[1]^2+K[1]-1}{K[1]+1}} (K[1]+1)dK[1]+c_1\right )\right \}\right \}\]

Maple
cpu = 1.336 (sec), leaf count = 55

\[\left [y \left (x \right ) = \textit {\_C1} \,{\mathrm e}^{-x} \left (x +1\right ) \mathit {HD}\left (4, 4, -8, 12, \frac {x}{2+x}\right )+\textit {\_C2} \left (x +1\right ) \mathit {HD}\left (-4, 4, -8, 12, \frac {x}{2+x}\right ) {\mathrm e}^{\frac {x -1}{2+2 x}}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = _C1*exp(-x)*(x+1)*HeunD(4,4,-8,12,x/(2+x))+_C2*(x+1)*HeunD(-4,4,-8,12,x/
(2+x))*exp((x-1)/(2+2*x))]