A wire lying in the vertical plane ins bent in the shape of a cardioid given by the equation $\displaystyle r=a(1+cos\theta)$ where a>0, and where $\displaystyle \theta $ is the angle between the downward vertical and the radius vector. A small ring of mass m slides along the wire, and is attached to the origin by an elastic string of natural length a and modulus 2kmg, where k is a positive constant. The ring is released from rest when the string is horizontal, that is, when $\displaystyle \theta = \frac{\pi}{2}$.
a) Write down the total energy of the system
b) Show that $\displaystyle \theta = 0$ is an equilibrium position and determine its stability.
c) Show that when k=2, there exists another equilibrium position, which is stable. Find its period.

At the moment, I am still stuck on a). I have written down the conservation of energy equation, that is :
$\displaystyle \frac{1}{2}m {\dot{r}}^2 + \int F(r)dr = constant $ but cannot think of what to make F(r). I have also looked at b) and have the same problem. Any help?