Under the hypotheses of the definition of the principal function, the principal function $S(x, y)$ is $C^2$ on any region free of conjugate points to $(a, y_0)$, and satisfies the Hamilton–Jacobi equation:
\begin{align*}
S_x(x, y) + H(x, y, \nabla_y S(x, y)) &= 0.
\end{align*}
Moreover, the canonical momentum along any extremal $\gamma$ satisfies $p(x) = \nabla_y S(x, \gamma(x))$.