# What is wrong with my argument to derive the Hamiltonian in relativity?

In General Relativity (and special too) the Lagrangian for a particle of mass $m$ in the absence of forces other than gravity is

$$L=m\sqrt{g_{\mu\nu}U^\mu U^\nu}$$

where $U^\mu$ is the four-velocity. In that case we can derive the momentum $p_\mu$ by

$$p_\mu=\dfrac{\partial L}{\partial U^\mu}=\dfrac{\partial}{\partial U^\mu}m\sqrt{g_{\alpha\beta}U^\alpha U^\beta}$$

$$p_\mu=\dfrac{mg_{\alpha\beta}}{2\sqrt{g_{\alpha\beta}U^\alpha U^\beta}}\left(\delta^\alpha_\mu U^\beta+\delta^\beta_\mu U^\alpha\right)=\dfrac{mg_{\mu \alpha}U^\alpha}{\sqrt{g_{\alpha\beta} U^\alpha U^\beta}}$$

If we parametrize the worldline by proper time $\tau$ then $L(\gamma(\tau),\gamma'(\tau))=m$ and we get of the square root on the denominator which is just $1$. Then

$$p_\mu= m g_{\mu\alpha}U^\alpha,$$

and these are the components of a covector. This directly leads to the momentum four-vector

$$p^\mu= m U^\mu.$$

Everything works here. Now I want to compute the energy. Well the Hamiltonian as always should be

$$H=p_\mu U^\mu-m\sqrt{g_{\mu\nu}U^\mu U^\nu}=m g_{\mu\nu}U^\mu U^\nu-m\sqrt{g_{\mu \nu}U^\mu U^\nu}.$$

But if things are parametrized by propertime, when we compute $H$ on the path, that is $H(\gamma(\tau),\gamma'(\tau))$ we get zero!

What I expected was to get $H = p^0$.

What am I doing wrong here? Why am I getting zero?

• Maybe I'm thick but how can you hope to get only one component of a 4-vector when all your manipulations involve quantities with all indices contracted? On the left of your final equation you have $H$ as a scalar, and this follows from manipulating scalars all along, but two lines later where you claim $H$ ought to be the component of a 4-vector, so one of the definitions must be wrong. Mar 15, 2017 at 2:28
• Point taken, I can't find out $H = p^0$ since $H$ will transform as a scalar and $p^0$ as a component of a four-vector. That is reasonable. However, I'm doing all this to justify that the $0$-th component of $4$-momentum is energy. So I believe I could get this by computing the Hamiltonian, which ought to be the energy. In that sense, in relativity $H$ is not the energy or $p^0$ is not always the energy? What am I missing here?
– Gold
Mar 15, 2017 at 2:33
• The $H$ you compute as a scalar cannot be the energy since the energy is one component of the momentum 4-vector. Mar 15, 2017 at 2:39
• Possible duplicate of Why is the Hamiltonian zero in relativity? Mar 15, 2017 at 9:08

1. The problem is that the Legendre transformation from 4-velocity to 4-momentum is singular: The 4 components of the 4-momentum $p_{\mu}$ are constrained to live on the mass-shell $$p_{\mu}g^{\mu\nu}p_{\nu}~=~\pm m^2. \tag{A}$$ Here the $\pm$ refers to the choice of Minkowski sign convention $(\pm,\mp,\mp,\mp)$. Therefore it is a constrained system. The 4-momentum has only 3 independent components.