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

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.177849 (sec), leaf count = 22

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

Maple
cpu = 0.043 (sec), leaf count = 16

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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