A Trick in the Calculus of Variations and Its "Misuse"

It's undeniable that the calculus of variations is an extremely useful and elegant mathematical tool: it "automatically" picks out the optimal function from among a whole space of candidates, sparing us the detailed analysis. The principle of least action in physics gave the calculus of variations an enormous field of application, and in turn drove its further development. But one very obvious feature of the calculus of variations is that in most cases the computations are quite involved — indeed, if we just barrel ahead brute-force, we may not even be able to write down the system of differential equations. So useful tricks are always welcome. This post is going to introduce one such small trick, which allows certain variational problems to be simplified.

How did I come across this trick? Actually, a few months ago, while reading Gravitation and Spacetime, I got completely stuck on the part about variational principles — no matter how hard I tried, I couldn't make sense of it. What struck me as obviously wrong somehow led to the correct result. My mathematical instinct told me the author must have made a mistake, yet I couldn't pinpoint exactly where. So I set the question aside for a while. Recently I finally arrived at an answer that satisfies me, and I dare say that the trick this post is about to describe is precisely the one that got "misused" by the physicist in question.

The Trick

Let's first look at how we usually handle variational problems. Take a function of one variable as an example: to find the extremal curve for

$$S=\int L(x,\dot{x},t)dt$$

we would normally substitute directly into the Euler–Lagrange equation:

$$\frac{\partial L}{\partial x}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})=0$$

This will always work, but it's usually not simple. Consider a special but common case: in many variational problems the integrand takes the form of a square root — for instance the action of special relativity is $S=-\int mc\sqrt{c^2 dt^2-dx^2-dy^2-dz^2}$, the arc length in the geodesic problem is $l=\int\sqrt{g_{\mu\nu}dx^{\mu}dx^{\nu}}$, and so on. For this class of problems, if we directly take one of the variables as the independent variable, treat the others as functions of it, and substitute into the Euler–Lagrange equation, we get a hopelessly complicated result: the variables become "entangled" with one another, to the point that we can't even write down the differential equations.

But if we look carefully, we notice that the source of the complexity is the square root itself, while the expression inside the square root is usually not all that complicated. It would be nice if there were a way to square it away. This is in fact possible — but to find such a method we can't start from the Euler–Lagrange equation; we have to start from the most fundamental operation of the calculus of variations itself.

$$\begin{aligned}\delta S &=\delta \int Ldt \\&=\int \delta(Ldt)\\&=\int \delta\sqrt{(Ldt)^2}\\&=\int \frac{\delta (L^2 dt^2)}{2\sqrt{(Ldt)^2}}\end{aligned}$$

Setting $ds=\sqrt{(Ldt)^2}=Ldt$, this becomes

$$\int \frac{\delta (L^2 dt^2)}{2ds}=\int \frac{\delta (L^2 dt^2)}{2ds^2}ds$$

Now, if — during the variation process (note: only during the variation process) — we treat ds as a pure parameter independent of x and y, then we can rewrite this as

$$\int \frac{1}{2}\delta [L^2 (\frac{dt}{ds})^2]ds$$

In other words, if we take $ds=Ldt$ as the parameter, then varying $S=\int Ldt$ and varying $S=\int \frac{1}{2} [L^2 (\frac{dt}{ds})^2]ds$ give equivalent results (i.e., the same system of differential equations). So all we need to do is substitute $L'=\frac{1}{2} L^2 (\frac{dt}{ds})^2$ into the Euler–Lagrange equation, which is generally simpler than substituting L directly.

For example, when considering geodesics, we want to vary $l=\int\sqrt{g_{\mu\nu}dx^{\mu}dx^{\nu}}$; setting $ds=\sqrt{g_{\mu\nu}dx^{\mu}dx^{\nu}}$, we have

$$l=\int g_{\mu\nu}\frac{dx^{\mu}}{ds}\frac{dx^{\nu}}{ds}ds$$

Writing $L'=\frac{1}{2} g_{\mu\nu}\frac{dx^{\mu}}{ds}\frac{dx^{\nu}}{ds}$ and substituting into the Euler–Lagrange equation gives:

$$\frac{d}{ds}(g_{\mu\nu}\frac{dx^{\nu}}{ds})=\frac{\partial g_{\alpha\beta}}{\partial x^{\nu}}(\frac{dx^{\alpha}}{ds})(\frac{dx^{\beta}}{ds})$$

Misuse

However, this trick can easily be misused. The action for a free particle in special relativity is $S=-\int mc\sqrt{c^2 dt^2-dx^2-dy^2-dz^2}$, and by the result above, this is equivalent (in effect) to $S=-\int \frac{1}{2}mc[c^2 (\frac{dt}{ds})^2-(\frac{dx}{ds})^2-(\frac{dy}{ds})^2-(\frac{dz}{ds})^2]ds$, where $ds=\sqrt{c^2 dt^2-dx^2-dy^2-dz^2}$. This is correct as long as we haven't included any interaction. But once we add a potential-energy term to the action, it's tempting to fall into the same illusion — replacing the free-particle term with $S=-\int \frac{1}{2}mc[c^2 (\frac{dt}{ds})^2-(\frac{dx}{ds})^2-(\frac{dy}{ds})^2-(\frac{dz}{ds})^2]ds$ in the same way — but this will lead to an incorrect result. The reason is that the trick we described applies to squaring the entire Lagrangian, not just part of it.

For instance, in a case we considered before ,

$$S= -mc^2 \int \sqrt{1-\frac{v^2}{c^2}}dt-\alpha \phi \sqrt{1-\frac{v^2}{c^2}}dt$$

we cannot simply transform the action into:

$$S=-\int \frac{1}{2}mc[c^2 (\frac{dt}{ds})^2-(\frac{dx}{ds})^2-(\frac{dy}{ds})^2-(\frac{dz}{ds})^2]ds-\frac{\alpha}{c} \phi ds$$

Doing so gives the wrong result. In fact, there is no simple shortcut here at all — the best approach is to vary the action directly, rather than trying to invoke the Euler–Lagrange equation this way.

**"Take one more step, seemingly in the same direction, and truth turns into error."* I think this is one more instance of that principle at work.

English translation of a post from 科学空间 | Scientific Spaces by 苏剑林. Original: https://kexue.fm/archives/2040
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.