# Deriving Hamilton's equation of motion

I am trying to derive Hamilton's equations of motion without using Lagrange's method but am left with an additional factor of $1/2$. Where am I going wrong? Please note this in not a homework excercise, so full answers are appreciated.

My derivation is as follows:

## Derivation

For an Hamiltonian $H$, given by

$$H(q,p) = T(q,p) + U(q),$$

where $T$ and $U$ are the total kinetic energy and total potential energy of the system, respectively; $q$ is a generalised position and; $p$ is a generalised momentum. Using this notation, Hamilton's equations of motion are

\begin{align} \dot{q} &= \frac{\partial{H}}{\partial{p}},\\ \dot{p} &= -\frac{\partial{H}}{\partial{q}}. \end{align}

We know that

\begin{equation*} T = \frac{1}{2} m v^2 \end{equation*}

recalling that $p = mv$

$$T = \frac{p v}{2},$$

and given that

$$v = {\mathrm{d}{q}\over\mathrm{d}{t}} \equiv \dot{q},$$

we find that

$$T = \frac{p \dot{q}}{2}.$$

Now,

\begin{equation*} U = - W = - F q, \end{equation*}

where $W$ is the work done. Given that

$$F = {\mathrm{d}{p}\over\mathrm{d}{t}} \equiv \dot{p},$$

we find that

$$U = -\dot{p} q.$$

This, our Hamiltonian is

$$H(q,p) = {p\dot{q}\over 2} - q\dot{p}$$

which has an infinitesimal change

$$\mathrm{d}{H} = {\dot{q}\over 2}\,\mathrm{d}{p} - \dot{p}\,\mathrm{d}{q},$$

In the following steps we divide through by the elements of $\mathrm{d}{q}$ and $\mathrm{d}{p}$, keeping in mind that the two are linearly independent and therefore do not depend on one-another:

\begin{align} {\partial{H}\over\partial{p}} &= {\dot{q}\over 2}\,\underbrace{{\mathrm{d}{p}\over\mathrm{d}{p}}}_{=1} - \dot{p}\,\underbrace{{\mathrm{d}{q}\over\mathrm{d}{p}}}_{=0},\\ {\partial{H}\over\partial{p}} &= {\dot{q}\over 2}.\ \ \ \ \ (*) \end{align}

$${\partial{H}\over\partial{q}} = {\dot{q}\over 2}\,\underbrace{{\mathrm{d}{p}\over\mathrm{d}{q}}}_{=0} - \dot{p}\,\underbrace{{\mathrm{d}{q}\over\mathrm{d}{q}}}_{=1},$$

$${\partial{H}\over\partial{q}} = - \dot{p}.$$

Clearly equation (*) is not the correct equation of motion for Hamiltonian mechanics. Where did I go wrong?

• You need to eliminate all references to $\dot q$ before taking derivatives. Sep 6, 2016 at 21:21

For an Hamiltonian $H$, given by
$$H(q,p) = T(q,p) + U(q),$$ the Hamilton eqs. are
while that the kinetic term written with the momenta $p$ is given by $$T=\frac{1}{2}m\dot{q}^2=\frac{p^2}{2m}$$ Recall $p=m\dot{q}$. Then you get that $\frac{\partial{T}}{\partial{p}}=p/m$ and Hamilton equations became \begin{align} \dot{q} &= \frac{p}{m},\\ \dot{p} &= -\frac{\partial{H}}{\partial{q}}=-\frac{\partial{U}}{\partial{q}}. \end{align}
As for your difficulty, take the kinetic energy term to be $$K = \dfrac{p^2}{2m}$$ and you will get the correct answer.
However there are a few more issues with your derivation like you wrote $$F= p/t$$ etc. Please resolve them.