A curve $C$ has equation $\cos y=x$, for $-\pi<x<\pi$.
(i) Use implicit differentiation to show that $$
\frac{\mathrm d^2y}{\mathrm dx^2}
=-\cot y\left(\frac{\mathrm dy}{\mathrm dx}\right)^2.
$$ [4]
(ii) Hence find the exact value of $\dfrac{\mathrm d^2y}{\mathrm dx^2}$ at the point $\left(\frac12,\frac\pi3\right)$ on $C$. [2]