Thursday, January 7, 2016

Hamiltonian vs Lagrangian: The Legendre Transform

Thanks to a killer post on quora, I much better understand the relationship between the Hamiltonian and the Lagrangian. (The math of which I was looking into for another post)

One can find the equations of motion for a system using either the Lagrangian or Hamiltonian. I knew this in college, but I was still scratching my head asking: What's the big difference? Why define the Hamiltonian if the Lagrangian already does what you need?

The answer is simple. There is none. That is, to choose one or the other is arbitrary and only depends on the problem you're working with. This is another example of redundancy in a mathematical representation of a problem due to symmetry or excess freedoms. (The major topic in gauge theory.)

A problem has this kind of freedom if one can write a valid transformation. Let's look at this for classical mechanics. The Lagrangian represents it's particles in terms of three variables, $q_i$, $\dot{q_i}$, $t$ while the Hamiltonian is in terms of $q_i$, $p_i$, $t$.  Their difference clearly relies on the transformation between $\dot{q_i}$ and $p_i$. This trasformation is called the legendre transformation which is defined by derivatives which are inverse functions of each other, that is
$$\begin{align} \frac{\partial L}{\partial \dot{q_i}}\left(q_i,\frac{\partial H}{\partial p_i}(q_i, p_i,t),t \right)=p_i && \frac{\partial H}{\partial p_i}\left(q_i,\frac{\partial L}{\partial \dot{q_i}}(q_i, \dot{q_i},t),t\right) \end{align}=\dot{q_i}$$
Or simply,
$$\begin{align} \frac{\partial L}{\partial \dot{q_i}}= p_i  &&  \frac{\partial H}{\partial p_i}= \dot{q_i} \end{align}$$
One can see this as two sides of a coin. There's a one to one map between a function (say $f_i(x) = \frac{\partial L}{\partial \dot{q_i}}\left(q_i,x,t \right)$) and it's inverse ($f_i^{-1}(x) = \frac{\partial H}{\partial p_i}\left(q_i,x,t\right)$) each of which is vaild in it's own formulation. Depending on whether you're in the function or the inverses range you might be talking about one side or the coin or the other, but it's still the same coin. To see exactly what the legendre transform is let's apply the exterior derivative to $p_i\dot{q_i}$resulting in
$$d(p_i\dot{q_i}) = \dot{q_i}dp_i + p_i d\dot{q_i}$$
 Integrating over the path up to a particular $p_i$,$\dot{q_i}$
$$p_i\dot{q_i} = \int\dot{q_i}dp_i + \int p_i d\dot{q_i}$$
Or,
$$p_i\dot{q_i} = H + L$$
You might glimpse that this idea could be applied to other pairs of variables. New functions which describe a system could be built from old functions by setting their dependence on a parameter equal to a new parameter. The quora sage Erik Madsen (who goes by the tag line, A dismal scientist. Hobo-beans nods it's bean can.) linked to an arxiv paper which explores this more thoroughly. It even mentions one such relationship in thermodynamics between energy and temperature (in terms of $\beta=\frac{1}{k_B T}$) via
$$ \mathcal{F}(\beta)+\mathcal{S}(E)=\beta E $$
where $ \mathcal{F}=F\beta$ is a twist on $F$ the Helmholtz free energy and $\mathcal{S}=S/k_B$ is $S$ entropy. Erik also gives a sweet explanation of Hamiltonian flow which I'll leave you with as I couldn't resist sharing it:
"In the modern (abstract) formulation of classical mechanics, the configuration space (the space of possible particle positions) is represented by a smooth manifold $M$, while the phase space is the cotangent bundle $T^*M$ to $M$.  The cotangent bundle of a manifold has a natural symplectic form $\omega$ induced by the exterior derivative of the Liouville one-form on the bundle, so this is a natural environment in which to apply symplectic geometry.  Intuitively, $\omega$ provides a notion of volume in phase space, which is very useful for geometric analysis of dynamical systems. 
Now, we can take any function $H$ defined on the phase space $T^*M$, and construct its Hamiltonian vector field $X_H$ via the symplectic form $\omega$, as the unique vector field on $T^*M$ satisfying $dH(V)=\omega(X_H,V)$ for all vector fields $V$ on $T^*M$.  The flow of this vector field consists of those paths satisfying the Hamiltonian EOMs, and (very importantly) Hamiltonian flow preserves the volume form (the Lie derivative of $\omega$ along $X_H$ vanishes), which is a generalization of Liouville's theorem. 
So, if we define a dynamical system by specifying its phase space and Hamiltonian (which is a natural notion of energy), properties of dynamical systems can be studied through the lense of volume-preserving flows on a symplectic manifold."

No comments :

Post a Comment