# Maths of Hamiltonian / Lagrangian mechanics

1. Jul 4, 2011

### burakumin

Hello everyone

I have difficulties in understanding some stuff in Lagrangian and Hamiltonian mechanics. This concerns the equations :

$$\dot p = - \frac{\partial H}{\partial q}$$

$$\frac{d}{dt} \frac{\partial L}{\partial \dot q} = \frac{\partial L}{\partial q}$$

First I have to say that I'm a math guy and I understand physics far better by considering things geometrically. Unfortunately, the above equations are 99% of times introduced / explained by decomposing quantities into coordinates : q becomes $(q_1, \cdots, q_n)$, p becomes $(p_1, \cdots, p_n)$ (even in so-called books of "physics for mathematicians"). I would prefere so much to have coordinate-free definitions because coordinate makes everything looks similar (to $\mathbb{R}^n$) and make geometry-oriented thinking difficult.

Among the two equations of hamiltonian mechanics :
$$\dot q = \frac{\partial H}{\partial p}, \dot p = - \frac{\partial H}{\partial q}$$
only the first is clear to me. Some might argue that the equations are symetric but according to me they are definitely not.

If H is a scalar field on $\mathbb{R} \times T^*\mathcal{M}$ where the manifold $\mathcal{M}$ is the configuration space, the informal derivative $\frac{\partial H}{\partial p}$ can be given a rigorous meaning. If time t and point q are given, $p \mapsto H(t,q,p)$ is a function from $T^*_q\mathcal{M}$ to $\mathbb{R}$. Thus, it has a total derivative $D( p \mapsto H(t,q,p) )$ from $T^*_q\mathcal{M}$ to $T_q\mathcal{M}$. So for a given trajectory $\mathfrak{q}: \mathbb{R} \mapsto \mathcal{M}$, the equation $\dot{\mathfrak{q}}(t) = \frac{\partial H}{\partial p}(t,\mathfrak{q}(t),\mathfrak{p}(t))$ has a precise meaning.

But for $\frac{\partial H}{\partial q}$, I don't understand what it could possibly mean to derivate H along q, with a constant p. When q is changing, you're moving from a fiber to another one, and the vectors p in different fibers are incomparable. Consequently, the phrase "constant p" sounds non-sensical (unless of course we have a tool to match the fibers but I have never seen any mention of a (pseudo)riemanian structure / connexion in this context)

For the same reason, I don't knwow how to interprete $\frac{\partial L}{\partial q}$

I know that $\mathcal{N} = T^*\mathcal{M}$ is itself a manifold with interesting properties due to its canonical symplectic structure (such as the canonical isomorphism between $T\mathcal{N} = TT^*\mathcal{M}$ and $T^*\mathcal{N} = T^*T^*\mathcal{M}$). So I have already considered a possible interpretation of $\frac{\partial H}{\partial q}$ as the (exterior) derivative of H, considered as a scalar field on $\mathcal{N}$, (the derivative $dH : \mathcal{N} \mapsto T^*\mathcal{N}$). In a similar manner, for a "momentum trajectory" $\mathfrak{p} : \mathbb{R} \mapsto \mathcal{N}$, we can think about the derivated function $\dot{\mathfrak{p}} : \mathbb{R} \mapsto T\mathcal{N}$.

This could possibly match but it sounds so different from what the notation $\frac{\partial H}{\partial q}$ suggests ($dH$ is a really total derivative of H: it gives the variation of H for all "directions" of $\mathcal{N} = T^*\mathcal{M}$, including variations along q), that I can hardly believe the correct explanation is to be found this way.

What to think about all that ? Should I consider othe theorical entities like Poisson Brackets ?

Thank you

Last edited: Jul 4, 2011
2. Jul 14, 2011

### Akater

Lagrangian mechanics from the geometric viewpoint is described, for example, in Godbillon's Geometrie differentielle et mecanique analytique (I'm not sure if English translation exists at all) and Abraham & Marsden's Foundations of Mechanics, Ch. III.

3. Jul 14, 2011

### jonnyfish

If you're comfortable with differential geometry, it is actually very easy to make coordinate free sense of all this. Start with a manifold $X$ which is the configuration space. The tangent bundle $TX$ is the space of pairs $(q,v)$ with $q \in X$ and $v \in T_q X$, and the cotangent bundle is the space of pairs $(q,p)$ with $q \in X$ and $p \in T^\ast X$.

A Lagrangian function is a function $L$ on $TX$. A Hamiltonian function is a function $H$ on $T^\ast X$ (I will mention the Legendre transform later).

The nice thing about working with the cotangent bundle is that there is a canonical 2-form on it given locally as $\omega = \sum dq^i \wedge dp^i$ (and it is super-easy to check that this definition really is independent of coordinates). Two nice things about this 2-form:

(1) $d\omega = 0$
(2) Thought of as a map $TX \to T^\ast X$ given by $v \mapsto \omega(v, \cdot)$, it is nondegenerate. Hence there is an inverse map $\omega^{-1}: T^\ast X \to TX$. (again, this is super-easy to check in coordinates, and everything is actually independent).

Now that we have a 2-form with these 2 properties, I will never have to mention coordinates again.

Given a Hamiltonian $H$, its differential is a 1-form $dH$. But we have a map $\omega^{-1}$ which takes 1-forms to vector fields (this is just the map $T^\ast X \to TX$). So we have a vector field $X_H = \omega^{-1}(dH)$ which is canonically associated to any Hamiltonian. Then Hamilton's equations are just

$$\frac{dx}{dt} = X_H(x)$$

Where $x = (q,p) \in T^\ast X$. That is, Hamilton's equations are the equations generating the flow of the vector field $X_H$ on $T^\ast X$.

If you're still with me, some fancier stuff:

(1) The tensor $\omega^{-1}$ is a Poisson tensor, and defines a Poisson bracket on smooth functions on $T^\ast X$ given by $\{f,g\} = \omega^{-1}(df, dg)$.

(2) If you started with a Lagrangian $L$ on $TX$, Then you can define the Legendre transform as follows. We need to assume that we can solve $p = \frac{\partial L}{\partial v}$ as a function of $v$ (otherwise the Legendre transform is more complicated and might not be defined). By laziness, I will write the solution as $v(p)$. Then you set $H(q,p) = pv(p) - L(q, v(p))$ and check that this is a well-defined function on $T^\ast X$ (for example, the product $p v(p)$ is pairing a covector with a vector which is well-defined and coordinate-independent).

(3) Simple calculation shows that if $x(t)$ is a solution of Hamilton's equations, then $\frac{d}{dt}H(x(t)) = 0$ is equivalent to $d^2 H = 0$, which of course is true by properties of the exterior derivative.

(4) You can also make coordinate-independent sense of the Euler-Lagrange equations, but it is not quite as nice as the above because the equations are second order.

(5) If you want to deal with constraints (even nonholonomic!) then go right ahead because again with a little bit of thought everything still works (though nonholonomic constraints certainly require more thought than holonomic).

(6) If the Hamiltonian is time-dependent, then the vector field $X_H$ is now a time-dependent vector field, but otherwise everything works. You will also see that $\frac{d}{dt}H(x(t)) = \frac{\partial H}{\partial t}(x(t))$. If you want something more coordinate independent than this then you can rephrase it in terms of contact geometry.

Last edited: Jul 14, 2011