# Number of variables in the Hamilton-Jacobi equation

In Goldstein's Classical Mechanics, while introducing the Hamilton-Jacobi equation, he argues that the equation $$H(q_1, ... , q_n; \frac{\partial S}{\partial q_1}, ..., \frac{\partial S}{\partial q_n}; t) + \frac{\partial S}{\partial t} = 0$$ is a partial differential equation in $$(n + 1)$$ variables $$q_1, ... , q_n; t$$.

He then proceeds to say that the solution (if it exists) will be of the form $$S(q_1, ... , q_n; \alpha_1, ... , \alpha_{n+1}; t)$$ where the quantities $$\alpha_1, ... , \alpha_{n+1}$$ are the $$(n + 1)$$ constants of integration.

How is time a variable? Isn't it the parameter we're integrating over?

Perhaps this warrants some context. He introduces the Hamilton-Jacobi equation with the motivation to find a canonical transformation that relates the canonical coordinates at a time $$t$$ -- $$(q(t), p(t))$$ -- and the initial coordinates $$(q_o, p_o)$$ at $$t = 0$$. I hence get that time must be a variable here. However, it is still the parameter we integrate the Hamilton-Jacobi over in order to get $$S$$, right? Where does the $$(n+1)^{th}$$ constant of integration come from?

the action function in the HJ formalism is dependent on time through the upper bound.

$$S(q_i,t,\alpha_i,t_0)=\int_{t_0}^tL(q_i,\partial_tq_i,t')dt'$$ in cases of Lagrangian that is independent (explicitly) of time then the constant of integration conjugate to $$t$$ let's call it $$\alpha_t$$ is simply the Energy.

1. The HJ equation is a non-linear 1st-order PDE in $$n+1$$ variables $$(q^1,\ldots,q^n,t)$$, namely the generalized positions and time, which in principle enter on equal footing.

2. A complete$$^1$$ solution, known as Hamilton's principal function $$S(q,\alpha,t)$$, should not be conflated with the off-shell action functional $$S[q;t_f,t_i]$$ nor the (Dirichlet) on-shell action $$S(q_f,t_f;q_i,t_i)$$, cf. my Phys.SE answer here.

References:

1. H. Goldstein, Classical Mechanics; Section 10.1 first footnote.

2. L.D. Landau & E.M. Lifshitz, Mechanics, vol. 1 (1976); $$\S$$47 footnote on p. 148.

--

$$^1$$ A complete solution to a 1st-order PDE is not a general solution [1,2], despite the name!