4.31.40 \(n (n+1) y(x)+\left (1-x^2\right ) y''(x)-2 x y'(x)=0\)

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

[_Gegenbauer]

Book solution method
TO DO

Mathematica
cpu = 0.165071 (sec), leaf count = 18

\[\{\{y(x)\to c_1 P_n(x)+c_2 Q_n(x)\}\}\]

Maple
cpu = 0.267 (sec), leaf count = 15

\[[y \left (x \right ) = \textit {\_C1} \LegendreP \left (n , x\right )+\textit {\_C2} \LegendreQ \left (n , x\right )]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> C[1]*LegendreP[n, x] + C[2]*LegendreQ[n, x]}}

Maple raw input

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

Maple raw output

[y(x) = _C1*LegendreP(n,x)+_C2*LegendreQ(n,x)]