The description in this article is great, but the why is still rather mysterious. How would somebody come up with that?
If you are familiar with the method of Lagrange multipliers, then what's happening can be explained as follows. Given the Lagrangian L(x,v) the problem of classical mechanics is to find a trajectory x(t),v(t) that extremises the integral of L(x(t),v(t))dt under the constraint x'(t) = v(t). Lagrange multipliers are a method to deal with constraints in optimisation problems. Usually it's taught in the finite dimensional case, but it also works in the infinite dimensional case. We introduce a Lagrange multiplier p(t) and add the constraint to the objective: integral of L(x(t),v(t)) + p(t)(x'(t) - v(t)) dt. To solve the problem we minimise this over x,v,p. If we carry out the minimisation over v first then we're left with two variables x,p. That's the Hamiltonian formulation of the problem, and it's called the dual problem in convex optimisation. So the momentum p is the Lagrange multiplier for the constraint x' = v.
In more detail: we rewrite L(x(t),v(t)) + p(t)(x'(t) - v(t)) = L(x(t),v(t)) - p(t)v(t) + p(t)x'(t). Now we separate out H(x,p) = min_v L(x,v) - pv, so the original problem becomes to minimise the integral of H(x,p) + p(t)x'(t). After applying the Euler-Lagrange equations we obtain Hamilton's equations:
Agreed, thanks. That blog post was just trying to explain what it is, not why it is, mostly as a basis to complain about education rather than teach physics.
The why is actually quite simple- and the same reason the Fourier transform is sometimes used. Some problems are simply more elegantly expressed in a particular basis system. Nobody tries to express a ball's motion in flight via Fourier analysis, but you certainly could.
In the same way, sometimes solutions for the position(s) of a system is the most natural basis system for describing/investigating a problem (use the Lagrangian) and sometimes solutions for its momentum are (use the Hamiltonian).
Of course, they're intrinsically linked since the evolution of one determines the evolution of the other.
Christ, that's _awesome_. I wish I was taught the Legendre transform this way. Where did you run into this viewpoint? I'd love to read a textbook that explains physics this way.
In fact, I to this day have not found a book that caters to my level of mathematical knowledge (undergrad pure math) on variational calculus. They're either _way_ too handwavy (like Taylor), or _way_ beyond reach (relying on heavy functional analysis, weak convergence, all that stuff).
Is there a textbook/lecture series/what have you that explains the calculus of variations at a "non-handwavy" level, BUT does not tries to perform the calculations in the most general way possible. That is, pick a nice space (C^\infinity or some such) and then show me with full rigor how the calculus of variations can be constructed. I'd love some references :)
I don't think I've seen this viewpoint anywhere else, but Langrange multipliers in the calculus of variations are a well known thing, and the connection between Lagrange multipliers and the Legendre transform is a well known thing, so I'm sure you can find it in a book somewhere.
I've not read any book on the calculus of variations, but I think that the book by Gelfand and Fomin is the standard book. Maybe that is suitable?
By the way, you can motivate the Legendre transform / Langrange multipliers like this. Suppose we want to minimise f(x) subject to g(x) = 0. We can add the constraint g(x) = 0 to the objective function by defining Q(x) = 0 if g(x) = 0 and Q(x) = infinite otherwise. Then the problem is min f(x) + Q(x). This seems like the kind of thing that doesn't help, but now write Q(x) = max_p (p g(x)). You can see that this is indeed the same as the previous definition of Q. So we can write that problem as min_x max_p f(x) + p g(x). This is a bit silly, and the usual way to explain Lagrange multipliers is probably better, but you may find it amusing.
If you are familiar with the method of Lagrange multipliers, then what's happening can be explained as follows. Given the Lagrangian L(x,v) the problem of classical mechanics is to find a trajectory x(t),v(t) that extremises the integral of L(x(t),v(t))dt under the constraint x'(t) = v(t). Lagrange multipliers are a method to deal with constraints in optimisation problems. Usually it's taught in the finite dimensional case, but it also works in the infinite dimensional case. We introduce a Lagrange multiplier p(t) and add the constraint to the objective: integral of L(x(t),v(t)) + p(t)(x'(t) - v(t)) dt. To solve the problem we minimise this over x,v,p. If we carry out the minimisation over v first then we're left with two variables x,p. That's the Hamiltonian formulation of the problem, and it's called the dual problem in convex optimisation. So the momentum p is the Lagrange multiplier for the constraint x' = v.
In more detail: we rewrite L(x(t),v(t)) + p(t)(x'(t) - v(t)) = L(x(t),v(t)) - p(t)v(t) + p(t)x'(t). Now we separate out H(x,p) = min_v L(x,v) - pv, so the original problem becomes to minimise the integral of H(x,p) + p(t)x'(t). After applying the Euler-Lagrange equations we obtain Hamilton's equations:
dH/dx = dp/dt
dH/dp = -dx/dt