\[ y''(x)=y(x) \csc ^2(x) \left (-\left (-a^2 \cos ^2(x)-(3-2 a) \cos (x)+3 a-3\right )\right ) \] ✓ Mathematica : cpu = 1.91747 (sec), leaf count = 385
\[\left \{\left \{y(x)\to \frac {(2 a+1) c_2 (-2 a (\cos (x)-1)+\cos (x)-1) (-2 a \cos (x)+\cos (x)+2) \left (1-\cos ^2(x)\right )^{\frac {1}{2}-a} F_1\left (2 a;a-\frac {3}{2},a+\frac {1}{2};2 a+1;\frac {3-2 a}{-2 a \cos (x)+\cos (x)+2},\frac {2 a+1}{-2 a \cos (x)+\cos (x)+2}\right ) \exp \left (\frac {1}{2} (a-2) \log (1-\cos (x))+\frac {1}{2} a \log (\cos (x)+1)\right )}{(1-2 a)^2 a (\cos (x)+1) \left ((3-2 a)^2 \left (-F_1\left (2 a+1;a-\frac {1}{2},a+\frac {1}{2};2 a+2;\frac {3-2 a}{-2 a \cos (x)+\cos (x)+2},\frac {2 a+1}{-2 a \cos (x)+\cos (x)+2}\right )\right )+(2 a+1)^2 F_1\left (2 a+1;a-\frac {3}{2},a+\frac {3}{2};2 a+2;\frac {3-2 a}{-2 a \cos (x)+\cos (x)+2},\frac {2 a+1}{-2 a \cos (x)+\cos (x)+2}\right )-2 (2 a+1) ((2 a-1) \cos (x)-2) F_1\left (2 a;a-\frac {3}{2},a+\frac {1}{2};2 a+1;\frac {3-2 a}{-2 a \cos (x)+\cos (x)+2},\frac {2 a+1}{-2 a \cos (x)+\cos (x)+2}\right )\right )}+c_1 (-2 a \cos (x)+\cos (x)+2) \exp \left (\frac {1}{2} (a-2) \log (1-\cos (x))+\frac {1}{2} a \log (\cos (x)+1)\right )\right \}\right \}\] ✓ Maple : cpu = 0.505 (sec), leaf count = 93
\[ \left \{ y \left ( x \right ) ={1\sqrt [4]{2\,\cos \left ( x \right ) +2} \left ( {\it \_C2}\,{\mbox {$_2$F$_1$}(-a-{\frac {1}{2}},-{\frac {1}{2}}+a;\,-a+{\frac {3}{2}};\,{\frac {\cos \left ( x \right ) }{2}}+{\frac {1}{2}})} \left ( \cos \left ( x \right ) +1 \right ) ^{-{\frac {1}{4}}-{\frac {a}{2}}}\sqrt {2\,\cos \left ( x \right ) +2} \left ( -\cos \left ( x \right ) +1 \right ) ^{-{\frac {1}{4}}+{\frac {a}{2}}}+2\, \left ( -1+ \left ( -1/2+a \right ) \cos \left ( x \right ) \right ) {\it \_C1}\, \left ( \sin \left ( x \right ) \right ) ^{-1/2+a} \right ) \left ( -2\,\cos \left ( x \right ) +2 \right ) ^{-{\frac {3}{4}}}} \right \} \]