[Math] How to properly take derivatives in calculus of variations (Euler-Lagrange formula)

calculus-of-variations

Why is it that, in calculus of variations (specifically Euler-Lagrange), we can take the derivative of a function with respect to a function $f$ and set this derivative to $0$ if only $f'$ appears in $L$? For example the standard distance formula:

$$ D = \int dx \sqrt{1 + f'(x)^2} $$

The Euler-Lagrange formula is thus:

$\frac{\partial L}{\partial f} – \frac{d}{dx} \frac{\partial L}{\partial (\frac{\partial f}{\partial x})} = 0.$

In the Wikipedia example it asserts that "Since f does not appear explicitly in $L$, the first term in the Euler-Lagrange equation vanishes for all $f(x)$". I have a hard time understanding this because to me it feels like $f'(x)$ should depend on $f$, and so just setting the derivative to be $0$ goes against my intuition. Is there a way I could think about this to have it make more sense?

Best Answer

The notation is really confusing. What it means is the following: the Lagrangian $L$ is a function $$\mathbb R \times \mathbb R\times \mathbb R\to \mathbb R,\ \ (x, p, q)\mapsto L(x, p, q).$$

If you have a function $f(x)$, then you come up with another function of $x$:

$$x\mapsto L(x, f(x), f'(x)).$$

The Euler-Lagrangian equation, to be clear, should be

$$\frac{\partial L}{\partial p} \big(x, f(x), f'(x)\big) - \frac{\partial }{\partial x}\bigg(\frac{\partial L}{\partial q} \big(x, f(x), f'(x)\big)\bigg)=0\ .$$

In your example, $L(x, p, q) = \sqrt{1+q^2}$. Hence it does not depend on $p$ (Or in your word, does not depend explicitly on $f(x)$). Hence $\frac{\partial L}{\partial p}=0$ and thus

$$\frac{\partial L}{\partial p} \big(x, f(x), f'(x)\big) =0 \ .$$

I think this would explain the Euler Lagrangian equation in a better way. People likes to write $\frac{\partial }{\partial f}$ as they do not want to introduce new variables $p, q$.

Related Question