# The Hamiltonian

1. Oct 7, 2008

### jsc314159

I have a question on the Hamiltonian from a classical viewpoint.

I understand that the Hamiltonian, H, is conserved if it has no explicit time dependence, in other words:

$$\frac{\partial H}{\partial t} = 0$$

What I am not clear on is how one can determine whether a given Hamiltonian represents the total energy of the system by looking at its form.

Can someone explain this?

Thanks,

JSC

2. Oct 7, 2008

### ZikZak

If the generalized coordinates do not depend explicitly on time, and if the potential is independent of the velocities, then H is the total energy.

3. Oct 7, 2008

### jsc314159

So, if H is in a form H = T + V, H represents the total energy.

However, if H is not in this form, like in the case of a charged particle moving in a magnetic field or in the case of time varying constraints, then H is not the total energy. Is this right?

I suppose I am somewhat confused over this because the form of the Hamiltonian can change significantly when the generalized coordinates are changed (see the spring mass on the cart moving with uniform velocity, Goldstein, Classical Mechanics 3rd Ed, pp. 345-347).

4. Oct 7, 2008

### ZikZak

No, the requirement is that (1) the generalized coordinates do not depend on time and (2) The potential does not depend on p.

In the case of a particle moving in an EM field, the hamiltonian $$H=\frac{1}{2m}\left(\vec p -\frac{q}{c}\vec A\right)^2 + q\phi$$ is not in the form H=T+V, but it is still the total energy because the coordinates are simply the cartesian coordinates and $V=q\phi$ does not depend on p.

5. Oct 8, 2008

### jsc314159

So in the case of the spring-mass on a cart moving with uniform velocity, which has time varying constraints, H can be represented as:

$$H = \frac{p^2}{2m} + \frac{k}{2} (x - v_0t)^2$$

if the generalized coordinate is the position x of the mass. In this case H is the total energy since x is independent of time and V is independent of velocity but H is not conserved since it is an explicit function of t.

On the other hand, if we let

$$x' = x - v_0t$$

then H is written as:

$$H = \frac{(p' - mv_0)^2}{2m} + \frac{kx'^2}{2} - \frac{mv_0^2}{2}$$

if the generalized coorindate is now x', the position of the mass relative to the cart. In this case H is conserved but H is not the total energy since the generalized coordinate x' is a function of time.

Correct?

6. Oct 10, 2008

### jomoonrain

I think you fall into a question of the independence of the variables.

Generally,

H = H(q,p,t)

and the three variables q,p(equal to v),t are independent, this mean that if we change one of them,the others will not change consequently.

but in your question, x,xsingle-quote ,t are not independent.Right?

7. Oct 14, 2008

### jsc314159

Correct, x' is a function of x and t in a coordinate system moving with the cart. However, in this coordinate system H is no longer an explicit function of t.

8. Oct 14, 2008

### jomoonrain

yeah, of cause.

in fact, we can obtain the conclusion directly from the observation of the physical existence of this system instead of the mathematical expression,as long as it is in a inertia frame.