A particle $P$ of mass $m$ is attached to a light inextensible string of length $a$ fixed at $O$. It is held at $A$, where $OA$ makes an angle $\alpha$ with the downward vertical and $\cos\alpha=\tfrac45$. It is projected perpendicular to $OA$ upwards with speed $\sqrt{3ag}$. The string becomes slack at $B$, where $OB$ makes an angle $\theta$ with the upward vertical. Find $\cos\theta$. [4]