# Physical equivalence of Lagrangian under addition of dF/dt

1. Feb 18, 2012

### Favicon

1. The problem statement, all variables and given/known data

This isn't strictly a homework question as I've already graduated and now work as a web developer. However, I'm attempting to recover my ability to do physics (it's been a few months now) by working my way through the problems in Analytical Mechanics (Hand and Finch) in my free time and have got stuck on a question about physically invariant Lagrangians. I understand that the Lagrangian of a physical system is not unique because there are many Lagrangians for which the Euler-Lagrange equations reduce to the same thing.

The question I can't solve asks for a proof that the Euler-Lagrange (EL) equations are unchanged by the addition of $dF/dt$ to the Lagrangian, where $F \equiv F(q_1, ..., q_2, t)$.

2. Relevant equations

Euler-Lagrange equations: $\frac{d}{dt}\frac{∂L}{∂\dot{q_k}} - \frac{∂L}{∂q_k} = 0$

Change of Lagrangian $L \rightarrow L' = L + \frac{dF}{dt}$

Chain rule: $\frac{dF}{dt} = \sum\limits_k{\frac{∂F}{∂q_k}\frac{∂q_k}{∂t}}$

3. The attempt at a solution

I guess the solution is to substitute the new Lagrangian, $L'$, into the EL equations and somehow show that it reduces to exactly the EL equations for $L$. The substitution gives:

$\frac{d}{dt}\frac{∂}{∂\dot{q_k}}\left(L + \frac{dF}{dt}\right) - \frac{∂}{∂q_k}\left(L + \frac{dF}{dt}\right) = 0$

This can be rewritten as:

$\left(\frac{d}{dt}\frac{∂L}{∂\dot{q_k}} - \frac{∂L}{∂q_k}\right) + \left(\frac{d}{dt}\frac{∂}{∂\dot{q_k}}\frac{dF}{dt} - \frac{∂}{∂q_k}\frac{dF}{dt}\right) = 0$

where the first set of bracketed terms are just the left hand side of the EL equation in L. Therefore, I now need to show that the other bracketed terms equate to zero also. i.e.

$\frac{d}{dt}\frac{∂}{∂\dot{q_k}}\frac{dF}{dt} - \frac{∂}{∂q_k}\frac{dF}{dt} = 0$

All I can think of to try next is apply the chain rule to the differentiation of $F$ and then hope that everything cancels nicely.

Applying the chain rule gives:

$\frac{d}{dt}\frac{∂}{∂\dot{q_k}}\frac{∂F}{∂q_k} \frac{∂q_k}{∂t} + \frac{∂}{∂q_k}\frac{∂F}{∂q_k}\frac{∂q_k}{∂t} = 0$

So I guess my proof works if $\frac{d}{dt}\frac{∂}{∂\dot{q_k}} = \frac{d}{dt}\frac{∂}{∂q_k/∂t}$ is equivalent to $\frac{∂}{∂q_k}$. Is this correct? I feel like you can't just cancel the $dt$ and $∂t$ like this, but I can't see how else this proof can be done.

2. Feb 18, 2012

### ehild

Correctly: $$\frac{dF}{dt} = \sum\limits_k{\frac{∂F}{∂q_k}\frac{dq_k}{dt}}+ \frac {∂F}{∂t}$$,

that is

$$\frac{dF}{dt} = \sum\limits_k{\frac{∂F}{∂q_k}\dot q_k}+ \frac {∂F}{∂t}$$

Correct.

Substitute equation $\frac{dF}{dt} = \sum\limits_k{\frac{∂F}{∂q_k}\dot q_k}+ \frac {∂F}{∂t}$ for dF/dt, derive it with respect of $\dot q_k$ and apply chain rule again when determining the time derivative.

ehild

3. Feb 18, 2012

### genericusrnme

You can do it without going all that dirty work by looking at the action

$S=\int L dt = \int (L' + \frac{dF}{dt})dt$

That method seems much neater to me

Mod note: removed remaining steps.

Last edited by a moderator: Feb 18, 2012
4. Feb 18, 2012

### ehild

Yes, the variation of F disappears between the endpoints of the path... That was as we learnt, but it works with the derivatives, too.

5. Feb 21, 2012

### Favicon

Indeed, I was aware of the action as the simpler way to prove it, but I wanted to do it with derivatives too as the book I'm working from doesn't discuss action until later on. Thought it made a good exercise in partial differentiation and chain rule, which it seems I needed! In fact I'm still struggling a little. Applying the chain rule gives me:

$\frac{d}{dt}\frac{\partial}{\partial \dot{q_k}}\frac{dF}{dt} = \left(\frac{\partial^2 F}{\partial q_k^2} + \frac{\partial^3F}{\partial q_k \partial \dot{q_k}\partial q_k} + \frac{\partial^3F}{\partial q_k\partial \dot{q_k}\partial t}\right) \dot{q_k} + \frac{\partial^2F}{\partial t\partial q_k} + \frac{\partial^3 F}{\partial t\partial\dot{q_k}\partial q_k} + \frac{\partial^3F}{\partial t\partial\dot{q_k}\partial t}$

and

$\frac{\partial}{\partial q_k}\frac{dF}{dt} = \frac{\partial}{\partial q_k}\left(\frac{\partial F}{\partial q_k}\dot{q_k} + \frac{\partial F}{\partial t}\right)$

Now, it seems to me that the only way this doesn't end with a lot of second and third order partial derivatives that don't cancel out is if I've got a sign wrong. For instance, if the chain rule had a minus $\frac{\partial F}{\partial t}$ at the end instead of plus, then I think everything would cancel out perfectly with each of the above becoming equal to zero, as required. But I don't think the chain rule should have a negative term like that.

Have I missed something?

6. Feb 22, 2012

### ehild

Have you read my post #2?

$$\frac{dF}{dt} = \sum\limits_k{\frac{∂F}{∂q_k}\dot q_k}+ \frac {∂F}{∂t}$$

First determine he derivative of dF/dt with respect to one of the velocity components, $\dot q_j$
As F itself does not depend on the velocities,
$$\frac{\partial}{\partial \dot q_j}\frac{dF}{dt}=\frac{∂F}{∂q_j}$$

Then take the time derivative of $\frac{\partial}{\partial \dot q_j}\frac{dF}{dt}=\frac{∂F}{∂q_j}$:
$$\frac{d}{dt} ( \frac{∂F}{∂q_j} )$$

and you have to subtract $\frac{∂}{∂q_j}\frac{dF}{dt}$ at the end.

ehild

7. Feb 22, 2012

### Favicon

Ah ha, it was the $\frac{\partial }{\partial \dot{q_j}}\frac{dF}{dt} = \frac{\partial F}{\partial q_j}$ that I missed. That got rid of all the 3rd order derivatives, leaving only 2nd order one's which all cancel each other out in the end. Thanks very much for the help ehild!

8. Feb 22, 2012

### ehild

It was a great battle that ended well...

ehild