The question is the very last sentence at the end of this post. In this post, I'll first show that the Hamiltonian is conserved since it does not have explicit dependence on time and then show that the Hamiltonian is not conserved since when directly calculate, the derivative is found not to vanish. A bead is threaded on a friction-less vertical wire loop of radius $R$. The loop is spinning w.r.t. a fixed axis shown in the figure at a constant angular speed $\omega$. The Lagrangian is given by
$$L=\frac{1}{2}\dot\theta^2R^2+\frac{1}{2}R^2\sin^2\theta\omega^2+gR(\cos\theta-1)$$, where $\theta$ is defined in the figure(the arrow near the character $\theta$ indicates the direction in which it increases).
The equation of motion:
$$\ddot\theta=\sin\theta\cos\theta\omega^2-\frac gR\sin\theta$$
Since the Hamiltonian is given by $H=\frac{1}{2}\dot\theta^2R^2+\frac{1}{2}R^2\sin^2\theta\omega^2-gR(\cos\theta-1)$, we see that there is no explicit dependence on time; therefore we expect that the Hamiltonian is conserved. However, when we directly compute the total derivative of the Hamiltonian, we can see that the derivative is not zero:$$\dot H=\dot \theta(\ddot \theta R^2+R^2\sin\theta\cos\theta{\omega}^2+gR\sin\theta)=2\dot\theta R^2\sin\theta\cos\theta{\omega}^2$$,$$\dot H=\dot \theta(\ddot \theta R^2+R^2\sin\theta\cos\theta{\omega}^2+gR\sin\theta)=2\dot\theta R^2\sin\theta\cos\theta{\omega}^2,$$ where we make use of the e.o.m. and substitute $\ddot\theta R^2$ for the corresponding terms.
Concern:Something is clearly missing here. I hope that some other people can help point out some mistake that I've made in the above reasoning.