[proofplan]
We compute the Hamiltonian vector field in a canonical coordinate chart by expanding it in the coordinate frame. The defining identity $\omega(X_H,Y)=dH(Y)$ is evaluated on an arbitrary vector field $Y$, so the independent coefficients of the components of $Y$ determine the components of $X_H$. Once those components are identified, the coordinate form of an integral curve gives Hamilton's equations directly.
[/proofplan]
[step:Expand the Hamiltonian vector field and a test vector field in the coordinate frame]
Let $V \subset T^*Q$ denote the coordinate neighbourhood on which the canonical coordinates $(q_1,\dots,q_n,p_1,\dots,p_n)$ are defined. On $V$, write the restriction of the Hamiltonian vector field as
\begin{align*}
X_H|_V = \sum_{i=1}^n a_i \frac{\partial}{\partial q_i} + \sum_{i=1}^n b_i \frac{\partial}{\partial p_i},
\end{align*}
where each coefficient is a smooth function $a_i: V \to \mathbb{R}$ or $b_i: V \to \mathbb{R}$.
Let $Y \in \mathfrak{X}(V)$ be an arbitrary smooth vector field. Write
\begin{align*}
Y = \sum_{i=1}^n c_i \frac{\partial}{\partial q_i} + \sum_{i=1}^n d_i \frac{\partial}{\partial p_i},
\end{align*}
where each coefficient is a smooth function $c_i: V \to \mathbb{R}$ or $d_i: V \to \mathbb{R}$.
[/step]
[step:Evaluate the canonical symplectic form on the two expanded vector fields]
Since
\begin{align*}
\omega = \sum_{i=1}^n dq_i \wedge dp_i,
\end{align*}
the definition of the wedge product gives, for each $i \in \{1,\dots,n\}$,
\begin{align*}
(dq_i \wedge dp_i)(X_H,Y) = dq_i(X_H)dp_i(Y) - dq_i(Y)dp_i(X_H).
\end{align*}
By the coordinate expansions, $dq_i(X_H)=a_i$, $dp_i(X_H)=b_i$, $dq_i(Y)=c_i$, and $dp_i(Y)=d_i$. Therefore
\begin{align*}
\omega(X_H,Y) = \sum_{i=1}^n (a_i d_i - b_i c_i).
\end{align*}
[guided]
The purpose of introducing the arbitrary vector field $Y$ is that the defining equation for $X_H$ must hold against every possible tangent direction. In the chosen canonical coordinates, the coordinate one-forms $dq_i$ and $dp_i$ extract the corresponding coordinate components of a vector field. Thus the expansion
\begin{align*}
X_H|_V = \sum_{i=1}^n a_i \frac{\partial}{\partial q_i} + \sum_{i=1}^n b_i \frac{\partial}{\partial p_i}
\end{align*}
means exactly that $dq_i(X_H)=a_i$ and $dp_i(X_H)=b_i$.
Similarly, for the arbitrary vector field
\begin{align*}
Y = \sum_{i=1}^n c_i \frac{\partial}{\partial q_i} + \sum_{i=1}^n d_i \frac{\partial}{\partial p_i},
\end{align*}
we have $dq_i(Y)=c_i$ and $dp_i(Y)=d_i$. The canonical symplectic form is
\begin{align*}
\omega = \sum_{i=1}^n dq_i \wedge dp_i.
\end{align*}
For one summand, the wedge product evaluates by the alternating rule
\begin{align*}
(dq_i \wedge dp_i)(X_H,Y) = dq_i(X_H)dp_i(Y) - dq_i(Y)dp_i(X_H).
\end{align*}
Substituting the coordinate components gives
\begin{align*}
(dq_i \wedge dp_i)(X_H,Y) = a_i d_i - c_i b_i.
\end{align*}
Summing over all $i$ yields
\begin{align*}
\omega(X_H,Y) = \sum_{i=1}^n (a_i d_i - b_i c_i).
\end{align*}
This calculation is where the sign in the second Hamilton equation enters: the term involving $b_i$ appears with a minus sign because $dq_i \wedge dp_i$ is alternating.
[/guided]
[/step]
[step:Evaluate the differential of the Hamiltonian on the test vector field]
The differential $dH$ has the coordinate expression
\begin{align*}
dH = \sum_{i=1}^n \frac{\partial H}{\partial q_i} dq_i + \sum_{i=1}^n \frac{\partial H}{\partial p_i} dp_i.
\end{align*}
Evaluating on $Y$ gives
\begin{align*}
dH(Y) = \sum_{i=1}^n \frac{\partial H}{\partial q_i} c_i + \sum_{i=1}^n \frac{\partial H}{\partial p_i} d_i.
\end{align*}
[/step]
[step:Compare the independent coordinate coefficients]
The defining identity for the Hamiltonian vector field gives
\begin{align*}
\sum_{i=1}^n (a_i d_i - b_i c_i) = \sum_{i=1}^n \frac{\partial H}{\partial q_i} c_i + \sum_{i=1}^n \frac{\partial H}{\partial p_i} d_i
\end{align*}
for every smooth choice of coefficient functions $c_i: V \to \mathbb{R}$ and $d_i: V \to \mathbb{R}$. Comparing the coefficients of the independent functions $d_i$ and $c_i$ gives
\begin{align*}
a_i = \frac{\partial H}{\partial p_i}
\end{align*}
and
\begin{align*}
-b_i = \frac{\partial H}{\partial q_i}.
\end{align*}
Hence, for every $i \in \{1,\dots,n\}$,
\begin{align*}
b_i = -\frac{\partial H}{\partial q_i}.
\end{align*}
Therefore, on $V$,
\begin{align*}
X_H = \sum_{i=1}^n \frac{\partial H}{\partial p_i} \frac{\partial}{\partial q_i} - \sum_{i=1}^n \frac{\partial H}{\partial q_i} \frac{\partial}{\partial p_i}.
\end{align*}
[/step]
[step:Read off the coordinate equations for integral curves]
Let $\gamma: I \to V$ be an integral curve of $X_H$, and write
\begin{align*}
\gamma(t) = (q_1(t),\dots,q_n(t),p_1(t),\dots,p_n(t)).
\end{align*}
By definition of integral curve,
\begin{align*}
\dot{\gamma}(t) = X_H(\gamma(t))
\end{align*}
for every $t \in I$. In the coordinate frame, the left-hand side is
\begin{align*}
\dot{\gamma}(t) = \sum_{i=1}^n \dot q_i(t) \frac{\partial}{\partial q_i}\bigg|_{\gamma(t)} + \sum_{i=1}^n \dot p_i(t) \frac{\partial}{\partial p_i}\bigg|_{\gamma(t)}.
\end{align*}
Using the coordinate formula for $X_H$, the right-hand side is
\begin{align*}
X_H(\gamma(t)) = \sum_{i=1}^n \frac{\partial H}{\partial p_i}(\gamma(t)) \frac{\partial}{\partial q_i}\bigg|_{\gamma(t)} - \sum_{i=1}^n \frac{\partial H}{\partial q_i}(\gamma(t)) \frac{\partial}{\partial p_i}\bigg|_{\gamma(t)}.
\end{align*}
Since the coordinate vector fields form a basis of $T_{\gamma(t)}(T^*Q)$, equality of these tangent vectors gives, for every $i \in \{1,\dots,n\}$,
\begin{align*}
\dot q_i(t) = \frac{\partial H}{\partial p_i}(\gamma(t)).
\end{align*}
and
\begin{align*}
\dot p_i(t) = -\frac{\partial H}{\partial q_i}(\gamma(t)).
\end{align*}
These are [Hamilton's equations in canonical coordinates](/theorems/6833).
[/step]