# Why does $\frac{dq}{dt}$ not depend on $q$? Why does the calculus of variations work?

The Euler–Lagrange equations for a bob attached to a spring are $${d\over dt}\left({\partial L\over\partial v}\right)=\left({\partial L\over\partial x}\right)$$

But is $$v$$ a function of $$x$$? Normal thinking says that $$x$$ is a function of $$t$$ and $$v$$ is a function of $$t$$, but it is not necessary that $$v$$ be a function of $$x$$. Mathematically, however, $$x=f(t)$$ and $$v=g(t)$$, so $$g^{-1}(v)=t$$ and $$x=f(g^{-1}(v))$$.

The chain rule should be applied in these equations – why not here? I had previously asked this question on the physics Stack Exchange but it was marked a duplicate. In one of the answers there I found that the dedication of William Burke's Applied Differential Geometry read

To all those who, like me, have wondered how you can change $$\dot q$$ without changing $$q$$.

I couldn't understand the answer there. My mathematics is not that good. So I asked it here again. If someone could give an answer without the concept of manifolds, I think I will be able to understand it.

And Most importantly answers here say that notation is not that, but W. Burke has another reasons while the answers in the link have another reason. So what is the correct reason ? Like in f=(g(t)) we apply the chain rule. So why not here when f'(x) is function of f(x)?

Answer: It's so because the q and q dot are explicit functions of time so their partial derivative with each other is 0.....

• It would be helpful if you gave us a link to the physics SE answer you're talking about Oct 11, 2016 at 10:41
• @Omnomnomnom Yes off course just a second Oct 11, 2016 at 10:42
• First of all even if you have a function $g$ defined by $g(t)=v$ you have no guarantee that a function $g^{-1}$ satisfying $g^{-1}(g(t))=t$ even exists. Oct 11, 2016 at 10:43
• @Omnomnomnom I have edited the answer to contain the link to the same question in Physics Stack Exchange Oct 11, 2016 at 10:46
• @ParclyTaxel you edited out this link Oct 11, 2016 at 10:48

## 4 Answers

I find that calculus of variations could benefit pedagogically from a few more "dummy-variables".

Here's how I think about it: $L$, properly speaking, is a function on three parameters. That is, $L:\Bbb R^3 \to \Bbb R$ so that $L(u_1,u_2,u_3)$ is a number for any three inputs $u_1,u_2,u_3$.

We're interested in the function $L(t,x(t),x'(t))$. The Euler Lagrange equations should then be written as $$\frac{d}{dt} \frac{\partial L}{\partial u_3}(t,x(t),x'(t)) = \frac{\partial L}{\partial u_2}(t,x(t),x'(t))$$ and this is what the Euler-Lagrange equation is really talking about.

Certainly, if we wanted to compute $\frac{\partial L}{\partial x}(t,x(t),x'(t))$ with the usual definitions (or, I guess, with the "alternate interpretation"), we'd have some kind of chain rule to work through. That is, we'd have $$\frac{\partial L}{\partial x}(t,x(t),x'(t)) = \frac{\partial L}{\partial u_2} \frac{\partial u_2}{\partial x} + \frac{\partial L}{\partial u_3} \frac{\partial u_3}{\partial x} = \frac{\partial L}{\partial u_2}(t,x,x') + \frac{\partial L}{\partial u_3}(t,x,x') \frac{\partial x'}{\partial x}(t)$$ However, this second interpretation is not the evaluation we're interested in.

• So is it correct to say that in a sense dq/dt is a dependent on (function of) q or is it wrong ? Oct 11, 2016 at 11:05
• It is indeed correct to say that $dq/dt$ is dependent on $q$. However, we still evaluate $\partial{L}/\partial{q'}$ as if there is no such dependence. Oct 11, 2016 at 11:07
• But why do we do that and not apply the chain rule as if there is no such dependence when the truth is that dq/dt is dependent on q. Is n't it necessary to apply chain rule where the variable being differentiated depends on another variable ? I mean to say that we have been applying this concept of using chain rule throughout single and multivariate and even vector calculus . Why are we not applying it here ? Wouldn't the final result go wrong if we know that dq/dt depends on q and we still not apply the chain rule ? Oct 11, 2016 at 11:14
• Again, the real point here is that the formula is written with bad notation. They mean the first thing, even though they write it like the second thing Oct 11, 2016 at 11:16
• I have no idea what you’re trying to say other than that you think my answer is wrong Dec 31, 2019 at 15:26

Boiled down, the issue appears to be:

• For a particular function $f$, "the velocity is determined by the position": Precisely, if you know $f$, then (in practice) the value of $x = f(t)$ (essentially) determines the value of $v = f'(t)$ (as mentioned in your question, up to the relatively minor ambiguity noted in ryan16's comment).

• The Lagrangian, however, is defined on the space of functions, and knowledge of the height of a graph $x$ at one point tells you nothing about the slope $v$ at that point. (To deduce $f'(t)$ from $f$, you must know the values of $f$ in some open interval about $t$. The only relationships between the values $f(t)$ and $f'(t)$ are global, coming from boundary conditions and the Fundamental Theorem of Calculus.)

In case it's helpful, think of a three-dimensional Cartesian space with coordinates $(t, x, v)$. Given a function $f$, compare the two paths: $$\gamma_{1}(t) = \bigl(t, f(t), 0\bigr),\qquad \gamma_{2}(t) = \bigl(t, f(t), f'(t)\bigr).$$ Convince yourself that a "small perturbation" of $f$ (introducing a zag of small height, say) can have a dramatic effect on $\gamma_{2}$ yet no visible effect on $\gamma_{1}$.

• Thanks . I got it from your Omnomnomnom answers and after thinking on the difference in the 2 paths of the last lines of your answer Oct 11, 2016 at 20:34

I wrote on another post about this matter. The way people write Euler-Lagrange equation is pretty confusing to me, so I decided to abandon the use of the notion "differentiate with respect to a variable" to clear things up. Hopefully you can follow the following notations.

Let $x:[t_1,t_2]\to \Bbb R$ be a smooth enough function. For this function, define another function $f_x:[t_1,t_2]\to \Bbb R^3$ by $$f_x(t):=(t,x(t),x'(t)).$$ Let $L:\Bbb R^3\to \Bbb R$ be the Lagrangian that is a smooth enough function. The functional to be optimised is usually written as $$S[x]=\int_{t_1}^{t_2}L(t,x(t),x'(t))dt.$$ But in our notations, we write it as $$S[x]=\int_{t_1}^{t_2}L\circ f_x$$ and we no longer need to specify that we integrate with respect to $t$ because the domain of $L\circ f_x$ is just an interval.

Partial derivatives of $L$ give rise to new functions. In our case, we concern about $$\partial_{e_2}L:\Bbb R^3\to \Bbb R$$ and $$\partial_{e_3}L:\Bbb R^3\to \Bbb R$$ where $e_2, e_3$ are vectors in the standard basis for $\Bbb R^3$.

In our notations, the Euler-Lagrange equation would be stated as $$(\partial_{e_3}L\circ f_x)'(t)-(\partial_{e_2}L\circ f_x)(t)=0.$$

Many beginners go through this pain, and it all is the fault of physicists who use the extremely confusing notation $\dot q$. The correct approach is to understand that the Lagrangian (assuming that it does not depend explicitly on time) is defined on the tangent space, and in a local trivialization the points of the tangent space have coordinates $(x_1, \dots, x_n, v_1, \dots, v_n)$, where $(x_1, \dots, x_n)$ are coordinates on the base of the fibration ("the configuration space", as physicists call it), and $(v_1, \dots, v_n)$ are coordinates in the standard fiber. Therefore, $x$ and $v$ are independent coordinates.

• Was back at this question. I still can't get that v is a function of x or q dot of q . Even if Lagrangian is on the tangent space , it can't change the fact that q dot is a function of q . So q dot being a function of q whether in tangent space or not we must apply chain rule !! Feb 14, 2017 at 12:27