In Arnold's Mathematical Methods of Classical Mechanics, he derives the Hamilton-Jacobi equation (HJE) using a generating function $S_1(Q, q)$ to get
$$ H\left(\frac{\partial S_1(Q, q)}{\partial q}, q, t \right) ~=~ K(Q, t). $$
However, this is different from what I've seen in other physics texts. For example, Goldstein uses the generating function $S_2(q, P, t)$ to get the equation
$$ H\left(\frac{\partial S_2(q, P, t)}{\partial q}, q, t\right) ~=~ - \frac{\partial S_2(q, P, t)}{\partial t}. $$
Why is there this difference? Are the two equations saying the same thing?