11

In the book of Goldstein, at page 337, while deriving the Hamilton's equations (canonical equations), he argues that

The canonical momentum was defined in Eq. (2.44) as $p_i = \partial L / \partial \dot q_i$; substituting this into the Lagrange equation (8.1), we obtain

$$ \dot p_i= \frac{\partial L}{\partial q_i} \tag{8.14}$$

so Eq. (8.13) can be written as

$$ dL = \dot p_i dq_i + p_id \dot q_i + \frac{\partial L}{\partial t}dt \tag{8.13′}$$

The Hamiltonian $H(q,p,t)$ is generated by the Legendre transformation

$$ H(q,p,t) = \dot q_i p_i - L(q, \dot q, t), \tag{8.15}$$

which has the differential

$$ dH = \dot q_i d p_i - \dot p_i d q_i - \frac {\partial L}{\partial t}, \tag{8.16} $$

where the term $p_i d \dot q_i$ is removed by the Legendre transformation. Since $dH$ can also be written as

$$ dH = \frac{\partial H}{\partial q_i}d q_i + \frac{\partial H}{\partial p_i}d p_i + \frac{\partial H}{\partial t}d t, \tag{8.17} $$

However, if $H$ is defined to be a function of $q,p,t$, then how can we define $H(q,p,t) = \dot q *p - L(q,\dot q,t)$, i.e $\dot q$ is not an argument of $H$ whereas it is in its definition.

Moreover, when he is taking the differential of $H$, he argues that $pd\dot q$ is removed, but he does not say why.

I mean mathematically speaking this whole argument is plan wrong, as far as I can see, so assuming that it is not the case, what am I missing in here ?

Our
  • 2,263
  • 4
    Before writing that the whole argument is plain wrong maybe you may take a look at Legendre transform. For example, you might start from https://physics.stackexchange.com/q/4384/ – GiorgioP-DoomsdayClockIsAt-90 May 01 '19 at 07:09
  • Possible duplicates:https://physics.stackexchange.com/q/307794/2451 , https://physics.stackexchange.com/q/105912/2451 , https://physics.stackexchange.com/q/4384/2451 and links therein. – Qmechanic May 01 '19 at 07:15
  • @GiorgioP As I've emphasised that mathematically speaking, so it's meaning does not matter in that respect; if it wrong mathematically, even meaningful it describes whole universe, if it is wrong mathematically, it is wrong mathematically. – Our May 01 '19 at 07:16
  • 4
    This answer of mine goes into detail about where all the function in Hamiltonian and Lagrangian mechanics live. – ACuriousMind May 01 '19 at 13:39

5 Answers5

21

However, if $H$ is defined to be a function of $q,p,t$, then how can we define $H(q,p,t) = \dot q *p - L(q,\dot q,t)$, i.e $\dot q$ is not an argument of $H$ whereas it is in its definition.

As usual in a Legendre transform, the above expression for $H$ should be understood as a shortened notation for $$ H(q,p,t) = \dot q(q,p,t) \cdot p-L(q,\dot q(q,p,t),t) $$ where $\dot q(q,p,t)$ is obtained by inverting the definition of $p$ $$ p = \frac{\partial L}{\partial \dot q}(q, \dot q, t) $$ to obtain the function $\dot q(q,p,t)$.

  • 1
    How do you know such an inverse exist ? An exist uniquely in a way that it does not change the underlying physics ? – Our May 01 '19 at 07:31
  • 5
    @onurcanbektas For nice Lagrangian because those are convex functions of $\dot q$. This is the typical situation. For not nice Lagrangians this is a separate issue. – GiorgioP-DoomsdayClockIsAt-90 May 01 '19 at 07:35
  • 2
    So, you are basically saying that the author is making assumptions without even saying (or maybe noticing), again. – Our May 01 '19 at 07:38
  • @onurcanbektas Indeed, but you could write a whole book on the non-convex case. – knzhou May 01 '19 at 10:50
  • @knzhou That cannot be an excuse for making assumption in your analysis and not stating it; there is nothing wrong in doing assumption, but there is heck a lot of problem not paying attention to what you are assuming. – Our May 01 '19 at 10:53
  • 3
    @onurcanbektas I do not disagree. If you want a mathematically proper presentation, you should try Arnold. Goldstein is mediocre in many ways. – knzhou May 01 '19 at 10:55
  • 3
    @onurcanbektas I agree that a better discussion (maybe in an appendix) of the issues elted to Legende transform could have been better than nothing. However I would not be too critic against Goldstein's choices. Nowadays, his book (in all its editions) can be seen as an excellent attempt to present in a contained way the core elements of Classical Mechanics as immediately useful for practical purposes. So, no differential geometry methods and no extensive discussion of many mathematical-physics issue. For them, there are tons of specialized literature or more comprehensive treatises. – GiorgioP-DoomsdayClockIsAt-90 May 01 '19 at 11:32
  • @GiorgioP I totally disagree with the second part of your comment: there is a clear distinction between being sloppy, and being elementary. In the latter case, if the derivation of a result contains complex ideas & tools, you explicitly state it, and give an intuitive argument (by also explicitly stating that the argument is for getting a feel about the result). – Our May 01 '19 at 12:26
  • @onurcanbektas the theshold between sloppiness and simplification is vague, subjective and, most important time dependent. My point is that even if Arnold's blames correctly the Landau&Lifshitz book on Mechanics for sloppiness, still L&L's book remains an excellent text. The same applies to Goldstein's book, in my opinion. – GiorgioP-DoomsdayClockIsAt-90 May 01 '19 at 12:52
  • 10
    "So, you are basically saying that the author is making assumptions without even saying (or maybe noticing), again." Welcome to physics @onurcanbektas – Jannik Pitt May 01 '19 at 12:58
  • 5
    So, you are basically saying that the author is making assumptions without even saying - No, the author is writing for Physicists, not Mathematicians. The former are expected to understand the shorthands, notations, and formulations used in their field. The latter, naturally, are generalists. Physics often reads like mathematics with an accent and some of its own patois vocabulary. If you're in that field you just understand what is meant. If you're trying to parse it as a native speaker of Mathematics it can seem, at first glance, to be missing things. – J... May 01 '19 at 19:51
  • @J... "If you're in that field you just understand what is meant": What if I'm not in that field, but trying to get into that field ? such as by being a student of physics ? Should I just try to read the mind of the author ? – Our May 03 '19 at 18:45
  • @J... If you don't tell me exactly what you are doing, how can I complete those prerequisites then ? I mean I'm supposed to understanding things without you explicitly telling, then why do we communicate at all ? Can't I just understand the things that you are telling me without actually you telling me ? – Our May 03 '19 at 20:34
  • @J... Ok, assume that I don't know the prerequisite (say it is the freshman mechanics that I don't know), and I'm willing to learn them: If I take a course on the required prerequisite, or read a book about it etc. ,i.e study that subject I don't know, and if you don't tell me what you are doing, assuming and thinking, how can I learn that subject (the prerequisite one) ? In your above comments, you not answering my questions, just diverting them. – Our May 04 '19 at 03:04
  • @J... Yes, but you are still not answering my question. – Our May 04 '19 at 10:24
  • @J... The real issue is worse than that, though -- I would bet most physics majors that read Goldstein's books don't pick up on what he's implicitly assuming, they would just not even notice there was an assumption at all. Incidentally, the point hidden here is not some obscure mathematical technicality. Dealing with it properly leads you to the whole field of constrained Hamiltonian systems, which underpins the whole Standard Model and plenty of applied physics. – knzhou May 04 '19 at 15:45
  • 2
    @knzhou I think that the your position is a little biased towards Analytic Mechanics as a preparation for Field Theory. It is true that there is an implicit assumption. but every Physics textbook on Mechanics makes even more important implicit assumptions. Do you know a textbook which explicitly states something about the analytic properties of the force as function of its arguments? How many physics major realize that there is an assumption about them and understand the consequences of such assumptions? And how many implicit assumptions go unnoticed in QM? – GiorgioP-DoomsdayClockIsAt-90 May 04 '19 at 16:35
16

$\boldsymbol{\S\:}\textbf{A. In General}$

enter image description here

Consider a real function $\:f\left(x\right)\:$ of a real variable $x \in \left[\alpha,\beta\right]$ with continuous 1st and 2nd derivatives. Suppose that its 2nd derivative is everywhere negative so that its graph in the $\:xy-$plane is as in Figure-01. From every point of the graph, we have a tangent line.

enter image description here

Now, the graph of the function could be sketched by the family of the tangent lines, see Figure-02. We say that this curve (graph) is the envelope of the family of the tangent lines. From this fact we note that we could define the function $\:f\left(x\right)\:$ by the family of its tangent lines. Indeed, as shown in Figure-03, if from the angle $\:\theta\:$ of any tangent line we know the point where this line intersects the $\:y-$axis, let $\:\boldsymbol{-}\omega\:$ (the minus sign used for future purposes), then we would have an equivalent definition of the function $\:f\left(x\right)$. So, we must have the function $\:\omega\left(\theta\right)$. For the domain of angle $\:\theta\:$ we have from Figure-03 as example

enter image description here

\begin{equation} \theta \in \left[\theta_1,\theta_2\right] \quad \text{where} \quad \theta_1\boldsymbol{=}\min{(\theta_\alpha,\theta_\beta)}\quad \text{and} \quad \theta_2\boldsymbol{=}\max{(\theta_\alpha,\theta_\beta)} \tag{A-01}\label{A-01} \end{equation}

Instead of using the angle $\:\theta\:$ we equally well use the variable $\:u\boldsymbol{=}\tan\theta\boldsymbol{=}\dfrac{\mathrm df}{\mathrm dx}$. For the domain of $\:u\:$ we have
\begin{equation} u \in \left[u_1,u_2\right] \quad \text{where} \quad u_1\boldsymbol{=}\min{(\tan\theta_\alpha,\tan\theta_\beta)}\quad \text{and} \quad u_2\boldsymbol{=}\max{(\tan\theta_\alpha,\tan\theta_\beta)} \tag{A-02}\label{A-02} \end{equation}

From Figure-03 we have \begin{equation} y\boldsymbol{+}\omega\boldsymbol{=}\tan\theta \cdot x\boldsymbol{=}u \cdot x \tag{A-03}\label{A-03} \end{equation} so \begin{equation} \boxed{\:\:\omega\left(u\right)\boldsymbol{=}u \cdot x\boldsymbol{-}f\left(x\right)\vphantom{\dfrac{a}{b}}\:\:} \tag{A-04}\label{A-04} \end{equation} Now looking in above equation it seems mathematically illogical the argument that the function $\:\omega\:$ doesn't depend on the variable $\:x\:$ and must we write \begin{equation} \omega\left(u,x\right)\stackrel{???}{\boldsymbol{=}}u \cdot x\boldsymbol{-}f\left(x\right) \tag{A-05}\label{A-05} \end{equation} But this is not this case here because from \eqref{A-04} \begin{equation} \dfrac{\partial\omega}{\partial x}\boldsymbol{=}u \boldsymbol{-}\dfrac{\partial f}{\partial x}\boldsymbol{=}\dfrac{\mathrm df}{\mathrm dx} \boldsymbol{-}\dfrac{\mathrm df}{\mathrm dx}\boldsymbol{=}0 \tag{A-06}\label{A-06} \end{equation} that is $\:\omega\:$ is independent of $\:x$. It depends only on $\:u\:$ that's why we write $\:\omega\left(u\right)$.

enter image description here

In Figure-04 this fact is explained graphically : Suppose that a value $\:u\in \left[u_1,u_2\right]\:$ is given. This is like to give a direction, that is a line $\:\varepsilon\:$ at an angle $\:\phi\boldsymbol{=}\arctan(u)$. We find a unique line $\:\varepsilon_t\:$ tangent to the curve-graph of $\:f\left(x\right)\:$ and parallel to $\:\varepsilon\:$ which intersects the $\:y-$axis at $\:\boldsymbol{-}\omega(u)$. Beyond the value of the independent variable $\:u\:$ there is no need of any value of $\:x$. To the contrary, this value of $\:x\:$ is determined underground automatically from the contact point of the tangent line $\:\varepsilon_t\:$ with the graph.

We call the function $\:\omega\left(u\right)\:$ the Legendre transform of the function $\:f\left(x\right)\:$ with respect to the variable $\:x$.

Note that differentiating \eqref{A-04} with respect to $\:u\:$ we have \begin{equation} x\boldsymbol{=}\dfrac{\mathrm d\omega\left(u\right)}{\mathrm du} \tag{A-07}\label{A-07} \end{equation} So, the function $\:f\left(x\right)\:$ and its Legendre transform with respect to $\:x\:$, that is the function $\:\omega\left(u\right)$, fulfill the following set of equations \begin{align} f\left(x\right) \boldsymbol{+}\omega\left(u\right) & \boldsymbol{=}u \cdot x \tag{A-08a}\label{A-08a}\\ u & \boldsymbol{=}\dfrac{\mathrm df\left(x\right)}{\mathrm dx} \tag{A-08b}\label{A-08b}\\ x & \boldsymbol{=}\dfrac{\mathrm d\omega\left(u\right)}{\mathrm du} \tag{A-08c}\label{A-08c} \end{align}

If in above equations we interchange the roles as follows \begin{align} f & \boldsymbol{\rightleftarrows} \omega \tag{A-09a}\label{A-09a}\\ x & \boldsymbol{\rightleftarrows} u \tag{A-09b}\label{A-09b} \end{align} then equations \eqref{A-08a},\eqref{A-08b} and \eqref{A-08c} give respectively \begin{align} \omega\left(u\right)\boldsymbol{+} f\left(x\right)& \boldsymbol{=}x \cdot u \tag{A-10a}\label{A-10a}\\ x & \boldsymbol{=}\dfrac{\mathrm d\omega\left(u\right)}{\mathrm du} \tag{A-10b}\label{A-10b}\\ u & \boldsymbol{=}\dfrac{\mathrm df\left(x\right)}{\mathrm dx} \tag{A-10c}\label{A-10c} \end{align}

But this set of equations is identical to that of (A-08) : The function $\:f\left(x\right)\:$ is the Legendre transform of $\:\omega\left(u\right)$ with respect to $\:u$. That is application of two successive Legendre transformations returns the initial function.


$\boldsymbol{\S\:}\textbf{B. Classical Mechanics - Lagrange and Hamilton functions}$

In Classical Mechanics the Euler-Lagrange equation of motion for one degree of freedom is \begin{equation} \dfrac{\mathrm d}{\mathrm d t}\left(\dfrac{\partial L}{\partial\dot q}\right)\boldsymbol{-}\dfrac{\partial L}{\partial q}\boldsymbol{=}0 \tag{B-01}\label{B-01} \end{equation} where \begin{align} L\left(q,\dot q,t\right) & \boldsymbol{\equiv}\text{the Lagrange function} \tag{B-02a}\label{B-02a}\\ q & \boldsymbol{\equiv}\text{the generalized coordinate} \tag{B-02b}\label{B-02b}\\ \dot q & \boldsymbol{\equiv}\dfrac{\mathrm d q}{\mathrm d t} \tag{B-02c}\label{B-02c} \end{align} For the Legendre transform of the Lagrange function $\:L\left(q,\dot q,t\right)\:$ with respect to the independent variable $\:\dot q\:$ we replace all Variables, Functions and Differential Operators in $\:\boldsymbol{\S\:}\textbf{A}\:$ as follows \begin{align} \text{Variables}\:\:\: : \:\:\:& \left. \begin{cases} x\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} \dot q\\ u\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} p \end{cases}\right\} \tag{B-03a}\label{B-03a}\\ \text{Functions}\:\:\: : \:\:\:& \left. \begin{cases} f\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} L\\ \omega\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} H \end{cases}\right\} \tag{B-03b}\label{B-03b}\\ \text{Operators}\:\:\: : \:\:\:& \left. \begin{cases} \dfrac{\mathrm d \hphantom{x}}{\mathrm d x}\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} \dfrac{\partial \hphantom{x}}{\partial \dot q}\vphantom{\dfrac{a}{\dfrac{a}{b}}}\\ \dfrac{\mathrm d \hphantom{u}}{\mathrm d u}\!\!\! &\!\!\! \boldsymbol{-\!\!\!-\!\!\!-\!\!\!\rightarrow} \dfrac{\partial \hphantom{p}}{\partial p} \end{cases}\right\} \tag{B-03c}\label{B-03c} \end{align} Equations \eqref{A-08a},\eqref{A-08b} and \eqref{A-08c} give respectively \begin{align} H\left(q,p,t\right)\boldsymbol{+} L\left(q,\dot q,t\right) & \boldsymbol{=}p\,\dot q \tag{B-04a}\label{B-04a}\\ p & \boldsymbol{=}\dfrac{\partial L\left(q,\dot q,t\right)}{\partial \dot q} \tag{B-04b}\label{B-04b}\\ \dot q & \boldsymbol{=}\dfrac{\partial H\left(q,p,t\right)}{\partial p} \tag{B-04c}\label{B-04c} \end{align} So the Legendre transform of the Lagrange function $\:L\left(q,\dot q,t\right)\:$ with respect to the independent variable $\:\dot q\:$ is the Hamilton function $\:H\left(q,p,t\right)\:$, where from \eqref{B-04a} \begin{equation} H\left(q,p,t\right) \boldsymbol{=}p\,\dot q\boldsymbol{-} L\left(q,\dot q,t\right) \tag{B-05}\label{B-05} \end{equation} In the spirit of the discussion in $\:\boldsymbol{\S\:}\textbf{A}\:$ the Hamilton function $\:H\left(q,p,t\right)\:$ is independent of the variable $\:\dot q$, it depends on the independent variable $\:p\boldsymbol{\equiv}\text{the generalized momentum}$.

Equation \eqref{B-05} yields \begin{equation} \dfrac{\partial H\left(q,p,t\right)}{\partial q}\boldsymbol{=}\boldsymbol{-}\dfrac{\partial L\left(q,\dot q,t\right)}{\partial q} \tag{B-06}\label{B-06} \end{equation} From this equation and the definition of $\:p$, see equation \eqref{B-04b}, the Euler-Lagrange equation of motion \eqref{B-01} gives \begin{equation} \dot p \boldsymbol{=}\boldsymbol{-}\dfrac{\partial H\left(q,p,t\right)}{\partial q} \tag{B-07}\label{B-07} \end{equation} Equations \eqref{B-04c} and \eqref{B-07} together constitute the Hamilton equations of motion \begin{equation} \text{Hamilton equations of motion}\:\:\: : \:\:\: \left. \begin{cases} \dot q & \!\!\boldsymbol{=}\boldsymbol{+}\dfrac{\partial H\left(q,p,t\right)}{\partial p}\vphantom{\dfrac{a}{\dfrac{a}{b}}}\\ \dot p & \!\!\boldsymbol{=}\boldsymbol{-}\dfrac{\partial H\left(q,p,t\right)}{\partial q} \end{cases}\right\} \tag{B-08}\label{B-08} \end{equation}

Frobenius
  • 15,613
  • 2
    Great and clarifying answer! I just made some minor modifications which don't do any harm to your reasoning. A pity though you didn't continue with $\boldsymbol{\S:} B$ – Deschele Schilder May 04 '19 at 18:07
  • @descheleschilder : Thanks for your attention and editing. – Frobenius May 04 '19 at 21:07
  • 1
    @descheleschilder I totally agree with you. – Sebastiano Jun 26 '19 at 12:04
  • 1
    @Frobenius. Bravo! This is a tremendously successful exposition of the Legendre transform. Crystal clear. However, I believe that you made an oversight in you A-10a-A-10c (at least with respect to the graphic employed). As illustrated, the inverse is multi valued function. You would have to restrict the domain of $f$ to do as you do. Please advise. – Michael Levy Nov 29 '22 at 04:41
  • 1
    @Michael Levy : Thanks for your attention. Equations \eqref{A-10a} to \eqref{A-10c} give the inverse of the Legendre transform, not the inverse $:x=f^{-1}(y):$. For the Legendre transform $:\omega(u):$ of $:y=f(x):$ to be defined without contradictions (that is to be single-valued) we must have single-valued the first derivative $:\mathrm df(x)/\mathrm dx:$ of $:y=f(x):$ and this is valid for the convex graph of Figure-01. – Frobenius Nov 29 '22 at 05:02
3

The Formula Goldstein has given (8.15) is not a definition of the Hamiltonian (because you are right in that, the Formula depends on $\dot{q}$, which is not an argument of the Hamiltonian. However, the formla can be understood as an equation we want $H$ to satisfy if the variable $p$ satisfies \begin{align} p = \frac{\partial L}{\partial \dot{q}}(q, \dot{q}, t) \end{align}

Unlike suggested in the previous version of this answer, $p$, $q$ and $\dot{q}$ can be independent variables in these equations.

By that now is also clear why the $p \dot{q}$ vanishes here:The differential of the term $\dot{q} p$ in formula 8.15 cancels with the one from the differential of $L$ in 8.13.

Written down: \begin{align} dH = d \dot{q} p - \dot{q} dp - dL \end{align}
With $dL$ from 8.13, you arrive at the same formula Goldstein arrives at.

Important Note from my side: Goldstein argues with the Legendre Transform here when talking about why the differential vanishes. In fact, the way he "defined" $H$ is a Legendre Transformation. However, since he started to define $H$ without making use of the term "Legendre-Transform", he could have argued without it later on as well when talking about the differentials. As I did, you can perfectly understand why $d \dot{q} p$ vanishes without making use of the term "Legendre-Transformation". Conversely, when Goldstein writes that $d \dot{q} p$ vanishes because of the "Legendre-Transformation", he implicitly means exactly what I wrote down.

Quantumwhisp
  • 6,733
  • 2
  • 19
  • 50
  • Time dependence of $q, \dot q$ and $p$ is simply misleading when discussing the relation between Hamiltonian and Lagrangian. They are intended to be functions defined for any value of their arguments, not only on the solution of the equations of motion. In the whole argument, the only role played by time is via the possible explicit dependence of $L$ and $H$ On $t$. – GiorgioP-DoomsdayClockIsAt-90 May 01 '19 at 07:31
  • If I understand @GiorgioP, I agree; the time dependence gen. coordinates is just a way of saying that a solution of those equations is a curve in the phase space. In other words, when we obtain the solutions, we have a parametrisation of that particular solution wrt $t$, but when we are doing our analysis, $p,q,\dot q$ are just variables just like $x,y,z$. – Our May 01 '19 at 07:37
  • You are right, I thought too mutch. The only thing important is that $p$ satisfies 2.44, if that is the case, $p$, $q$ and $\dot{q}$ need not be thought of as a trajectory. I never wrote, however, that the trajectory needs to be a solution of the equations of motion. I'll edit my answer accordingly! – Quantumwhisp May 01 '19 at 10:13
2

Right, $\dot{q}$ is not an agrument of $H$ and you will only see it afterwards, but it is a function of time so you must make $dH$ from the definition (8.15) keeping it in mind and you must use $dL$ from (8.13'). Then you arrive at the right Hamiltonian differential. Note, eq. (8.16) misses a factor $dt$ at the last term (a typo).

  • do you mean to subtract 8.17 from the differential of 8.15 by using 8.13', and then equation the coefficient of each $dq, dp, dt$'s to zero ? – Our May 01 '19 at 07:17
0

First lets try out the legendre transformation on a particular example.

$$ L = \frac12 m \dot{q}^2 - V(q), $$

according to Goldstein the hamiltonian for this system is,

$$ H = \dot{q} p - L,$$

initially we think of $p$ and $\dot{q}$ as being independent variables. If we take $\partial H / \partial \dot{q}$ we will get,

$$ \frac{\partial H}{\partial \dot{q}} = p - \frac{\partial L}{\partial \dot{q}},$$

if we now constrain ourselves to the surface $p=\frac{\partial L}{\partial \dot{q}} $ we find that the partial derivative of $H$ with respect to $\dot{q}$ vanishes.

For the purposes of calculating the dynamics then we would constrain our results,

$$ H\Big|_{p=m\dot{q}} = \Big( p\dot{q} - L(\dot{q},q)\Big) \Big|_{p=m\dot{q}}$$

$$ H\Big|_{p=m\dot{q}} = \Big( \frac{p^2}{m} - L(p/m,q)\Big) \Big|_{p=m\dot{q}}$$

$$ H\Big|_{p=m\dot{q}} = \Big( \frac{p^2}{m} - \frac{p^2}{2m} + V(q) \Big) \Big|_{p=m\dot{q}}$$

$$ H\Big|_{p=m\dot{q}} = \Big( \frac{p^2}{2m} + V(q) \Big) \Big|_{p=m\dot{q}}$$

This kind of "constraining our variables after the fact" practice is very common in Classical Mechanics.

Spencer
  • 614