ODE
\[ -y(x) \left (a^2-k \left (1-x^2\right )\right )+\left (1-x^2\right )^2 y''(x)-2 x \left (1-x^2\right ) y'(x)=0 \] ODE Classification
[[_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.165545 (sec), leaf count = 48
\[\left \{\left \{y(x)\to c_1 P_{\frac {1}{2} \left (\sqrt {4 k+1}-1\right )}^a(x)+c_2 Q_{\frac {1}{2} \left (\sqrt {4 k+1}-1\right )}^a(x)\right \}\right \}\]
Maple ✓
cpu = 0.321 (sec), leaf count = 37
\[\left [y \left (x \right ) = \textit {\_C1} \LegendreP \left (\frac {\sqrt {1+4 k}}{2}-\frac {1}{2}, a , x\right )+\textit {\_C2} \LegendreQ \left (\frac {\sqrt {1+4 k}}{2}-\frac {1}{2}, a , x\right )\right ]\] Mathematica raw input
DSolve[-((a^2 - k*(1 - x^2))*y[x]) - 2*x*(1 - x^2)*y'[x] + (1 - x^2)^2*y''[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> C[1]*LegendreP[(-1 + Sqrt[1 + 4*k])/2, a, x] + C[2]*LegendreQ[(-1 + Sq
rt[1 + 4*k])/2, a, x]}}
Maple raw input
dsolve((-x^2+1)^2*diff(diff(y(x),x),x)-2*x*(-x^2+1)*diff(y(x),x)-(a^2-k*(-x^2+1))*y(x) = 0, y(x))
Maple raw output
[y(x) = _C1*LegendreP(1/2*(1+4*k)^(1/2)-1/2,a,x)+_C2*LegendreQ(1/2*(1+4*k)^(1/2)
-1/2,a,x)]