# Hamiltons Equations of Motion

### From bio-physics-wiki

For an arbitrary function $F(q,p)$ the change of this function $\delta F$ is given by the partial derivative with respect to the independent variables times the change in that variable. \begin{align} \delta F(q,p)= \frac{\partial F}{\partial q} \delta q + \frac{\partial F}{\partial p} \delta p \tag{1} \end{align} A small change in the Hamiltonian is given by \begin{align} \delta H&= \sum_i \dot{q}_i \, \delta p_i + p_i \, \delta\dot{q}_i -\underbrace{\frac{\partial L}{\partial \dot{q}_i}}_{p_i}\delta\dot{q}_i - \underbrace{\frac{\partial L}{\partial q_i}}_{\dot{p}_i} \delta q_i \\ \delta H&= \sum_i \dot{q}_i \, \delta p_i - \dot{p}_i \, \delta q_i \end{align}

The change of the Hamiltonian is now in the form of equation (1) and we can directly read off the partial derivatives, which we call **Hamiltons Equations (of Motion)**
\begin{align}
\frac{\partial H}{\partial p_i}=\dot{q}_i
\end{align}
\begin{align}
-\frac{\partial H}{\partial q_i}=\dot{p}_i
\end{align}