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

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

Maple
cpu = 0.03 (sec), leaf count = 20

\[ \left \{ y \left ( x \right ) =x{\it \_C2}+{\it \_C1}\,{x}^{2}+{\it \_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] -> (2*x^3 - 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]) - 2*x*(1 + 6*Sqrt[-(-1 + x^2)^2]*C[1] - 3*Sqrt[-(-1 + x^2)^
2]*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),'implicit')

Maple raw output

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