# Hamilton's Principle - achieving Hamilton equations

Consider the action function:

$$\mathcal{S}(t)=\int_{t_1}^{t_2}\mathcal{L}(q_i,\dot{q_i},t) dt$$

where $\mathcal{L}$ is the Lagrangian of the system.

The Hamiltonian is defined by the following expression:

$$\mathcal{H(q_i,p_i,t)}=\dot{q_i}p_i-\mathcal{L}(q_i,\dot{q_i},t)$$

So we have,

$$\mathcal{S}(t)=\int_{t_1}^{t_2}\left[\dot{q_i}p_i-\mathcal{H}(q_i,{p_i},t)\right] dt$$

The Hamilton's Priciple says that $\delta\mathcal{S}=0$.

So we have,

$$\delta\mathcal{S}(t)=\int_{t_1}^{t_2}\left[\delta(\dot{q_i}p_i)-\delta\mathcal{H}(q_i,{p_i},t)\right] dt$$

I found on Goldstein 3rd edition that they considered the next step as

$$\delta\mathcal{S}(t)=\int_{t_1}^{t_2}\left(\delta\dot{q_i}p_i+\dot{q_i}\delta p_i- \frac{\partial\mathcal{H}}{\partial q_i}\delta q_i - \frac{\partial\mathcal{H}}{\partial p_i}\delta p_i \right)dt$$

1. Didn't they miss the $\frac{\partial\mathcal{H}}{\partial t}\delta t$ term resulting from $\delta\mathcal{H}$?

2. One more question: Is it true that $\frac{d}{dt}(\delta q_i)=\delta \dot{q_i}$?

1. No, there is usually no variation of the independent coordinates (in this case: the time coordinate $t$), when deriving Euler-Lagrange equations. Only the dependent variables (in this case: $q^i(t)$ and $p_i(t)$) are varied.

2. Yes, $\frac{d}{dt}(\delta q^i)=\delta \dot{q^i}$, see e.g. this Phys.SE post, which also discusses situations, where it's not the case.

• 1. is only true if the lagrangian or hamiltonian does not depend explicitly on time/whatever parameter. Jun 2 '15 at 20:52
• The Euler-Lagrange eqs. (for OP's last action functional) are still Hamilton's eqs. even if the Hamiltonian depends explicitly on $t$. Jun 2 '15 at 23:34

The derivation should work even for time dependent Hamiltonians. The issue is that we are not considering variations of the time parameterization, so $\delta t = 0$.

You are correct that $\delta \dot q = \frac{d}{dt}\delta q$. Basically, the variation operation is defined in terms of a derivative, so it commutes with regular derivatives.

Old editions of Goldstein have a chapter on the calculus of variations as a mathematical tool, separate from physical applications. If that chapter still exists in your edition, you may want to review it.

• Just a note, I don't think your explanation concerning the second question is complete. Both the derivatives in question are total derivatives, and total derivates do not commute in general, only partials necessarily do. Some further justification is required for why these two in particular do. Jun 4 '15 at 7:26
• As you said in your answer the variation is parameterized independently of time, so the two derivatives commute. I left out the details, because the instructor in me hopes that OP will prove that for themself. Jun 7 '15 at 16:02

EDIT:

For the first part, after reading Goldstein's approach, it doesn't seem like he assumes that the Hamiltonian is generically time independent, i.e. $\frac{\partial \mathcal H}{\partial t}\neq 0$ in general. However, since we are performing our variation wrt to the "path", and it doesn't make sense for $t$ to have any dependence (implicit or explicit) on the path, so its variation must be $\delta t=0$. (In the standard derivation, we consider a perturbation $\epsilon \eta (t)$ to the path with appropriate boundary conditions and vary wrt to $\epsilon$, clearly we must have $\frac{\delta t}{\delta \epsilon}=0$.)

For the second part, since we are varying $\mathcal S$ wrt the path, and this is completely independent of the derivative with respect to $t$, the two derivatives commute and the expression you have stated is true. (In the standard derivation, we vary wrt to $\epsilon$ but that's not essential - what is is that a variation wrt the path, however we might "parametrize" this variation, is independent of a derivative wrt time at a conceptual level).

• I'm pretty sure that what OP says in the second question is true. The Lagrangian is a function of the coordinates and velocities but the action is a functional of the path, and on the whole path you can't vary $q$ and $\dot{q}$ independently. Jun 2 '15 at 19:52
• You can see Goldstein's approach at David Tong's notes (page 87)damtp.cam.ac.uk/user/tong/dynamics/clas.pdf Jun 2 '15 at 19:52
• @Javier you're absolutely right, I realized that when I thought about what we're varying with respect to, and have edited my answer accordingly. Jun 2 '15 at 19:54