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
\begin{equation} H(q,p) = T(q,p) + U(q), \end{equation}
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 $
\begin{equation} T = \frac{p v}{2}, \end{equation}
and given that
\begin{equation} v = {\mathrm{d}{q}\over\mathrm{d}{t}} \equiv \dot{q}, \end{equation}
we find that
\begin{equation} T = \frac{p \dot{q}}{2}. \end{equation}
Now,
\begin{equation*} U = - W = - F q, \end{equation*}
where $ W $ is the work done. Given that
\begin{equation} F = {\mathrm{d}{p}\over\mathrm{d}{t}} \equiv \dot{p}, \end{equation}
we find that
\begin{equation} U = -\dot{p} q. \end{equation}
This, our Hamiltonian is
\begin{equation} H(q,p) = {p\dot{q}\over 2} - q\dot{p} \end{equation}
which has an infinitesimal change
\begin{equation} \mathrm{d}{H} = {\dot{q}\over 2}\,\mathrm{d}{p} - \dot{p}\,\mathrm{d}{q}, \end{equation}
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}
\begin{equation} {\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}, \end{equation}
\begin{equation} {\partial{H}\over\partial{q}} = - \dot{p}. \end{equation}
Clearly equation (*) is not the correct equation of motion for Hamiltonian mechanics. Where did I go wrong?