I have this problem:
Obtain Hamilton's equations of motion for a plane pendulum of length $l$ with mass point $m$ whose radius of suspension rotates uniformally on the circumference of a vertical circle of radius $a$.
This is my position vector: \begin{equation} \vec{r} = (a\cos{(\omega_0 t)} + l\sin{\theta})\hat{\imath} + (a\sin{(\omega_0 t)}-l\cos{\theta})\hat{k} \end{equation} (The angle that describes the movement of the suspension point on the circle is $\omega_0 t$ for being uniform)
From this, using the definition of potential and kinetic energy, the lagrangian is: \begin{equation} L = \frac{m}{2}(a^2\omega_0^2 + 2la\omega_0\dot{\theta}(\sin{(\theta - \omega_0 t)}) + l^2\dot{\theta}^2) - mg(a\sin{(\omega_0 t)}-l\cos{\theta}) \end{equation}
Now, i tried to make my hamiltonian with the definition
\begin{equation}
H = p_i\dot{q_i} - L
\end{equation}
But... for the problem, i think that this form is useless for the Hamilton equations. Then it occurred to me to use
\begin{equation}
H = T + U = \frac{m}{2}l^2\dot{\theta}^2 + mg(a\sin{(\omega_0 t)}-l\cos{\theta})
\end{equation}
However, I'm not sure if I can use it because, according to me, the position vector explicitly depends on time.