7.1 The Legendre Transform

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:

\begin{align} v_i \equiv \die{f}{u_i} \tag{7.1}\end{align}

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:

\begin{align} g(v_i)=\sum_i u_iv_i-f \tag{7.2}\end{align}

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\):

\begin{align} \delta g &= \delta \left(\sum_i u_iv_i-f\right)\\ &=\sum_i (u_i\delta v_i+v_i\delta u_i)-\sum_i \die{f}{u_i}\delta u_i\\ &=\sum_i u_i\delta v_i + \sum_i\left(v_i-\die{f}{u_i} \right)\delta u_i\\ &=\sum_i u_i\delta v_i \tag{7.3}\end{align}

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:

\begin{align} \delta g = \sum_i \die{g}{v_i}\delta v_i \tag{7.4}\end{align}

and make the following identification:

\begin{align} u_i = \die{g}{v_i} \tag{7.5}\end{align}

The Legendre Transformation thus has a nice set of symmetries:

\begin{align} v_i&=\die{f}{u_i}\\ u_i&=\die{g}{v_i}\\ g&=\sum_i u_iv_i-f\\ f&=\sum_i u_iv_i-g \tag{7.6}\end{align}

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:

\begin{align} v_i\equiv \die{f(u_i,w_i)}{u_i} \tag{7.7}\end{align}

We thus call the \(u_i\) the “active” variables, and the \(w_i\), the “passive” variables. Again, we define \(g\):

\begin{align} g \equiv \sum_i u_iv_i-f(u_i,w_i) \tag{7.8}\end{align}

The variation of \(g\) is given by:

\begin{align} \delta g &= \delta \left(\sum_i u_iv_i-f(u_i,w_i)\right)\\ &=\sum_i (u_i\delta v_i+v_i\delta u_i)-\sum_i \left(\die{f}{u_i}\delta u_i+ \die{f}{w_i}\delta w_i\right) \\ &=\sum_i \left(u_i\delta v_i-\die{f}{w_i}\delta w_i\right) + \sum_i\left(v_i-\die{f}{u_i} \right)\delta u_i\\ &=\sum_i \left( u_i\delta v_i-\die{f}{w_i}\delta w_i \right) \tag{7.9}\end{align}

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:

\begin{align} \delta g_i = \sum_i \left(\die{g}{v_i}\delta v_i+\die{g}{w_i} \delta w_i \right) \tag{7.10}\end{align}

and immediately identify:

\begin{align} u_i&=\die{g}{v_i}\\ \die{g}{w_i}&=-\die{f}{w_i} \tag{7.11}\end{align}

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.