\[ \sin ^2(x) y''(x)-y(x) \left (a^2 \cos ^2(x)+\frac {b^2}{(2 a-3)^2}+3 a+b \cos (x)+2\right )=0 \] ✓ Mathematica : cpu = 6.54202 (sec), leaf count = 1362
\[\left \{\left \{y(x)\to \frac {(-1)^{-\frac {(2 a+3)^2}{(3-2 a)^2}} 2^{-\frac {\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}}{2 (3-2 a)^2}} (1-\cos (x))^{\frac {-4 a^2-9}{(3-2 a)^2}} (\cos (x)-1)^{-\frac {-8 a^2+24 a+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}-18}{4 (3-2 a)^2}} (\cos (x)+1)^{\frac {1}{4} \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+2\right )} \left ((-1)^{\frac {(2 a+3)^2}{(3-2 a)^2}} 2^{\frac {\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}}{2 (3-2 a)^2}} c_1 \, _2F_1\left (\frac {16 a^3+4 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}-10\right ) a^2-12 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}-1\right ) a+9 \sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}-\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}+18}{4 (3-2 a)^2},-\frac {16 a^3-4 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+14\right ) a^2+12 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+5\right ) a-9 \sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}-18}{4 (3-2 a)^2};-\frac {-8 a^2+24 a+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}-18}{2 (3-2 a)^2};\sin ^2\left (\frac {x}{2}\right )\right ) (1-\cos (x))^{\frac {4 a^2+9}{(3-2 a)^2}}+i^{\frac {24 a+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}}{(3-2 a)^2}} c_2 \left ((-1)^{\frac {12 a}{(3-2 a)^2}} \cos (x)+(-1)^{\frac {4 a^2+9}{(3-2 a)^2}}\right ) \, _2F_1\left (\frac {16 a^3+4 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}-10\right ) a^2-12 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}-1\right ) a+9 \sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}+18}{4 (3-2 a)^2},\frac {-16 a^3+4 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+14\right ) a^2-12 \left (\sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+5\right ) a+9 \sqrt {\frac {16 a^4-8 (2 b+9) a^2+48 b a+(9-2 b)^2}{(3-2 a)^2}}+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}+18}{4 (3-2 a)^2};\frac {8 a^2-24 a+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}+18}{2 (3-2 a)^2};\sin ^2\left (\frac {x}{2}\right )\right ) (1-\cos (x))^{\frac {24 a+\sqrt {(3-2 a)^2 \left (16 a^4+8 (2 b-9) a^2-48 b a+(2 b+9)^2\right )}}{2 (3-2 a)^2}}\right )}{\sqrt [4]{-\sin ^2(x)}}\right \}\right \}\]
✓ Maple : cpu = 0.817 (sec), leaf count = 549
\[ \left \{ y \left ( x \right ) ={1 \left ( {\frac {\cos \left ( x \right ) }{2}}-{\frac {1}{2}} \right ) ^{{\frac {1}{8\,a-12} \left ( 4\,a-6+\sqrt {4\,{b}^{2}+16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81} \right ) }} \left ( {\mbox {$_2$F$_1$}({\frac {1}{8\,a-12} \left ( 8\,{a}^{2}-\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+\sqrt {4\,{b}^{2}+16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}-8\,a-6 \right ) },{\frac {1}{8\,a-12} \left ( -8\,{a}^{2}-\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+\sqrt {4\,{b}^{2}+16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+16\,a-6 \right ) };\,{\frac {1}{4\,a-6} \left ( 4\,a-6-\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81} \right ) };\,{\frac {\cos \left ( x \right ) }{2}}+{\frac {1}{2}})} \left ( 2\,\cos \left ( x \right ) +2 \right ) ^{{\frac {1}{8\,a-12} \left ( 4\,a-6-\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81} \right ) }}{\it \_C1}+{\mbox {$_2$F$_1$}({\frac {1}{8\,a-12} \left ( 8\,{a}^{2}+\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+\sqrt {4\,{b}^{2}+16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}-8\,a-6 \right ) },{\frac {1}{8\,a-12} \left ( -8\,{a}^{2}+\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+\sqrt {4\,{b}^{2}+16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81}+16\,a-6 \right ) };\,{\frac {1}{4\,a-6} \left ( 4\,a-6+\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81} \right ) };\,{\frac {\cos \left ( x \right ) }{2}}+{\frac {1}{2}})} \left ( 2\,\cos \left ( x \right ) +2 \right ) ^{{\frac {1}{8\,a-12} \left ( 4\,a-6+\sqrt {4\,{b}^{2}-16\, \left ( a-3/2 \right ) ^{2}b+16\,{a}^{4}-72\,{a}^{2}+81} \right ) }}{\it \_C2} \right ) {\frac {1}{\sqrt {\sin \left ( x \right ) }}}} \right \} \]