ODE
\[ -y(x) (a-x \cot (x))+x^2 y''(x)+x (2 x \cot (x)+1) y'(x)=0 \] ODE Classification
[[_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.134359 (sec), leaf count = 29
\[\left \{\left \{y(x)\to \csc (x) \left (c_1 J_{\sqrt {a}}(x)+c_2 Y_{\sqrt {a}}(x)\right )\right \}\right \}\]
Maple ✓
cpu = 0.04 (sec), leaf count = 24
\[ \left \{ y \left ( x \right ) ={\frac {1}{\sin \left ( x \right ) } \left ( {\it \_C2}\,{{\sl Y}_{\sqrt {a}}\left (x\right )}+{\it \_C1}\,{{\sl J}_{\sqrt {a}}\left (x\right )} \right ) } \right \} \] Mathematica raw input
DSolve[-((a - x*Cot[x])*y[x]) + x*(1 + 2*x*Cot[x])*y'[x] + x^2*y''[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> (BesselJ[Sqrt[a], x]*C[1] + BesselY[Sqrt[a], x]*C[2])*Csc[x]}}
Maple raw input
dsolve(x^2*diff(diff(y(x),x),x)+(1+2*x*cot(x))*x*diff(y(x),x)-(a-x*cot(x))*y(x) = 0, y(x),'implicit')
Maple raw output
y(x) = (_C2*BesselY(a^(1/2),x)+_C1*BesselJ(a^(1/2),x))/sin(x)