# Lagrangian question. ability to remove time derivative terms.

1. Aug 5, 2008

### Peeter

In the solution of a pendulum attached to a wheel problem, I was initially suprised to see that a term of the form:

$$\frac{df}{dt}$$

"can be removed from the Lagrangian since it will have no effect on the equations of motion".

ie: $L' = L \pm df/dt$ gives identical results.

f in this case was cos(\omega t + \theta) where theta was the generalized coordinate.

I confirmed this for the cosine function in this example by taking derivatives, and then confirmed that this is in fact a pretty general condition, given two conditions:

1) equality of mixed partials:
$$\frac{\partial^2 f}{\partial t \partial q^i} = \frac{\partial^2 f}{\partial q^i \partial t}$$

2) no dependence on velocity coordinates for time partial derivative:

$$\frac{\partial^2 f}{\partial \dot{q}^i \partial t} = 0$$

Does this ability to add/remove time derivatives of functions from the Lagrangian that aren't velocity dependent have a name?

2. Aug 5, 2008

### jostpuur

I don't think everything you are writing here is making sense.

I see that this is true if the $$f$$ is a function of the coordinates, like $$f(q)$$. However, if you set it to be a function of the velocities too, like $$f(q,\dot{q})$$, which seems to be the case since you are calculating a partial derivative

you are going to get an expression

$$\frac{df}{dt} = \frac{\partial f}{\partial q_i}\dot{q}_i + \frac{\partial f}{\partial \dot{q}_i} \ddot{q}_i$$

What are you going to do with the $$\ddot{q}_i$$ in the Lagrange's function, which is supposed to be a function of $$(q,\dot{q})$$ only?

3. Aug 5, 2008

### Peeter

Sorry, that's exactly what I implied, $f = f(q^1, ... q^n, t)$ only, and not of any of the $\dot{q}^i$ velocities. (ie: functions like the cos(wt + theta) of the example).

For functions like that you can add or substract arbitrary time derivatives (given the mixed partial equality) just like you can add or subtract constants. Is that considered too obvious to be a named property (it wasn't to me;)

4. Aug 5, 2008

### jostpuur

I don't know if there is some specific name for this property, but it would be justified to say that the equations of motion are invariant under some class of transformations of the Lagrange's function, $$L\mapsto L + df/dt$$. So if you insist on getting some fancy word into this thing, I would suggest the invariance

Another thing: Are you sure that it is allowable to let f depend explicitly on time? I just proved this result quickly for the case $$f(q)$$, to see what's going on, but I hit some problems when trying to do the same for $$f(q,t)$$. It could that I didn't put enough time into it yet, though...

5. Aug 6, 2008

### Peeter

I was looking for a name, since I thought that would help remember it. Yes, I'm sure it is allowable for f(q, t). I can type up my notes on this later if you want.

6. Aug 6, 2008

### jostpuur

I see this now. I must have made a mistake with my previous calculations.

7. Aug 6, 2008