A particle $P$ of mass $m$ is attached to a light inextensible string of length $a$ fixed at $O$. It is projected horizontally from the lowest point with speed $u$. The tension there is $T$. When $OP$ makes an angle $\theta$ with the upward vertical, the tension is $S$.
(a) Show that $S=T-3mg(1+\cos\theta)$. [5]
(b) Given that $u^2=4ag$, find $\cos\theta$ when the string goes slack. [2]