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

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.229126 (sec), leaf count = 90

\[\left \{\left \{y(x)\to \frac {x^6-4 x^4+3 x^2 \left (1+2 c_1 \sqrt {-\left (x^2-1\right )^2}\right )-6 (2 c_1-c_2) \sqrt {-\left (x^2-1\right )^2} x+6 c_1 \sqrt {-\left (x^2-1\right )^2}}{6-6 x^2}\right \}\right \}\]

Maple
cpu = 0.056 (sec), leaf count = 21

\[\left [y \left (x \right ) = x \textit {\_C2} +\left (x^{2}+1\right ) \textit {\_C1} -\frac {1}{2}-\frac {x^{4}}{6}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> (-4*x^4 + x^6 + 6*Sqrt[-(-1 + x^2)^2]*C[1] + 3*x^2*(1 + 2*Sqrt[-(-1 + 
x^2)^2]*C[1]) - 6*x*Sqrt[-(-1 + x^2)^2]*(2*C[1] - C[2]))/(6 - 6*x^2)}}

Maple raw input

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

Maple raw output

[y(x) = x*_C2+(x^2+1)*_C1-1/2-1/6*x^4]