Proof of Hamilton's equation from integral invariant This is from pages 273 - 274 0f Whittaker's book of analytical dynamics. Its in the public domain.
Let $q_1,q_2,\ldots,q_N$ be functions of time. And let $p_1,p_2,\ldots,p_N$ also be functions of time. And they are determined by the following differential equation:
$$\eqalign{
\dot{q_k} &= Q_k \cr
\dot{p_k} &= P_k
}$$
Where the $Q's$ and $P's$ are functions on the $q's$ and $p's$ but not on time. And suppose they satisfy the following:
$$\eqalign{
\frac{\partial Q_i}{\partial q_k} &= -\frac{\partial P_k}{\partial p_i} \cr
\frac{\partial P_i}{\partial q_k} &= \frac{\partial P_k}{\partial q_i} \cr
\frac{\partial Q_i}{\partial p_k} &= \frac{\partial Q_k}{\partial p_i}
}$$
Then Whittaker claims that this implies the existance of a function $H$ for which $Q_k = \partial H /\partial p_k$ and $P_k=-\partial H/\partial q_k$. He states this without proof, but I don't see it as obvious. Can you explain?
For more context, Whittaker is trying to prove Hamilton's equation from Poincare's integral invariant.
 A: You want to get a Hamiltonian system 
\begin{alignat}{2}
\dot q_k &=Q_k&&=\frac{∂H}{∂p_k}\\
\dot p_k &=P_k&&=-\frac{∂H}{∂q_k}
\end{alignat}
The Weierstraß theorem tells us that such a function $H$ defined by its partial derivatives exists if the problem is considered on a simply connected domain and those partial derivative functions are continuously differentiable and satisfy the relations necessary for the Schwarz theorem, i.e., the second derivatives of $H$ should not depend on the derivatives order. Thus one needs to consider all pairs $(q_j,q_k)$, $(q_j,p_k)$ and $(p_j,p_k)$ to cover all mixed derivatives.
\begin{align}
\frac{∂^2H}{∂q_j∂q_k}&:& -\frac{∂P_j}{∂q_k}&=-\frac{∂P_k}{∂q_j}  \\ \\
\frac{∂^2H}{∂q_j∂p_k}&:& -\frac{∂P_j}{∂p_k}&= \frac{∂Q_k}{∂q_j}  \\ \\
\frac{∂^2H}{∂p_j∂p_k}&:&  \frac{∂Q_j}{∂p_k}&= \frac{∂Q_k}{∂q_j}  \\ \\
\end{align}
Since these are all of the possible combinations of the variables, if these conditions are all satified the curve integrals 
$$
\int_\gamma\sum_k Q_k\,dp_k-\sum_kP_k\,dq_k
$$
are path independent and depend only on the end-points of $\gamma$ and thus one can define
$$
H(q,p)=\int_{(q_0,p_0)}^{(q,p)}\sum_k Q_k\,dp_k-\sum_kP_k\,dq_k
$$
