# Motivating the Legendre Transform Mathematically

If I begin with a functional of the form

$$J[y] = \int_a^b f(x,y,y')dx$$

and find its Euler-Lagrange equations

$$\frac{\partial f}{\partial y} - \frac{d}{dx}\frac{\partial f}{\partial y'} = 0 = \frac{d}{dx}\frac{\partial f}{\partial y'} - \frac{\partial f}{\partial y}.$$

I end up with a second order ODE

$$\frac{d}{dx}\frac{\partial f}{\partial y'} - \frac{\partial f}{\partial y} = \left( \frac{\partial ^2 f}{\partial y' \partial y'} \right) \frac{d^2 y}{dx^2} + \left(\frac{\partial ^2 f}{\partial y \partial y'}\right) \frac{dy}{dx} + \frac{\partial ^2 f}{\partial x \partial y'} - \frac{\partial f}{\partial y} = 0$$

Now every higher order ODE can be broken up into a system of first order ODEs in $y$ and the derivative $M = \frac{dy}{dx}$, giving

$$\frac{d}{dx}\frac{\partial f}{\partial y'} - \frac{\partial f}{\partial y} = \left( \frac{\partial ^2 f}{\partial y' \partial y'} \right) \frac{d M}{dx} + \left(\frac{\partial ^2 f}{\partial y \partial y'}\right)M + \frac{\partial ^2 f}{\partial x \partial y'} - \frac{\partial f}{\partial y} = 0.$$

From this perspective, Hamilton's equations

$$\left\{ \begin{array} & \frac{dy}{dx} = \phantom{-}\frac{\partial \mathcal{H}}{\partial p}\\ \frac{d p}{dx} = - \frac{\partial \mathcal{H}}{\partial y} \end{array}\right.$$

are merely a system of first order equations making my above system of first order ODEs look more symmetric, after a suitable change of variables.

My question is, looking at

$$\frac{d}{dx}\frac{\partial f}{\partial y'} - \frac{\partial f}{\partial y} = \left( \frac{\partial ^2 f}{\partial y' \partial y'} \right) \frac{d^2 y}{dx^2} + \left(\frac{\partial ^2 f}{\partial y \partial y'}\right) \frac{dy}{dx} + \frac{\partial ^2 f}{\partial x \partial y'} - \frac{\partial f}{\partial y} = 0$$

it should be possible to see why the Legendre transformation arises, first because its a transformation using derivatives to change variables but also because it should just make some terms go to zero in this second order ode so that everything looks nicer, but how do you see this explicitly?

It'd be great if you could use my notation, ie. $J[y]$ etc... as you see I snuck in $\mathcal{H}$ in above which shouldn't really be there, I'd love to see how that comes about in my notation - thanks!

You are slightly misunderstanding the transformation to the momentum variable, which is defined to be $$p=\frac{\partial f}{\partial y'}\tag{1}$$ and not directly proportional to $y'$. The two are proportional only in the limited circumstance that $f=\frac 12 m(y')^2-V(y)$, and the relationship is in general more complicated. The only thing you need is for (1) to be a proper coordinate transformation, which means asking for the hessian $$\frac{\partial^2 f}{\partial y'\partial y'}$$ to be nonsingular and positive-definite; it's clear from that that the functional dependence of $p$ on $y'$ and $y$ can be very general indeed.
Given this, if you just want to see how this cleans up the notation, you're much better off not dismembering the original Euler-Lagrange equation, $$\frac d{dx}\frac{\partial f}{\partial y'}-\frac{\partial f}{\partial y}=0\tag{2},$$ which turns into Hamilton's equations $$\left\{\begin{array} & \frac{\partial f}{\partial y'}=p,\\ \frac{d p}{dx}=\frac{\partial f}{\partial y}, \end{array}\right.$$ simply by substituting in the correct definition (1) and either inverting the first equation to get $\frac{dy}{dx}$ in terms of $p$ and $y$, or simply realizing that it is part of a system of two ODEs of first order in $y$ and $p$.
• Thanks for the insight, but I was hoping that by dismembering the E-L equations we would see some terms disappear or something when we do a particular change of variables. I was reading Gelfand's Calculus of variations & one of the many motivations he gives is that we simply want to make the first order system resulting from this dismemberment look more symmetric, & I was hoping that should be obvious when you look at the 2nd order ode, but even after substituting your $p = \frac{\partial f}{\partial y'}$ it still looks arbitrary in this context, I was hoping the need for the LT would just – bolbteppa Aug 26 '13 at 18:22
• I think it does 'jump out' of the original E-L equation. You want to change variables to some $p=p(y,y')$ which will make equation (2) of first order in $p$? Then the simplest choice is whatever is inside $\frac{d}{dx}\left[\cdots\right]$. All you need to do then is prove that your definition gives a second first order ODE. If you want to make them symmetric you do need to invert $\partial f/\partial y'$, but I think this is a small price to pay once you have your equation in $p'$. – Emilio Pisanty Aug 26 '13 at 18:41