# The Hamiltonian and differentials

From Lifshitz and Landau Vol.$$1$$:

From the equation in differentials $$\mathrm{d} H=-\sum \dot{p}_{i} \mathrm{d} q_{i}+\sum \dot{q}_{i} \mathrm{d} p_{i}$$ in which the independent variables are the co-ordinates and momenta, we have the equations $$\dot{q}_{i}=\partial H / \partial p_{i}, \quad \dot{p}_{i}=-\partial H / \partial q_{i}$$

The problem is that I do not know how to work with differentials in this situation. After messing around I get that the right hand side just cancels out and $$\partial H / \partial p_{i}=0.$$ Any suggestions appreciated.

If $$H(q,p)$$ is any function at all, then its differential is
$$dH = \frac{\partial H}{\partial q} dq + \frac{\partial H}{\partial p} dp,$$
$$dH = -\dot{p}\, dq + \dot{q}\, dp,$$
$$- \dot{p} = \frac{\partial H}{\partial q} \quad \text{and} \quad \dot{q} = \frac{\partial H}{\partial p}.$$