(N/A) Consider a ring of radius $R=a$ having charge $Q$ distributed uniformly. Let a point $P$ be at a distance $z$ on its axis. The distance of $P$ from any charge element $dq$ on the ring is $r = \sqrt{z^2 + a^2}$.
The electric potential $V$ at point $P$ is given by:
$V = \int \frac{k dq}{r} = \frac{k}{\sqrt{z^2 + a^2}} \int dq = \frac{kQ}{\sqrt{z^2 + a^2}}$
The potential energy $U$ of a charge $-q$ placed at point $P$ is:
$U = (-q)V = -\frac{kQq}{\sqrt{z^2 + a^2}}$
Let $S = \frac{kQq}{a}$. Then $U = -\frac{S}{\sqrt{1 + (z/a)^2}}$.
At $z=0$,$U = -S$ (minimum potential energy). As $|z|$ increases,$U$ increases towards $0$. The graph of $U$ vs $z$ is a potential well with a minimum at $z=0$. If $-q$ is displaced slightly from the centre,it experiences a restoring force towards the centre,leading to simple harmonic motion $(SHM)$ for small displacements.