Question about the Hamilton Jaccobi Equation

Hi, I was wondering about the interpretation of the Hamilton Jaccobi equation.

Naively we have H + [itex]\partial[/itex]S/[itex]\partial[/itex]t = 0 where H is the Hamiltonian and S is the action. But the action is the time integral of the Lagrangian so you would expect [itex]\partial[/itex]S/[itex]\partial[/itex]t = L

Thus H + L = KE + PE + KE - PE = 2KE = 0

(PE = potential energy, KE = Kinetic energy)

Which simply says that then system is not moving which seems odd for something billed as an equation of motion. Something is clearly very wrong here but what?

The idea is to find new canonical coordinates [itex](Q,P)[/itex] of phase space such that all trajectories are described by by [itex](Q,P)=\text{const}[/itex]. Thus you look for the corresponding canonical transformation from the original canonical coordinates [itex](q,p)[/itex]. You can easily show that up to "gauge invariance" this is achieved by the demand that
[tex]H'(t,Q,P)=0.[/tex]
To that end we introducd the generating function [itex]g(t,q,P)[/itex] for this canonical transformation. The relation between the old and the new quantities is
[tex]p=\partial_q g, \quad Q=\partial_P g, \quad H'(t,Q,P)=H(t,q,p)+\partial_t g =H \left(t,q,\partial_q g \right)+\partial_t g\stackrel{!}{=}0.[/tex]
This is the Hamilton-Jacobi equation.

For the case of a Hamilton function that is not explicitly dependent on time, the Hamiltonian is conserved along the possible trajectories of the system (energy conservation). Then from the Hamilton-Jacobi equation you get
[tex]H(t,q,p)=E=-\partial_t g=\text{const} \; g=-E t + S(q,E,P_2,\ldots,P_f),[/tex]
where we use [itex]E[/itex] as one of the new canonical momenta, and [itex]S[/itex] is not explicitly time dependent.

Now we evaluate the action functional in terms of [itex]g[/itex]:
[tex]A=\int_{t_1}^{t_2} \mathrm{d} t (\dot{q} \dot{p}-H)=\int_{t_1}^{t_2} \mathrm{d} t (\dot{q} \partial_q g+\partial_t g)=g_2-g_1,[/tex]
where
[tex]g_j=g(t=t_j,q(t_j),P).[/tex]
Note that [itex]P=\text{const}[/itex] according to the construction of the new canonical coordinates. As you see, indeed [itex]g[/itex] is closely related to the action.