# Mathematical bases for which $q$ and $\dot{q}$ could be treated as independent variable in $L(q,\dot{q},t)$

Mathematical bases for which $q$ and $\dot{q}$ could be treated as independent variable in $L(q,\dot{q},t)$.

In Lagrangian mechanics with single degree of freedome $q(t)$ and it's first degree deritative $\dot{q}(t)$ were considered as independent variable.

$\displaystyle \frac{\partial \dot{q}}{\partial q}=\frac{\partial q}{\partial t\partial q}=\frac{\partial q}{\partial q\partial t}=\frac{\partial C}{\partial t}=0$ and its general form $\displaystyle \frac{\partial q^{(n)}}{\partial q}=0$ could be easily proven.

However, $\displaystyle \frac{\partial q}{\partial \dot{q}}=0$ was not so straight forward.

My question was that:

Prove the general form $\displaystyle \frac{\partial q}{\partial q^{(n)}}=0$ in Lagrangian equation $L(q,\dot{q},t)$ where $\displaystyle\frac{\partial L}{\partial q}=\frac{d}{dt}(\frac{\partial L}{\partial \dot{q}})$ and $q^{(n)}$ was the $n$ th deritative of $q$.

• It's not clear to me what you want to prove starting from what. In Lagrangian mechanics, we treat $q$ and $\dot q$ as independent variables on which $L$ depends; thus $\frac{\partial q}{\partial\dot q}=0$ is true by definition simply because of the way we introduce these variables. Your "calculation" of $\frac{\partial\dot q}{\partial q}$ makes no sense; that derivative is also zero simply by definition. Commented Jul 30, 2018 at 10:27
• In case you're confused by the terrible notation we unfortunately use for partial derivatives, it might help to explicitly include all the variables in the notation. Then in Lagrangian mechanics we would usually mean $\left.\frac{\partial q(q,\dot q)}{\partial\dot q}\right|_q$ when we write $\frac{\partial q}{\partial\dot q}$ (where the subscript indicates the variable held fixed). In this notational form, it's clear that the derivative vanishes. If you mean something else by $\frac{\partial q}{\partial\dot q}$, I'd suggest that you write it in this form to clarify what you mean. Commented Jul 30, 2018 at 10:31
• Did you read my comments above? None of that makes any sense; I suspect you'll notice that yourself if you try to transcribe it into the more explicit notation I suggested above. Commented Jul 30, 2018 at 12:38
• "I was wondering if there was a formal proof." For a formal proof, we need a formal question. So far you haven't stated anything about what functions and variables you're considering to depend on each other in which ways. The only thing we can formally say so far is how things are usually done in Lagrangian mechanics. This I stated above, and there's nothing more to say since it's just a matter of definitions. If you want to operate in a different picture, you'll have to formally define that picture before we can start providing formal proofs in it. Commented Jul 30, 2018 at 12:40
• Commented Jul 30, 2018 at 13:08

As I commented on an answer to a related question, 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)$. A function is a relation, while a variable is... (I haven't seen a satisfactory definition.)

If we insist that the Lagrangian is a function, not a variable, then $\frac{\partial L}{\partial q}$ is an abuse of notation, and the Lagrangian equation should be

$$L^{(1,0,0)}(q(t),\dot q(t),t) = \frac{d}{dt}L^{(0,1,0)}(q(t),\dot q(t),t)$$

assuming that $t$ is a variable. Note that $L^{(1,0,0)}$ is a function in itself, regardless of what we call its inputs.

If the Lagrangian is a variable, then the partial derivatives must specify what other variables are held constant for the differentiation, as joriki said.

But how can we "hold constant" a dependent variable? (Not only is $\dot q$ dependent on the function $q$, but also the variable $q$ is dependent on $t$.) Perhaps the idea of "dependent/independent variables" doesn't make sense, and should be replaced with "domain and codomain of functions". Other views are welcome.

• A tricky way for $\dot{q}$ (which I was not sure if it's correct) for Lagrange's equations of the second kind $\displaystyle \frac{d}{dt} ( \frac{\partial q}{\partial \dot{q}} ) = \frac{d}{dt} ( \frac{\partial q}{\partial q} \partial t ) = \frac{d}{dt} ( \partial q \frac{\partial t}{\partial q} ) = \frac{d q \cdot 0}{dt}=0$, so it's simplest to write $q$ and $\dot{q}$ as independent variables to avoid calculations.(No assumption) There is a difference between generalized equations of motion and Lagrange's equations of the second kind. I was wondering if there was a formal proof.
– user416486
Commented Jul 30, 2018 at 12:37
• Acturally, the equation before lagrange could be derived from variation as a function of dependent variables, then one might introduce one of the $u_i$ as ($t$) independent variables. Although the "initial assumption" that $q$ and $\dot{q}$ were independent seemed to be doable, but was not an initial assumption for the lagrange's equation. Lagrange's equation of motion actually didn't specify or require $p(t)$ and $\dot{p}(t)$ to have any relation, so it's a mathematical reason.
– user416486
Commented Jul 30, 2018 at 16:38