4.27.14 \(y(x) \left (\text {a0}+4 \text {a1} \sin ^2(x)-\text {a2} \csc ^2(x)\right )+y''(x)+\cot (x) y'(x)=0\)

ODE
\[ y(x) \left (\text {a0}+4 \text {a1} \sin ^2(x)-\text {a2} \csc ^2(x)\right )+y''(x)+\cot (x) y'(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 1.74622 (sec), leaf count = 0 , could not solve

DSolve[(a0 - a2*Csc[x]^2 + 4*a1*Sin[x]^2)*y[x] + Cot[x]*Derivative[1][y][x] + Derivative[2][y][x] == 0, y[x], x]

Maple
cpu = 0.395 (sec), leaf count = 67

\[ \left \{ y \left ( x \right ) ={\it \_C1}\, \left ( \sin \left ( x \right ) \right ) ^{\sqrt {{\it a2}}}{\it HeunC} \left ( 0,\sqrt {{\it a2}},-{\frac {1}{2}},-{\it a1},{\frac {{\it a2}}{4}}+{\frac {1}{4}}-{\frac {{\it a0}}{4}}, \left ( \sin \left ( x \right ) \right ) ^{2} \right ) +{\it \_C2}\, \left ( \sin \left ( x \right ) \right ) ^{-\sqrt {{\it a2}}}{\it HeunC} \left ( 0,-\sqrt {{\it a2}},-{\frac {1}{2}},-{\it a1},{\frac {{\it a2}}{4}}+{\frac {1}{4}}-{\frac {{\it a0}}{4}}, \left ( \sin \left ( x \right ) \right ) ^{2} \right ) \right \} \] Mathematica raw input

DSolve[(a0 - a2*Csc[x]^2 + 4*a1*Sin[x]^2)*y[x] + Cot[x]*y'[x] + y''[x] == 0,y[x],x]

Mathematica raw output

DSolve[(a0 - a2*Csc[x]^2 + 4*a1*Sin[x]^2)*y[x] + Cot[x]*Derivative[1][y][x] + De
rivative[2][y][x] == 0, y[x], x]

Maple raw input

dsolve(diff(diff(y(x),x),x)+cot(x)*diff(y(x),x)+(a0+4*a1*sin(x)^2-a2*csc(x)^2)*y(x) = 0, y(x),'implicit')

Maple raw output

y(x) = _C1*sin(x)^(a2^(1/2))*HeunC(0,a2^(1/2),-1/2,-a1,1/4*a2+1/4-1/4*a0,sin(x)^
2)+_C2*sin(x)^(-a2^(1/2))*HeunC(0,-a2^(1/2),-1/2,-a1,1/4*a2+1/4-1/4*a0,sin(x)^2)