4.29.2 (1x)y(x)+xy(x)y(x)=(1x)2

ODE
(1x)y(x)+xy(x)y(x)=(1x)2 ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

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

{{y(x)c2x+c1ex+x2+x+1}}

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

{y(x)=x_C2+ex_C1+x2+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),'implicit')

Maple raw output

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