Solution (source code)

= Solution
{c}

Take the pivot as origin, with $x$ horizontal and $y$ vertically upward. For the <simple pendulum>, put
$$
\mathbf r=\ell(\sin\theta,-\cos\theta),\qquad
\mathbf e_r=(\sin\theta,-\cos\theta),\qquad
\mathbf e_\theta=(\cos\theta,\sin\theta).
$$
The <velocity> and <acceleration> are
$$
\dot{\mathbf r}=\ell\dot\theta\mathbf e_\theta,\qquad
\ddot{\mathbf r}=\ell\ddot\theta\mathbf e_\theta-\ell\dot\theta^2\mathbf e_r.
$$
The <forces> are the <tension> $-T\mathbf e_r$ and <gravity> $(0,-mg)$. Taking the <dot product> of <Newton's second law> with $\mathbf e_\theta$ eliminates the <tension> and gives
$$
m\ell\ddot\theta=-mg\sin\theta,
\qquad\boxed{\ell\ddot\theta=-g\sin\theta.}
$$
Near the downward <stable equilibrium> $\theta=0$, the <small-angle approximation> $\sin\theta\simeq\theta$ gives $\ddot\theta=-(g/\ell)\theta$ to first order. Since $x=\ell\sin\theta\simeq\ell\theta$, its <linearization> is
$$
\boxed{\ddot x=-\frac g\ell x.}
$$
This is <simple harmonic motion> with <angular frequency> $\sqrt{g/\ell}$; the restoring sign confirms the <stable equilibrium>.