Rigid Body

When the center-of-mass of the small cylinder deviates by $\theta$ from the vertical position, it rotates by $\varphi=R\theta/a-\theta=(R-a)\theta/a$ around its center of mass. The energy is therefore given as follows
$E=\frac{m}{2}(R-a)^2\dot{\theta}^2 + \frac{I}{2} \frac{(R-a)^2\dot{\theta}^2}{a^2} + mg(R-a)(1-\cos\theta)$
Complete the solution.