Can someone explain to me why a uniformly charged ring can produce a SHM I am doing this homework question on Mastery Physics and I do not understand why this field would make a particle have Simple Harmonic Motion behaviors. Here is the question:
Imagine a small metal ball of mass m and negative charge $−q_0$. The ball is released from rest at the point $(0,0,d)$ and constrained to move along the $z$ axis, with no damping. If $0 < d ≪a$, what will be the ball's subsequent trajectory?

 A: If the ring is negatively charged, then it will repel the ball and you won't have SHM - the ball will just fly off.
If on the other hand, the ring is positively charged then the force is always attractive and towards the center of the ring (horizontal components cancel). 
If the ball is above, then the ring pulls it down and if the ball is below then the ring pulls it up. This is acting exactly like a restoring force, so you will end up with oscillatory behavior.
To definitely be SHM you need to show that $F = -kz$ is true, so I'd start by trying to find the electric force $F$ as a function of $z$. Hyperphysics can help you out, although you may want to apply the approximation that $d << a$ to get SHM.
A: Electric field at a height $z$ on the axis of a ring carrying charge $Q$ uniformly distributed on it can be shown to be $$ {E(0,0,z)}=\frac{1}{4\pi\epsilon_0}\frac{Qz}{(a^2+z^2)^{3/2}} \hat{z}$$ if $d<<a$ the in the denominator $z$ can be neglected and force on the charge at a height $z$ will be $$F(0,0,z)=-\frac{1}{4\pi\epsilon_0}\frac{q_0Qz}{a^3}\hat{z}=-kz\hat{z}$$
Or $$m\ddot{z}+kz=0$$
Where $k=\frac{1}{4\pi\epsilon_0}\frac{q_0Q}{a^3}$ and frequency of oscillation will be $\omega=\sqrt{\frac{k}{m}}$.
