The following is an excerpt from [ The action as a function of coordinate]. I would like to comment on the formal derivation of Hamilton’s equations and the problems of independence of variations.

Note that in the derivation above, the variations and are regarded as independent.* Actually, is arbitrary but is not, even though p, q are both independent variables. Since in connected with and and are not independent.

Notice that before (43.8) is derived, we have applied Ledrendre Transformation which requires that

. (1)

So the coefficient of is , and is arbitrary, so its coefficient must be , Hence we get another Hamilton’s equation

. (2)

Notice that we only derive half of Hamilton’s equations from the procedure above.

Since we can not say that we derive Hamilton’s equations by applying Hamilton’s equations. In order to make this induction above complete, we have to give the proof of another half of Hamilton’s equations, that is (1).

(1) is related to the definition of . From the definition of Hamiltonian

and , then

With the definition of p, , we have

.

Hence the half part of Hamilton’sequations is derived.

In this way of deriving Hamilton’s equation, strictly, we first derive (1) from the definition of p, and then by applying (1) in , (2) can be derived.

*We should notice that variations here are simultaneous variations and it’s for a complete system.