Matrix representation of the derivative of a smooth function 
Let $V:\mathbb R^n\to\mathbb R$ be a smooth function and define the Hamiltonian function $H:\mathbb R^n\times\mathbb R^n\to\mathbb R$ (kinetic plus potential energy) by $$H(x,y):=\frac 12|y|^2+V(x).$$
Prove that $c$ is a regular value of $H$ if and only if it is a regular value of $V$.

Look at the definition of regular values:

Definition Let $U\subset \mathbb R^k$ be an open set and $f:U\to \mathbb R^l$ be a smooth function. An element $c\in \mathbb R^l$ is called a regular value of $f$ if, for all $p\in U$, we have
$f(p)=c\implies df(p):\mathbb R^k\to\mathbb R^l$ is surjective.

In the definition, $f$ is a smooth function with the domain being a subset of $\mathbb R^k$. In our "Hamiltonian function" problem, the domain of the Hamilitonian function is  $\mathbb R^n\times \mathbb R^n$. There its derivative $dH$ is a function with the same domain and codomain. But what kind of matrix are we going to use to represent $dH$? Without this being answered, I can not solve the problem.
 A: For simplicity consider the case n=1. $H(x,y)=y^2/2+V(x)$, $dH=ydy+V_xdx$ is a linear map in the tangent space whose matrix representation is the gradient:
$$\operatorname{grad}(H): (u,v)\mapsto V_xu+yv=\begin{bmatrix}V_x & y\end{bmatrix} \begin{bmatrix}u \\ v\end{bmatrix}$$
For general n $$dH=\sum_{i=1}^ny^idy^i+\frac{\partial{V}}{\partial x^i}dx^i$$ whose matrix representation is $$\begin{bmatrix}\frac{\partial{V}}{\partial x^1} & \frac{\partial{V}}{\partial x^2} &\cdots \frac{\partial{V}}{\partial x^n} & y^1 &\cdots y^n\end{bmatrix}
$$
A: First note $$dH(p,q)(x,y) = q\cdot y + dV(p)(x)$$ for all $(p,q), (x,y) \in \Bbb R^n \times \Bbb R^n$. Suppose $c$ is a regular value of $H$. Let $p \in \Bbb R^n$ such that $V(p) = c$. Then $H(p,0) = c$. Since $dH(p,0)$ is surjective, given $r \in \Bbb R$, there exists $(x,y)\in \Bbb R^n \times \Bbb R^n$ such that $dH(p,0)(x,y) = r$, i.e., $dV(p)(x) = r$. Thus, $dV(p)$ is surjective. Since $p$ is an arbitrary point of $V^{-1}(c)$, $c$ is a regular value of $V$. Now try to prove the converse.
