Solution (source code)

= Solution

The equilibria are $\theta=0,\pi$ modulo $2\pi$ unless $a=g$, when every angle is an equilibrium. Linearisation shows $	heta=0$ stable for $a<g$ and $\theta=\pi$ stable for $a>g$; the other is unstable.