I am asked to write a detailed Hamiltonian function for a particle moving in a central potential using spherical coordinates. It feels like i got it right, but I'm not sure if it's "detailed" enough. Can someone please check it? My progress:
Lagrangian: $$L = T - V = \frac m {2}(\dot{r^2} + r^2 \dot{\theta^2} + r sin^2(\theta) \dot\phi^2) - V(r)$$ Generalised impulses: $$p_r = m \dot{r}$$ $$p_\theta = m r^2 \dot{\theta}$$ $$p_\phi = m r^2 sin^2(\theta) \dot{\phi}$$ And the Hamiltonian is: $$H = \frac 1 {2m}(p_r^2 + \frac {p_\theta^2} {r^2}+ \frac {p_\phi^2} {sin^2(\theta) r^2})+V(r)$$
The main concern is the potential, since it's central it only depends on r and since it's not given, I assume it's just V(r), is it correct?