# If $x = e^t$, than what is the partial with respect to $\dot{x}$ of $\dot{x}^2-x$?

The Motivation:

I am learning the basics of Lagrangian mechanics. The usual example of using Lagrangian mechanics is to find the equation of motion of a pendulum. Since this forum is about math and not physics, I will simply write down the expression which is confusing me.

The Lagrangian ($\mathcal{L}$) is

$$\mathcal{L} = \frac{m}{2}\left(l\frac{d{\theta}}{dt}\right)^2 - mgl(1-\cos(\theta))$$

(Where $m$ is the mass of the bob and $l$ is the length of the string.) The issue is when I try to find the quantity $\frac{\delta\mathcal{L}}{\delta \theta}$: the solution simply means treating $\dot{\theta}$ as a variable independent of $\theta$, even though since they are both functions of $t$ we can write down a relationship between the two.

The Problem:

So there's no point in making the algebra messy, so let's use an easier example. Let's pretend $\mathcal{L} = \dot{x}^2 - x$ and furthermore, let's pretend $x=e^t$.

This is a problem! Obviously, in this special case, $x=\dot{x}$, so wouldn't $\frac{\delta\mathcal{L}}{\delta\dot{x}}=2\dot{x}-1$? Apparently, $\frac{\delta\mathcal{L}}{\delta\dot{x}}$ is actually $2\dot{x}$.

We could also give a different example. Now, let's use the same $\mathcal{L}$, but let $x=e^{7t}$. In this slightly different case, $x=\frac{1}{7}\dot{x}$, so shouldn't $\frac{\delta\mathcal{L}}{\delta\dot{x}}=2\dot{x}-\frac{1}{7}$? Once again, apparently, $\frac{\delta\mathcal{L}}{\delta\dot{x}}$ is actually $2\dot{x}$.

The Question:

The reason I brought up the motivation for this problem is just in case the math is special for the case of Lagrangian mechanics (which I wouldn't expect).

Otherwise, why is it that when we take the partial of $\mathcal{L}$ with respect to $\dot{x}$, we can, with impunity, ignore the implicit relation between $\dot{x}$ and $x$ and just treat $\dot{x}$ as a variable completely independent of $x$?

• This is a hard thing for people to get past initially. But before solving the Euler-Lagrange equation you take $\dot{x}$ and x to be independent. So for your "problem" $\frac{\partial \mathcal{L}}{\partial \dot{x}}=2\dot{x}$ Commented Aug 9, 2015 at 1:48
• You are not taking a total derivative. So you can ignore such relationships. Commented Aug 9, 2015 at 1:49

The Lagrangian is a function that takes in functions $x(t)$ and $\dot{x}(t)$ and outputs a function $L(x,\dot{x})(t)$. The arguments in the Lagrangian, $x$ and $\dot{x}$, are treated as independent variables when working out derivatives. Thus we always have $\frac{\partial \dot{x}}{\partial x} = 0$ and $\frac{\partial x}{\partial \dot{x}} = 0$. Many authors use a different name for $\dot{x}$ like $p=\dot{x}$ to avoid this confusion (which is very common). In practice $L(x,\dot{x})$ can be treated as a normal function in two variables when working out the derivatives. Thus for your example $\frac{\partial L}{\partial x} = -1$ and $\frac{\partial L}{\partial \dot{x}}=2\dot{x}$.

It does not make sense to substitute in a function $x(t)$ in the Lagrangian and then asking what the derivatives $\frac{\partial L}{\partial x},\frac{\partial L}{\partial \dot{x}}$ are. If you substitute in a function like $x(t) = e^{t}$ you are left with a normal function and the functional information about how the Lagrangian looks like is lost.

• Hmm, this does answer the question. I certainly will need to learn more to fully understand, but for now I am okay. And just to confirm, the notation for a functional derivative is "partial with respect to this function", as opposed to "partial with respect to this variable", right? Commented Aug 9, 2015 at 2:31
• @Mahkoe Yes that is a good way to state it. Also for normal Lagrangian Mechanics one does not really need the functional derivative concept as long you remember that $x$ and $\dot{x}$ are independent variables. Commented Aug 9, 2015 at 2:37
• I disagree that the Lagrangian is a functional; the action is a functional...
– JLA
Commented Aug 9, 2015 at 4:57
• @JLA I think I was thinking about the action when writing this. I changed the wording of the answer. Thanks. Commented Aug 9, 2015 at 5:31

It's been a while since I asked this, but I stumbled onto something that is conceptually helpful.

Imagine $x(t)$ takes a particle from point $a$ to point $b$. Pretend that the time it takes to go from $a$ to $b$ is 10 seconds and that it travels in a straight line. However, it might travel at a constant speed, or it might start out really fast and go slowly the rest of the way.

So now it is conceptually easy to accept that $x(t)$ and $\dot{x}(t)$ are like independent variables in the Lagrangian.

• I don't think this is correct. If the speed changes, then the position is a different function of time. $x(5) = \frac{a+b}{2}$ if the speed is constant, but not if it's variable. $x$ and $\dot x$ are not independent. Commented Jul 30, 2018 at 10:00
• I think part of the problem is conflation of functions with variables: if variables $x$ and $y$ are related by $y=f(x)$, that doesn't mean that $y$ is the function $f$; the same variable could be a different function of another variable, like $y=f(x)=g(z)$. In your example, the same curve is traced by different parametrizations. Commented Jul 30, 2018 at 10:03