# Are the Hamiltonian and Lagrangian always convex functions?

The Hamiltonian and Lagrangian are related by a Legendre transform: $$H(\mathbf{q}, \mathbf{p}, t) = \sum_i \dot q_i p_i - \mathcal{L}(\mathbf{q}, \mathbf{\dot q}, t).$$ For this to be a Legendre transform, $H$ must be convex in each $p_i$ and $\mathcal{L}$ must be convex in each $\dot q_i$.

Of course this is the case for simple examples such as a particle in a potential well, or a relativistic particle moving inertially. However, it isn't obvious to me that it will always be the case for an arbitrary multi-component system using some complicated set of generalised coordinates.

Is this always the case? If so, is there some physical argument from which it can be shown? Or alternatively, are there cases where these convexity constraints don't hold, and if so what happens then?

-
For a system of (generally constrained) points of matter interacting with conservative forces (or generalized conservative forces admitting a generalized potential $U(t,{\bf q},\dot{{\bf q}})$ at most linear in the $\dot{\bf q}$ like for the EM interaction), the Lagrangian takes always the form $\sum_{hk}A(t, {\bf q})_{hk}\dot{q}^h\dot{q}^k + \sum_{hk}B(t, {\bf q})_{h}\dot{q}^h + C(t, {\bf q})$. Above $A$ is a strictly positive symmetric matrix. This function is convex. The resulting Hamiltonian function is convex too. – Valter Moretti Mar 18 '14 at 7:21
An example of non-convex Lagrangian is: $L=\frac{1}{3}T^2+2TV-V^2$. I couldn't calculate the associated Hamiltonian. But since it's equivalent to: $L=T-V$, it's not really relevant. And a related question with no answers: math.stackexchange.com/q/482553 – jinawee Mar 18 '14 at 9:27
@jinawee, for $L=T^{2}/3 + 2TV - V^{2}$, the canonical momenta would be $p_{k}=2(T/3 + V)\partial T/\partial\dot{q}^{k}$ and the Hamiltonian would therefore be $H=T^{2}+2TV+V^{2}=(T+V)^{2}$. – Alex Nelson Mar 19 '14 at 19:20
@AlexNelson How did you get from $H=2(T/3 + V)\partial T/\partial\dot{q}^{k}\dot{q}_k-T^{2}/3 - 2TV + V^{2}$ to your final Hamiltonian? – jinawee Mar 19 '14 at 19:33
@jinawee, I should admit I assumed $\dot{q}^{k}\partial T/\partial\dot{q}^{k}=2T$ as usual (summing over $k$, a la Einstein summation convention). This works in the Newtonian setting, but if one tries to work in (say) Special Relativity, I am not as confident it would produce the same result... – Alex Nelson Mar 19 '14 at 19:36

I) At the classical level, there is no convexity condition. If an action functional $S$ yields a stationary action principle, so will the negative action $-S$. (Under sign changes, a convex function turns in concave function and vice versa.) Or one could imagine a theory, which is convex in one section and concave in other sector.

II) On the Lagrangian side $L(q,v,t)$, it is easy to find counterexample, that shows, that one cannot demand convexity in the the position variables $q^i$; or the time variable $t$, for that matter. (For the former, think e.g. on a Mexican hat potential.) So, as OP writes, the convexity can at most concern the velocity variables $v^i$ in the Lagrangian; or the momentum variables $p_i$ in the Hamiltonian $H(q,p,t)$.

III) In the Hamiltonian formulation, it is possible to perform canonical transformation

$$(q^i,p^j)~\longrightarrow~(Q^i,P^j)~=~(-p^i,q^j)$$

which mixes position and momentum variables. From a Hamiltonian perspective, it is unnatural to impose convexity on half the canonical variables but not the other half.

IV) The Lagrangian (density) may be modified with total divergence terms that don't change the Euler-Lagrange equations. These total divergence terms could in principle violate convexity.

V) The Legendre transformation could be singular. In fact, this is the starting point of constraint dynamics. This happens e.g. for the Maxwell Lagrangian density $${\cal L}~=~-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}.$$ See e.g. this Phys.SE post.

VI) Quantum mechanically, we must demand that the Hamiltonian operator should self-adjoint and bounded from below, i.e. the theory should be unitarity.

Perturbatively, this means that the free/quadratic kinetic term should be a (semi)positive form (and therefore a convex function). Zero-modes should be gauge-fixed. Interaction terms are usually treated perturbatively.

In conclusion, convexity does not seem to be a first principle per se, but rather a consequence of the type of QFTs that we typically are able to make sense of. It might be that it is possible to give a non-perturbative definition of a non-convex (but unitary) theory.

-
Thanks, I can mostly make sense of that. I wider if it might be the case that for any Hamiltonian, there exists a canonical transformation that makes it (positively or negatively) convex in the momenta. That would guarantee that a combination of canonical transformation and Legendre transformation could always put it into Lagrangian form. – Nathaniel Mar 20 '14 at 1:19