# Generating function condition not satisfied?

We want to find a generating function $$S(q_i,P_i,t)$$ such that we get the best possible canonical transformations. So it must satisfy the Hamilton-Jacobi equation: $$H(q_i,\frac{\partial S}{\partial q_i},t)+\frac{\partial S}{\partial t}=0.\tag{1}$$ Let's even take the easier case where the hamiltonian is time-independent. Then we can search for the Hamilton's principal function in the form: $$S(q_i,P_i,t)=W(q_i,P_i)-\alpha_0t.\tag{2}$$ However from the theory of canonical transformations we know that in order for a generating function to work it has to satify the following condition: $$F(t_2)-F(t_1)=0.\tag{3}$$ Well in our case we have: $$S(q_i(t_2),P_i,t_2)-S(q_i(t_1),P_i,t_1)=W(q_i(t_2),P_i)-W(q_i(t_1),P_i)-\alpha_0(t_2-t_1).\tag{4}$$ My question is how are we ensuring that this is equal to zero always? And maybe thinking about it I don't understand how do we ensure this in any canonical transformation not just the Hamilton-Jacobi equation. How are we sure what the functions values will be before knowing the trajectory as a function of time?

• More precisely, where did condition (3) come from? Commented May 3 at 11:22
• @Qmechanic When deriving the canonical transformation we say that the variations of the lagrangians must be equal so that $\delta \int_{t_0}^{t_1}(\sum p_i\dot{q_i}-H(q_i,p_i,t))dt=\delta \int_{t_0}^{t_1}(\sum P_i\dot{Q_i}-K(Q_i,P_i,t)+\frac{dF}{dt})dt$. So If we want to preserve hamilton's equations that come from the variational principle (the transformation to be canonical), then F must satisfy condition $(3)$ Commented May 3 at 11:56

1. OP's condition (3) is not there/not necessary. Instead a type-2 generating function $$F_2(q,P,t)$$ satisfies the following $$2n+1$$ conditions: $$p_j~=~\frac{\partial F_2}{\partial q^j},\qquad Q^j~=~\frac{\partial F_2}{\partial P_j},\qquad K-H~=~\frac{\partial F_2}{\partial t}. \tag{9.17}$$
2. For a Hamiltonian $$H(q,p)$$ without explicit time dependence, OP seems to ponder how the Hamilton's principal function $$S(q,P,t)$$ and the Hamilton's characteristic function $$W(q,P)$$ can both serve the role as an $$F_2(q,P,t)$$ generating function if we also identify$$^1$$ $$S(q,P,t)~=~W(q,P)-P_1 t~?\tag{10.17}$$
3. The resolution is to pick the Kamiltonian differently in the 2 cases: $$K_S~:=~0\quad\text{and}\quad K_W~:=~P_1.$$
$$^1$$ Note that the constants of integration $$\alpha_j$$ are identified with the new momenta $$P_j$$, cf. e.g. this Phys.SE post.