The Hamiltonian formalism can be formally derived through the use of the Legendre transforms, which we first introduce here. Consider a function, \(f(u_1,\dots ,u_n)\), that depends on \(n\) variables, \(u_i\). Now consider new variables, \(v_i\), given by:
The Legendre transformation takes the function \(f(u_i)\) into a new function, \(g(v_i)\), that only depends on the \(v_i\). The transformation is given by:
It is not immediately apparent that \(g\) does not depend on the \(u_i\), but we can verify this by considering the variation of \(g\):
where in the last line, we used the definition of \(v_i\), to set the last term equal to zero. Thus, the variation of \(g\) only depends on the variations of the \(v_i\) and not of the \(u_i\). We can thus write \(g=g(v_i)\) and the variation of \(g\) as:
and make the following identification:
The Legendre Transformation thus has a nice set of symmetries:
Now consider the case when \(f\) depends on two sets of variables, \(u_i\), and \(w_i\), \(f=f(u_i,w_i)\), and we again define the \(v_i\) as follows:
We thus call the \(u_i\) the “active” variables, and the \(w_i\), the “passive” variables. Again, we define \(g\):
The variation of \(g\) is given by:
which again is independent of the variation on the \(u_i\). Since \(g=g(v_i,w_i)\), we can also write the variation as:
and immediately identify:
Note that we used the case where there are the same number of \(w_i\) as there are \(u_i\) and \(v_i\); it is easily seen that the results do not depend on this.