\[ a^2 y(x)-\cot (a x)+y''(x)=0 \] ✓ Mathematica : cpu = 0.0448451 (sec), leaf count = 46
\[\left \{\left \{y(x)\to \frac {\sin (a x) \left (a^2 c_2+\log \left (\sin \left (\frac {a x}{2}\right )\right )-\log \left (\cos \left (\frac {a x}{2}\right )\right )\right )}{a^2}+c_1 \cos (a x)\right \}\right \}\]
✓ Maple : cpu = 0.133 (sec), leaf count = 41
\[ \left \{ y \left ( x \right ) =\sin \left ( ax \right ) {\it \_C2}+\cos \left ( ax \right ) {\it \_C1}+{\frac {\sin \left ( ax \right ) }{{a}^{2}}\ln \left ( {\frac {1-\cos \left ( ax \right ) }{\sin \left ( ax \right ) }} \right ) } \right \} \]