# Adding a time derivative to Lagrangian effect on the Hamiltonian

## Homework Statement

This is derivation 2 from chapter 8 of Goldstein:

It has been previously noted that the total time derivative of a function of $q_i$ and $t$ can be added to the Lagrangian without changing the equations of motion. What does such an addition do to the canonical momenta and the Hamiltonian? Show that the equations of motion in terms of the new Hamiltonian reduce to the original Hamilton's equations of motion.

## Homework Equations

Euler-Lagrange equations:
$$\frac{\mathrm{d}}{\mathrm{d} {t}} \Big(\frac{\partial L}{\partial \dot{q}_i}\Big) = \frac{\partial L}{\partial q_i}$$
Hamilton's equations:
$$\frac{\partial H}{\partial p_i} = \dot{q}_i$$
$$\frac{\partial H}{\partial q_i} = -\dot{p}_i$$

## The Attempt at a Solution

[/B]
Let $$L' = L + \frac{\mathrm{d} F}{\mathrm{d} t}$$ where $F = F(\vec{q}, t)$
$$L' = L + \frac{\partial F}{\partial q_k} \dot{q}_k + \frac{\partial F}{\partial t}$$
$$p_i' = \frac{\partial L'}{\partial \dot{q}_i} = p_i + \frac{\partial F}{\partial q_i}$$
$$H' = p'_i \dot{q}_i - L' = p_i \dot{q}_i - L - \frac{\partial F}{\partial t} = H - \frac{\partial F}{\partial t}$$
$$\frac{\partial H'}{\partial p_j '} = \frac{\partial H'}{\partial p_k}\frac{\partial p_k}{\partial p_j'} = \frac{\partial H}{\partial p_j} = \dot{q}_j$$
$$\frac{\partial H'}{\partial q_j} = \frac{\partial H}{\partial q_j} - \frac{\partial ^2 F}{\partial q_j \partial t} = -\dot{p}_j - \frac{\partial ^2 F}{\partial q_j \partial t}$$
But
$$\dot{p}'_j = \dot{p}_j + \frac{\mathrm{d}}{\mathrm{d} t} \Big( \frac{\partial F}{\partial q_j} \Big) = \dot{p}_j + \frac{\partial ^2 F}{\partial q_j \partial t} + \frac{\partial ^2 F}{\partial q_i \partial q_k} \dot{q}_k$$
so $$\frac{\partial H'}{\partial q_j} \neq -\dot{p}'_j$$
I feel like I am making a simple mistake here but I cannot spot it. Any help would be much appreciated.

Barek

Related Advanced Physics Homework Help News on Phys.org
TSny
Homework Helper
Gold Member
$$\frac{\partial H'}{\partial q_j} = \frac{\partial H}{\partial q_j} - \frac{\partial ^2 F}{\partial q_j \partial t} = -\dot{p}_j - \frac{\partial ^2 F}{\partial q_j \partial t}$$
On the left side, you want to consider the partial with respect to $q_j$ while keeping all of the $p'_k$'s and $t$ constant. So, the partials with respect to $q_j$ on the right side would also be keeping the $p'_k$'s and $t$ constant. That is, you have
$$\frac{\partial H'}{\partial q_j}|_{p'_k, t} = \frac{\partial H}{\partial q_j}|_{p'_k, t} - \frac{\partial ^2 F}{\partial q_j \partial t}$$ Note that the first term on the right is not equal to $-\dot{p}_j$.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
On the left side, you want to consider the partial with respect to $q_j$ while keeping all of the $p'_k$'s and $t$ constant. So, the partials with respect to $q_j$ on the right side would also be keeping the $p'_k$'s and $t$ constant. That is, you have
$$\frac{\partial H'}{\partial q_j}|_{p'_k, t} = \frac{\partial H}{\partial q_j}|_{p'_k, t} - \frac{\partial ^2 F}{\partial q_j \partial t}$$ Note that the first term on the right is not equal to $-\dot{p}_j$.
This is actually a common issue in many fields, in particular in thermodynamics with state variables, where one calls coordinates in different systems on the same manifold the same thing just because they share coordinate functions and therefore has to specify what is to be considered constant in the partial derivative. It bugged me out to no end as a freshman. Personally, I would instead write down the full coordinate transformation on phase space as $q_i' = q_i$ and $p_i' = \partial L'/\partial q_i'$.

On the left side, you want to consider the partial with respect to $q_j$ while keeping all of the $p'_k$'s and $t$ constant. So, the partials with respect to $q_j$ on the right side would also be keeping the $p'_k$'s and $t$ constant. That is, you have
$$\frac{\partial H'}{\partial q_j}|_{p'_k, t} = \frac{\partial H}{\partial q_j}|_{p'_k, t} - \frac{\partial ^2 F}{\partial q_j \partial t}$$ Note that the first term on the right is not equal to $-\dot{p}_j$.
That's what it was! It all works now, thank you!

Personally, I would instead write down the full coordinate transformation on phase space as $q_i' = q_i$ and $p_i' = \partial L'/\partial q_i'$.
Thanks! That really helped. We have thermodynamics next year so I'll try not to make the same mistake again!