Let $S(x, y; \alpha)$ be a complete integral of the Hamilton–Jacobi equation $S_x + H(x, y, \nabla_y S) = 0$, with $\alpha \in \mathbb{R}^n$ and $\det(\partial^2 S / \partial y \,\partial \alpha) \ne 0$. Fix constants $\beta = (\beta_1, \dots, \beta_n) \in \mathbb{R}^n$. The implicit equations
\begin{align*}
\frac{\partial S}{\partial \alpha_i}(x, y; \alpha) &= \beta_i, \qquad i = 1, \dots, n,
\end{align*}
define, near any point where the non-degeneracy condition holds, a unique curve $y(x)$ in $\mathbb{R}^n$. Setting $p_i(x) = \partial S / \partial y_i(x, y(x); \alpha)$, the pair $(y(x), p(x))$ is a solution of Hamilton's canonical equations
\begin{align*}
y_i' &= \frac{\partial H}{\partial p_i}(x, y, p), \\
p_i' &= -\frac{\partial H}{\partial y_i}(x, y, p).
\end{align*}
As $(\alpha, \beta)$ range over $\mathbb{R}^n \times \mathbb{R}^n$, this construction yields the general solution.