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

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

[_Gegenbauer, [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

Book solution method
TO DO

Mathematica
cpu = 0.191616 (sec), leaf count = 91

\[\left \{\left \{y(x)\to c_1 \cosh \left (\frac {1}{2} n \left (\log \left (1-\frac {x}{\sqrt {x^2-1}}\right )-\log \left (\frac {x}{\sqrt {x^2-1}}+1\right )\right )\right )-i c_2 \sinh \left (\frac {1}{2} n \left (\log \left (1-\frac {x}{\sqrt {x^2-1}}\right )-\log \left (\frac {x}{\sqrt {x^2-1}}+1\right )\right )\right )\right \}\right \}\]

Maple
cpu = 0.093 (sec), leaf count = 33

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

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

Mathematica raw output

{{y[x] -> C[1]*Cosh[(n*(Log[1 - x/Sqrt[-1 + x^2]] - Log[1 + x/Sqrt[-1 + x^2]]))/
2] - I*C[2]*Sinh[(n*(Log[1 - x/Sqrt[-1 + x^2]] - Log[1 + x/Sqrt[-1 + x^2]]))/2]}
}

Maple raw input

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

Maple raw output

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