Skip to main content
edited tags
Link
sammy gerbil
  • 27.5k
  • 6
  • 35
  • 72
edited format
Source Link
TheVal
  • 202
  • 1
  • 12

As a sort of follow-up from my previous question, I'd like to point out two derivations of Hamilton's third relation that lead to two different results. Clearly there is a mistake within the process, but I can't figure out where does it lie.

The first attempt is the same used by my other classmates, and it states that if the Hamiltonian is the Legendre Transform of the Lagrangian, then by taking the total differential of both sides we can match each partial derivative that multiplies a common total differential. The pairing between each term gives the Three Hamilton's Relations at a stroke.

Writing down the Legendre Transform of $H=H(q,p,t)$, in this case it should be written as $H=H(q_1,\ldots,q_N,p_1,\ldots,p_N,t)$ but $N=1$ degree of freedom is assumed without loss of generality. The Hamiltonian of the system is then: $$ H=p\dot q-L $$ taking the exact differential from both sides yields: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\mathrm{d}L $$ but here $L=L(q,\dot q,t)$ so the Lagrangian total differential is equal to: $$ \mathrm{d}L=\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\mathrm{d}q+\left(\frac{\partial L}{\partial\dot q}\right)_{q,t}\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ since by definition the canonical momentum $p$ is defined as $(\partial_{\dot q}L)_{q,t}$, it wouldn't have been possible to write down the first equation without this definition. Using the Euler Equation on the first partial derivative, we obtain: $$ \mathrm{d}L=\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot p\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ substituting back the last equation to the second equation we get: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\dot p\mathrm{d}q-p\mathrm{d}\dot q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot q\mathrm{d}p-\dot p\mathrm{d}q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ So far, so good, now we only need to write down the explicit exact differential of the Hamiltonian and check the differentials between the expressions: $$ \begin{align} \mathrm{d}H&=\left(\frac{\partial H}{\partial q}\right)_{p,t}\mathrm{d}q&+&\left(\frac{\partial H}{\partial p}\right)_{q,t}\mathrm{d}t&+&\left(\frac{\partial H}{\partial t}\right)_{q,p}\mathrm{d}t\\ &=\qquad\dot p\mathrm{d}q&-&\qquad\dot q\mathrm{d}p&-&\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t \end{align} $$ then three Hamilton Relations can be obtained: $$ \left(\frac{\partial H}{\partial q}\right)_{p,t}=\dot p\quad ;\quad \left(\frac{\partial H}{\partial p}\right)_{q,t}=-\dot q\quad ;\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The second derivation is faster, because instead of taking the total differential from both sides of the Legendre Transform, we take the total time derivative: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\frac{\mathrm{d}L}{\mathrm{d}t} $$ then by expanding the total time derivative of the Lagrangian, and apply the same definitions as before: $$ \frac{\mathrm{d}L}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\frac{\mathrm{d}q}{\mathrm{d}t}+\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\frac{\mathrm{d}\dot q}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\dot p\dot q+p\ddot q $$ but $\dot p\dot q+p\ddot q = \mathrm{d}(p\dot q)/\mathrm{d}t$, so substituting back the last equation to the total time differential one, we get: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\dot p\dot q-p\ddot q=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t} $$ so the last, third Hamilton relation is: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\quad\text{is different from}\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The final question is: arewhy these methods give different results correct? If notone of them is incorrect, where is the mistake? This is from a second-year course in Engineering Physics, but adding points to clarifications andpoint out the catch in depth sources willmy reasoning would be greatly appreciated.

As a sort of follow-up from my previous question, I'd like to point out two derivations of Hamilton's third relation that lead to two different results. Clearly there is a mistake within the process, but I can't figure out where does it lie.

The first attempt is the same used by my other classmates, and it states that if the Hamiltonian is the Legendre Transform of the Lagrangian, then by taking the total differential of both sides we can match each partial derivative that multiplies a common total differential. The pairing between each term gives the Three Hamilton's Relations at a stroke.

Writing down the Legendre Transform of $H=H(q,p,t)$, in this case it should be written as $H=H(q_1,\ldots,q_N,p_1,\ldots,p_N,t)$ but $N=1$ degree of freedom is assumed without loss of generality. The Hamiltonian of the system is then: $$ H=p\dot q-L $$ taking the exact differential from both sides yields: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\mathrm{d}L $$ but here $L=L(q,\dot q,t)$ so the Lagrangian total differential is equal to: $$ \mathrm{d}L=\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\mathrm{d}q+\left(\frac{\partial L}{\partial\dot q}\right)_{q,t}\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ since by definition the canonical momentum $p$ is defined as $(\partial_{\dot q}L)_{q,t}$, it wouldn't have been possible to write down the first equation without this definition. Using the Euler Equation on the first partial derivative, we obtain: $$ \mathrm{d}L=\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot p\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ substituting back the last equation to the second equation we get: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\dot p\mathrm{d}q-p\mathrm{d}\dot q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot q\mathrm{d}p-\dot p\mathrm{d}q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ So far, so good, now we only need to write down the explicit exact differential of the Hamiltonian and check the differentials between the expressions: $$ \begin{align} \mathrm{d}H&=\left(\frac{\partial H}{\partial q}\right)_{p,t}\mathrm{d}q&+&\left(\frac{\partial H}{\partial p}\right)_{q,t}\mathrm{d}t&+&\left(\frac{\partial H}{\partial t}\right)_{q,p}\mathrm{d}t\\ &=\qquad\dot p\mathrm{d}q&-&\qquad\dot q\mathrm{d}p&-&\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t \end{align} $$ then three Hamilton Relations can be obtained: $$ \left(\frac{\partial H}{\partial q}\right)_{p,t}=\dot p\quad ;\quad \left(\frac{\partial H}{\partial p}\right)_{q,t}=-\dot q\quad ;\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The second derivation is faster, because instead of taking the total differential from both sides of the Legendre Transform, we take the total time derivative: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\frac{\mathrm{d}L}{\mathrm{d}t} $$ then by expanding the total time derivative of the Lagrangian, and apply the same definitions as before: $$ \frac{\mathrm{d}L}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\frac{\mathrm{d}q}{\mathrm{d}t}+\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\frac{\mathrm{d}\dot q}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\dot p\dot q+p\ddot q $$ but $\dot p\dot q+p\ddot q = \mathrm{d}(p\dot q)/\mathrm{d}t$, so substituting back the last equation to the total time differential one, we get: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\dot p\dot q-p\ddot q=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t} $$ so the last, third Hamilton relation is: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\quad\text{is different from}\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The final question is: are these results correct? If not, where is the mistake? This is from a second-year course in Engineering Physics, but adding points to clarifications and in depth sources will be greatly appreciated.

As a sort of follow-up from my previous question, I'd like to point out two derivations of Hamilton's third relation that lead to two different results. Clearly there is a mistake within the process, but I can't figure out where does it lie.

The first attempt is the same used by my other classmates, and it states that if the Hamiltonian is the Legendre Transform of the Lagrangian, then by taking the total differential of both sides we can match each partial derivative that multiplies a common total differential. The pairing between each term gives the Three Hamilton's Relations at a stroke.

Writing down the Legendre Transform of $H=H(q,p,t)$, in this case it should be written as $H=H(q_1,\ldots,q_N,p_1,\ldots,p_N,t)$ but $N=1$ degree of freedom is assumed without loss of generality. The Hamiltonian of the system is then: $$ H=p\dot q-L $$ taking the exact differential from both sides yields: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\mathrm{d}L $$ but here $L=L(q,\dot q,t)$ so the Lagrangian total differential is equal to: $$ \mathrm{d}L=\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\mathrm{d}q+\left(\frac{\partial L}{\partial\dot q}\right)_{q,t}\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ since by definition the canonical momentum $p$ is defined as $(\partial_{\dot q}L)_{q,t}$, it wouldn't have been possible to write down the first equation without this definition. Using the Euler Equation on the first partial derivative, we obtain: $$ \mathrm{d}L=\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot p\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ substituting back the last equation to the second equation we get: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\dot p\mathrm{d}q-p\mathrm{d}\dot q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot q\mathrm{d}p-\dot p\mathrm{d}q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ So far, so good, now we only need to write down the explicit exact differential of the Hamiltonian and check the differentials between the expressions: $$ \begin{align} \mathrm{d}H&=\left(\frac{\partial H}{\partial q}\right)_{p,t}\mathrm{d}q&+&\left(\frac{\partial H}{\partial p}\right)_{q,t}\mathrm{d}t&+&\left(\frac{\partial H}{\partial t}\right)_{q,p}\mathrm{d}t\\ &=\qquad\dot p\mathrm{d}q&-&\qquad\dot q\mathrm{d}p&-&\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t \end{align} $$ then three Hamilton Relations can be obtained: $$ \left(\frac{\partial H}{\partial q}\right)_{p,t}=\dot p\quad ;\quad \left(\frac{\partial H}{\partial p}\right)_{q,t}=-\dot q\quad ;\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The second derivation is faster, because instead of taking the total differential from both sides of the Legendre Transform, we take the total time derivative: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\frac{\mathrm{d}L}{\mathrm{d}t} $$ then by expanding the total time derivative of the Lagrangian, and apply the same definitions as before: $$ \frac{\mathrm{d}L}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\frac{\mathrm{d}q}{\mathrm{d}t}+\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\frac{\mathrm{d}\dot q}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\dot p\dot q+p\ddot q $$ but $\dot p\dot q+p\ddot q = \mathrm{d}(p\dot q)/\mathrm{d}t$, so substituting back the last equation to the total time differential one, we get: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\dot p\dot q-p\ddot q=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t} $$ so the last, third Hamilton relation is: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\quad\text{is different from}\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The final question is: why these methods give different results? If one of them is incorrect, where is the mistake? This is from a second-year course in Engineering Physics, but point out the catch in my reasoning would be appreciated.

Source Link
TheVal
  • 202
  • 1
  • 12

Derivation of Hamilton's Third Relation. Where is the mistake?

As a sort of follow-up from my previous question, I'd like to point out two derivations of Hamilton's third relation that lead to two different results. Clearly there is a mistake within the process, but I can't figure out where does it lie.

The first attempt is the same used by my other classmates, and it states that if the Hamiltonian is the Legendre Transform of the Lagrangian, then by taking the total differential of both sides we can match each partial derivative that multiplies a common total differential. The pairing between each term gives the Three Hamilton's Relations at a stroke.

Writing down the Legendre Transform of $H=H(q,p,t)$, in this case it should be written as $H=H(q_1,\ldots,q_N,p_1,\ldots,p_N,t)$ but $N=1$ degree of freedom is assumed without loss of generality. The Hamiltonian of the system is then: $$ H=p\dot q-L $$ taking the exact differential from both sides yields: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\mathrm{d}L $$ but here $L=L(q,\dot q,t)$ so the Lagrangian total differential is equal to: $$ \mathrm{d}L=\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\mathrm{d}q+\left(\frac{\partial L}{\partial\dot q}\right)_{q,t}\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ since by definition the canonical momentum $p$ is defined as $(\partial_{\dot q}L)_{q,t}$, it wouldn't have been possible to write down the first equation without this definition. Using the Euler Equation on the first partial derivative, we obtain: $$ \mathrm{d}L=\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot p\mathrm{d}q+p\mathrm{d}\dot q+\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ substituting back the last equation to the second equation we get: $$ \mathrm{d}H=\dot q\mathrm{d}p+p\mathrm{d}\dot q-\dot p\mathrm{d}q-p\mathrm{d}\dot q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t=\dot q\mathrm{d}p-\dot p\mathrm{d}q-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t $$ So far, so good, now we only need to write down the explicit exact differential of the Hamiltonian and check the differentials between the expressions: $$ \begin{align} \mathrm{d}H&=\left(\frac{\partial H}{\partial q}\right)_{p,t}\mathrm{d}q&+&\left(\frac{\partial H}{\partial p}\right)_{q,t}\mathrm{d}t&+&\left(\frac{\partial H}{\partial t}\right)_{q,p}\mathrm{d}t\\ &=\qquad\dot p\mathrm{d}q&-&\qquad\dot q\mathrm{d}p&-&\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\mathrm{d}t \end{align} $$ then three Hamilton Relations can be obtained: $$ \left(\frac{\partial H}{\partial q}\right)_{p,t}=\dot p\quad ;\quad \left(\frac{\partial H}{\partial p}\right)_{q,t}=-\dot q\quad ;\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The second derivation is faster, because instead of taking the total differential from both sides of the Legendre Transform, we take the total time derivative: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\frac{\mathrm{d}L}{\mathrm{d}t} $$ then by expanding the total time derivative of the Lagrangian, and apply the same definitions as before: $$ \frac{\mathrm{d}L}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\left(\frac{\partial L}{\partial q}\right)_{\dot q,t}\frac{\mathrm{d}q}{\mathrm{d}t}+\left(\frac{\partial L}{\partial \dot q}\right)_{q,t}\frac{\mathrm{d}\dot q}{\mathrm{d}t}=\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}+\dot p\dot q+p\ddot q $$ but $\dot p\dot q+p\ddot q = \mathrm{d}(p\dot q)/\mathrm{d}t$, so substituting back the last equation to the total time differential one, we get: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\dot p\dot q-p\ddot q=\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t}-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}-\frac{\mathrm{d}(p\dot q)}{\mathrm{d}t} $$ so the last, third Hamilton relation is: $$ \frac{\mathrm{d}H}{\mathrm{d}t}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q}\quad\text{is different from}\quad \left(\frac{\partial H}{\partial t}\right)_{p,q}=-\left(\frac{\partial L}{\partial t}\right)_{q,\dot q} $$ The final question is: are these results correct? If not, where is the mistake? This is from a second-year course in Engineering Physics, but adding points to clarifications and in depth sources will be greatly appreciated.