In this case, we have one degree of freedom, so $i = 1$.
Conjugate momentum: $$p = \frac{\partial L}{\partial \dot{q}} = m\dot{q}$$
Therefore, the Hamiltonian is: $$H = p\dot{q} - L = \frac{m}{2}(\dot{q}^{2} \sin^{2} \omega t + qqe \sin 2\omega t +
Show more…