# Explicit vs implicit time dependence in Lagrangian mechanics

I'm trying to understand something that's coming from my Marion & Thornton (4th edition 1995 on p. 264 in a section titled "Conservation Theorems Revisited"). The topic is conservation of energy and introduction of the Hamiltonian from Lagrange's equations.

We're told that the Lagrangian ($$L$$) cannot depend explicitly on time. I think my problem is that I don't really understand what this means. Let me explain why.

I understand that if $$L$$ cannot depend explicitly on time then its partial derivative with respect to time is necessarily zero:

$$\frac{\partial}{\partial t}L=0$$

Then it seems that there is still one hope left for $$L$$ to be dependent on time, namely if it depends implicitly rather than explicitly on time. In such a case it is not true that the total derivative is zero:

$$\frac{d}{d t}L=\sum_j\frac{\partial L}{\partial {q_j}} \dot{q_j}+\sum_j\frac{\partial L}{\partial \dot{q_j}} \ddot{q_j} + \frac{\partial}{\partial t}L = \sum_j\frac{\partial L}{\partial {q_j}} \dot{q_j}+\sum_j\frac{\partial L}{\partial \dot{q_j}} \ddot{q_j}$$

$$\dot{q}$$ is clearly the total derivative of $$q$$ with respect to time. But it seems to me that we can arrive at an equation for $$q$$ that can depend explicitly on time.
In other words, what I'm saying is that the particle's position will have some dependence on time, and we can express that dependence in an explicit manner, not to me a very astonishing idea since that's what much of freshman physics is about.

But $$L$$ depends explicitly on $$q$$ since the first term in the second equation above is nonzero.
So if $$L$$ depends explicitly on $$q$$ and $$q$$ can be expressed explicitly in terms of time, then why can we not just plug the equation for $$q$$ in terms of $$t$$ into the expression for $$L$$ and then take a nonzero partial time derivative of $$L$$?

Clearly I'm missing something and I would appreciate someone filling me in.

Last edited:

Hmmm. You seem to be arguing about a definition. Stating that L cannot depend explicitly on time, which is equivalent to saying that the partial derivative is zero - does not imply that the total derivative is zero.

In a non-conservative ( dissipative ?) system L can depend on time.

I could be wrong, or we could be talking past each other here.

Hi, thanks for the reply. I think we are talking past each other though. Like you, I'm stating that the total derivative need not be zero. However, I think I see now where my question may have been unclear.
I'll try rephrasing, and will state the question clearly at the end.

We start with the Lagrangian having no explicit time dependence. The direct quote from Marion & Thornton (4th edition 1995 on p. 264 in a section titled "Conservation Theorems Revisited") is:

= begin quote =

... the Lagrangian that describes a closed system (i.e. a system not interacting with anything outside the system) cannot depend explicitly on time, that is,

$$\frac{\partial}{\partial t}L=0$$

so that the total derivative of the Lagrangian becomes

$$\frac{d}{d t}L= \sum_j\frac{\partial L}{\partial {q_j}} \dot{q_j}+\sum_j\frac{\partial L}{\partial \dot{q_j}} \ddot{q_j}$$

where the usual term, $$\frac{\partial}{\partial t}L$$, does not now appear.

= end quote =

$$q_i$$ are the generalized position coordinates of the particle. $$\dot{q}_i$$ is the total derivative of $$q_i$$ with respect to time and $$\ddot{q}_i$$ is the total derivative of $$\dot{q}_i$$ with respect to time.

The fact that the total derivatives are there indicates to me that $$q_i$$ and $$\dot{q}_i$$ can depend at least implicitly on time. But say for example we find an expression for $$q_i$$ that has explicit time dependence. Then we could just plug the expression for $$q_i$$ into the expression for L, and then wouldn't L have explicit time dependence?

So this made me think that $$q_i$$ could not have explicit time dependence either, which leads me to my questions.

====(Question 1)
If it's really true that $$q_i$$ can not have explicit time dependence, then what on earth is going on in freshman physics when we solve Newton's equations and describe the trajectories of particles in terms of time?
====

====(Question 2)
If we make the statements that:

(i) $$L$$ depends on $$q_i$$;
(ii) $$L$$ has no explicit time dependence,
(iii)from freshman physics $$q_i$$ can depend explicitly on time, as pointed out in question 1,

then does this mean that if we plug the expressions for $$q_i(t)$$ and $$\dot{q}_i(t)$$ into the expression for $$L(q_i(t),\dot{q}_i(t))$$

(i)all terms explicitly containing t magically cancel out?
(ii)or when we take the derivative $$\frac{\partial L}{\partial t}$$ we just always get equal numbers of negative and positive terms that cancel each other out?
====

Last edited:
cepheid
Staff Emeritus
Gold Member
But say for example we find an expression for $$q_i$$ that has explicit time dependence.

From where?

Then we could just plug the expression for $$q_i$$ into the expression for L, and then wouldn't L have explicit time dependence?

I suppose we could, but again, where would we obtain this expression for q(t)? Isn't that the crux of the matter? The particle trajectories aren't known a priori. If they were, then we would have the information we needed about the system and we wouldn't have to resort to Lagrangian Mechanics to find it in the first place! Basically the time-dependence of the generalized coordinate q is determined by the equation of motion i.e. in this formalism by Lagrange's equations applied to the Lagrangian for that system. If I remember right, Lagrange's equations have some time derivatives in them, and I guess that is how the time-dependence is introduced. If my argument has any merit at all, then it takes care of your Question 1, and it follows that the answer to your Question 2 would be that the Lagrangian has no explicit time dependence while the problem is being formulated, but it does assuming we have the solution. Either that, or I am wrong, and the answer to your Question 2 is one of those highly improbable-seeming mathematical coincidences you suggested (all terms with time dependence magically vanish).

Keep in mind that it has been a while since I've done Lagrangian mechanics and I could be essentially spewing nonsense here. I just don't know. I'm really looking forward to seeing some other people weigh in on this.

Cepheid, I think you might be stabbing in the right direction. In fact I remember now that when the concept of Lagrangians was introduced to me, it was done by treating the displacements as virtual displacements, some kind of hypothetical displacement that happens without any time passing. So that's necessarily independent of time and definitely different from the actual trajectory of the particle. I still don't understand it, and I really don't feel we're at the answer, but I think this may be heading somewhere in the right direction.

Last edited:
I think I now what you're asking, but it's just a mathematical and terminological question.
Consider this example:

f:Rx[-1,1]x[-1,1] -> R f(x,y,z) = y + z,

g1: R -> [-1,1] g1(x)= sin(x)
g2: R -> [-1,1] g2(x) = cos(x)

denote y =g1(x) and z = g2(x) , f(x,g1(x),g2(x)) = f(x,y,z);

Now what you're trying to say is that you can write f(x) = sin(x) + cos(x) and now when you make the derivative you get something what is non-zero.

The problem is that you cannot write f(x)=sin(x)+cos(x) because f is a function of three variables and not just one. You can define a new function
h: R -> R h(x) = f(x,g1(x),g2(x))
and this is a function of one variable and the derivative is really non-zero. But $$\frac{\partial f}{\partial x}$$ remains zero forever.

Does this make more sense?

Last edited:
Think of it this way: The Lagrangian (and, hence, the action) is something that you can calculate for any trajectory a particle could possibly take. That is to say, if you pick any old function of time and plug that in for q, you will find some related function of time, L(t), and it's time integral, S, will just be some number. In general this function of time will be different for different functions q(t). This is what is meant by implicit time dependence.

Then, we can say that the physical trajectory is that one for which the value of S is the smallest. So, we use this to pick out one specific trajectory - that is, one specific function q(t) - that represents the actual physical motion.

f is a function of three variables and not just one.

Okay, thanks. I think this clinched it for me and what you guys are saying now makes sense.

In other words, I'm forgetting that by definition of L, $$q$$ and $$\dot{q}$$ are independent variables. As Parlyne explains, this is the whole point of Lagrangian mechanics: looking at different paths by varying possible ($$q$$,$$\dot{q}$$,t) trajectories. If I start saying that $$q$$ and $$\dot{q}$$ depend on $$t$$, then I'm completely ignoring the notion that $$q$$ and $$\dot{q}$$ are independently variable quantities.

So we must have:
$$\frac{\partial}{\partial t}q=\frac{\partial}{\partial t}\dot{q}=0$$
since that's just what happens in mutivariable calculus when you try to take a partial derivative of one independent variable with respect to another.

Okay thanks, this is making a lot more sense now and seems consistent also with what cepheid has said.

Last edited:
sri sayye
At least I hope that's the end of it. Please let me know if it doesn't make sense.

The reason I say this is that there's one nagging thing. If $$q$$ is really truly independent of $$t$$, then why do we have $$\dot{q}=\frac{d}{dt}q$$?

An independent variable must have any partial derivative zero. But can we really have an independent variable with a nonzero total derivative?

Normally the chain rule is:

$$\frac{dz}{dt}=\frac{\partial z}{\partial x}\frac{dx}{dt}+\frac{\partial z}{\partial y}\frac{dy}{dt}$$

where z=f(x,y) is a differentiable function of x and y, and where x = g(t) and
y=h(t) are both differentiable functions of t. In other words, x and y do
depend on t. Otherwise I don't think we could ever take the derivatives with respect to t.

So I'm afraid I must have gone astray on my interpretation and am still confused.

Last edited:
Well, q depends on t, but you don't know how, which makes it an independent variable.
Lets say that you have
L = q + q'
q = t^2 + 5t
q' = 2t + 5
Now you cannot write L(t) = t^2 + 7t + 5 but you have to write
L(t^2 + 5t, 2t + 5, t) = t^2 + 7t + 5

Makes more sense?

Yes, I think I am now beginning to bend my brain around this.

I think my problem was that I was thinking of $$L$$ as the kind of function that you learn about in beginning-level multivariable calculus, i.e. the kind of environment where you'd encounter the chain rule statement that I mentioned in my last post. In that kind of an environment, the independent variables cannot be functions. In fact, if any variable turns out to be a function, then it is by definition not independent.

On the other hand, $$L$$ varies as a function of independent functions, not as a function of the independent points on a number line that I'm used to thinking of. So $$t$$ is a function of $$t$$, $$q$$ is a function of $$t$$ and $$\dot{q}$$ is a function of $$t$$.
But the dependence on $$t$$ of $$q$$ and $$\dot{q}$$ is entirely undetermined. Indeed, for all anyone knows, $$\dot{q}$$ may also end up being a function of $$q$$ and $$q$$ may end up being a function of $$\dot{q}$$. Who knows! I believe some people would call $$L$$ a functional (a word that I've heard thrown around but never actually studied or found a use for until now).

Okay yes this finally seems to make sense.
Let me know if it doesn't.
Thanks.

Last edited:
Well I think you got the concept, but what you wrote is not allright.

L is a normal function which you encountered in multivariable calculus. It's a function from (R^3 x R^3 x R) to R. q is a function from R -> R^3 and so is q'.

The core of the chain rule is the fact, that the function is in fact a composite function, which is our case (L = L(q(t), q'(t), t)).

The point is that q, q' and t act as independent in the function L, because
L:R^3 x R^3 x R -> R so you can compute L in any point from R^7.

The function L doesn't care wheather q or q' has any kind of dependence on t, you just throw in the point in which you want to compute L and you get the solution. So from the L point of view this variables are independent and so if L doesn't depend on L explicitely (i.e. L is somtething like L(q,q',t) = q + q'^2), then $$\frac{\partial L}{\partial t} = 0$$.

BTW functional is something quite different. It's a function from the space of functions to R. An example of a functional is the definite integral for example (it takes some function to the area under the graph of this function).

aihere
I understand that if cannot depend explicitly on time then its partial derivative with respect to time is necessarily zero:

Yes, thats true. But the partial of L w.r.t. time is zero, but d\dt of L is the TOTAL derivative w.r.t time.

$$\frac{\partial}{\partial t}L=0$$

$$\frac{dL}{dt}=\frac{\partial L}{\partial q_1}\frac{dq_1}{dt}+\frac{\partial L}{\partial q_n}\frac{dq_n}{dt}+\frac{\partial L}{\partial t}$$

What its saying is that the very last term of above is always zero, not the entire expression.

This makes sense because L is defined as T-V. But T (Kinetic Energy) and (V) potential energy are not explicit functions of time themselves, therefore L cant be explicit in time either. However, the $$\dot{x}$$ is an indirect function of time because its changing with time. So you would keep derviatives of things like $$\frac{dq_1}{dt}=\dot{x}$$

Last edited:
davidbenari and aihere
$$\dot{q}$$ is clearly the total derivative of $$q$$ with respect to time.

$$\dot{q}$$ and $$q$$ are independent generalized coordinates, so they are only going to vary with time. So, yes it is the total derivative w.r.t. time.

But it seems to me that we can arrive at an equation for $$q$$ that can depend explicitly on time.

No, you can't. Thats why we use the Lagrange equations to derive the equations of motion and do a numerical integration on the generalized coordinates. In general, you cant find that explicit function of time for the q's. They are the spatial variables you will solve for in the numerical integration.

In other words, what I'm saying is that the particle's position will have some dependence on time, and we can express that dependence in an explicit manner, not to me a very astonishing idea since that's what much of freshman physics is about.

No, thats what I disagree with.

But $$L$$ depends explicitly on $$q$$ since the first term in the second equation above is nonzero.

Of course.

So if $$L$$ depends explicitly on $$q$$ and $$q$$ can be expressed explicitly in terms of time, then why can we not just plug the equation for $$q$$ in terms of $$t$$ into the expression for $$L$$ and then take a nonzero partial time derivative of $$L$$?

Because you will never know that explicit equation. If you did, why are you doing Lagranges method when you already have the answers?

In general, you will get equations of motion that are coupled and a convoluted mess. You wont be able to find any explicit functions of time for each q, or any q.

Last edited:
Thanks r4nd0m for taking the time to offer those clarifications. In any case, as you say, I think I got it straightened out or at least have it at a point where I am comfortable with it. Thanks again for the insight.

For the sake of the argument, let us entertain your question 1.

I will consider the simple freshman case where a ball is thrown up into the air.

Clearly, in this system we have only a change in the height given by the classical formula:

$$y=y_0+V_0t+\frac{1}{2}at^2$$

Now, we define the lagrangian as:

$$L=T-V$$

We can then substitute in values such that:

$$L=\frac{1}{2}m(V_0+gt)^2 - mg(y+V_0t+\frac{1}{2}gt^2)$$

We now take the derivative of the lagrangian as I described to you earlier using the partials. Now, all the partials of the spatial variables dissapear and we ONLY have an explicit derivative w.r.t time.

Performing the derivative and using the chain rule for T we obtain :

$$\frac{dL}{dt} = m*(V_0+gt)*g - m*g*(V_0 + gt) =0$$

Indeed, the partial of L w.r.t t is zero, as Marion claims it to be.

But this was all a big waste of time, because the lagrangian is useful for cases where we dont know the functional dependence of the generalized coordinates!

There is a physical significance to this statement as well. If we consider the variation of the energy and the explicit time equation we are stating the following:

$$\delta L= \delta T - \delta V =0$$

Or:

$$\delta T = \delta V$$

This says that the variation of the kinetic energy is equal to the variation of the potential energy, i.e. that energy in your system with no outside forces is conserved.

Last edited:
aihere
Indeed, the partial of L w.r.t t is zero, as Marion claims it to be.
Interesting! So at least in the case of this specific solution that has time dependence explicitly stated, $$\frac{\partial}{\partial t}L$$ does disappear! Thanks cyrusabdollahi for pointing that out.

In fact, before taking the partial derivative, if we just expand your expression for L we get:

$$L=\frac{1}{2}m(V_0+gt)^2 - mg(y_0+V_0t+\frac{1}{2}gt^2)=\frac{1}{2}mV_0^2-mgy_0$$

which does not contain t explicitly. Now looking at that result it seems like it could not have been any other way.

I have to take off right away, but I'll look through the other things you mentioned as well.

Last edited: