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.0233116 (sec), leaf count = 22

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

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

\[ \left \{ y \left ( x \right ) =x{\it \_C2}+{{\rm e}^{x}}{\it \_C1}+{x}^{2}+1 \right \} \] 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),'implicit')

Maple raw output

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