# Hamiltonian time dependence

1. May 14, 2015

### Wminus

Hi. Say we have found a hamiltonian $H$ for some system.

So I know that if $\frac{\partial H }{\partial t} \neq 0$ then obviously the energy of the system is not conserved.

But if $\frac{\partial H }{\partial t} = 0$, is the energy always conserved? Or do we need to find that $\frac{d H }{dt} = 0$ to know for sure?

2. May 14, 2015

### terra

Hamiltonian gives the energy of a system.
Let's discuss the case of pure states (where we have quantum states that can be written as vectors $| \psi \rangle$).
Conservation of energy means that the (expectation value of) amount of energy does not change in time, i.e. $\mathrm{d} \langle \psi | \hat{H} | \psi \rangle /\mathrm{d}t= 0$.
You can write down the time evolution of the expectation value of an operator as:
$$\frac{\mathrm{d}}{\mathrm{d}t} \langle \psi | \hat{A} | \psi \rangle = \frac{i}{\hbar} \langle \psi | \big[ \hat{A},\hat{H} \big] | \psi \rangle + \partial_t \langle \psi | \hat{A} | \psi \rangle$$
so for Hamiltonian the time-derivatives are equal, $\mathrm{d}\langle \psi | \hat{H} | \psi \rangle /\mathrm{d}t= \partial_t \langle \hat{H} \rangle$. This means that if $\partial_t \hat{H}= 0$, the expectation value of energy is a constant, which means that energy is conserved.
When your states are pure, you have a isolated system (with no particle or energy flow). Then again, when your Hamiltonian describes an isolated system, I believe it can always be written in so called Schrödinger picture, where it is constant in time. Conversely, when your Hamiltonian depends on time, some external forces are doing work on your system.
Did this help at all?

Edit: I just realised that you were talking about classical systems. Well, there's a similar equation for the time-evolution of functions in phase space for classical systems. In these, the commutator $[A,B]$ is replaced by Poisson brackets $\{ A,B\}$ . But it gives out the same result:
$$\frac{\mathrm{d}H}{\mathrm{d}t}= \partial_t H + \{ H,H \}= \partial_t H.$$
So indeed, $\partial_t H= 0$ should suffice.

Last edited: May 14, 2015
3. May 16, 2015

### lightarrow

More probably in MQ, but in general this statement is false. There are simple example in classical mechanics where H is not the energy of the system, as you probably already know.
One example: A straight pipe is in constant angular rotation around an axis passing through its centre. A ball of mass m is inside the pipe and can move through it without friction but is connected to the pipe's centre with a spring of constant k. The lagrange function L is Ek - V (kinetic minus potential energy) while the Hamiltonian is (@L/@r') r' - L, wher r is the coordinate of the ball (displacement fron the pipe's centre) and r' is its time derivative.

--
lightarrow

Last edited: May 16, 2015
4. May 17, 2015

### terra

True, thanks for the correction (as you can see, at first I talked about quantum systems). I've heard this before, but I must admit I haven't thought about it that much.
In your example the idea is to get the equation of motion for the ball in pipe's rest frame? The pipe doesn't rotate in its rest frame, so one doesn't include the ball's rotational energy (assuming the ball can only move forward or backward inside the pipe) and as such, H is not the total energy of the ball in that frame? (In quantum mechanics, the analogue is maybe the transformation from Schrödinger picture into interaction picture.) Based on your example it seems like the choice of coordinates determines whether H is the total energy or not?

5. May 19, 2015

### lightarrow

No, the idea is to get everything in the lab frame. Now I hope you will forgive me for not using latex but I'm not expert.
In the lab frame:
V = potential energy = 1/2 k r2 where r, as said, is the coordinate distance from the centre, directed from the centre outwards (assuming a spring with zero lenght at rest).
Writing the position vector r = (x,y) = (r cos(ωt),r sin(ωt)), ω = angular speed, constant, you easily find
|r'|2, where r' = dr/dt, and then kinetic energy which results as: Ek = 1/2 m (r'2 + r2ω2).
At this point you can write the lagrange function:

L = Ek - V = 1/2 m (r'2 + r2ω2) - 1/2 k r2.

As you see we have one degree of freedom only in this system. The lagrange equation is:
@L/@r = (d/dt)(@L/@r') --> m r ω2 - k r = (d/dt)(m r') = mr'' -->

r'' = r ω2 - (k/m) r. I will use this last equation to evaluate the time variation of energy and of the hamiltonian.

By definition, the hamiltonian is: H = Σi piq'i - L

where pi = @L/@q'i; q'i = dqi/dt

Here we have: H = p r' - L = @L/@r' - L = 1/2 m (r'2 - r2ω2) + 1/2 k r2

Now the energy. By definition it's: E = Ek + V = 1/2 m (r'2 + r2ω2) + 1/2 k r2

You see that H is different from E because of the sign of the term r2ω2.
But this is not the only thing. The best part is that H is conserved, but energy is not!

dH/dt = 1/2 m (2r' r'' - 2r r' ω2) + k r r' = (now I use the result of the lagrange equation to write r'') =

= m r'(r ω2 - (k/m) r) - m r r' ω2 + k r r' = 0

dE/dt = m r'(r ω2 - (k/m) r) + m r r' ω2 + k r r' = 2m r r' ω2 ≠ 0.

As homework for you (if you want to do it, of course...): what happens in the pipe's rest frame? E and H are still different? E is conserved or not in that frame?

--
lightarrow

Last edited: May 19, 2015
6. May 20, 2015

### lightarrow

At least if the system is holonomic, $\frac{d H }{dt} = \frac{\partial H }{\partial t}$, so if the second is zero, it's zero even the first.
But concerning energy, is another story, as I wrote in my previous post (because H is not always total energy).

--
lightarrow

7. May 20, 2015

### terra

I see. Thank you for explaining (and apologies for my slow replies). I see that energy and Hamiltonian coincide in the rotating frame, and are both conserved in that frame.
About when $H$ is and isn't energy (in a classical system). One can write down the following.
$H= p_i \dot{q}_i - L$ and $E= T + V$, where $L= T - V$ and $p_i= \partial L/ \partial q_i$.

The kinetic energy of a single, non-relativistic object: $T= 1/2 \, m \dot{q}^2 + 1/2 \, I \omega^2$.
The potential energy for an object could generally be a function $V= V(t,...,q_i,...,\dot{q}_i,...)$.
Then $$H= \frac{1}{2} m \dot{q}_i^2 - \frac{1}{2} I \omega^2 + \frac{\partial V}{\partial \dot{q}_i} \dot{q}_i + V(q_i,\dot{q}_i).$$

Well. If the force acting on the object is conservative, $\boldsymbol{F}= \boldsymbol{F}(\boldsymbol{q})$ so that $V= V (\boldsymbol{q})$ and third term drops out. Moreover, if the body has no total angular momentum, to me it seems energy and Hamiltonian should coincide. (This was for one body and in non-relativistic case.) At least the orbital angular momentum of a body can be forgotten with a specific choice of coordinates.
What do you think?

Also,
I can't see how holonomy affects the situation i.e. what happens to the form of time-evolution (see my first reply) if there are non-holonomic (non-integrable, that don't reduce number of degrees of freedom) constraints?

Last edited: May 20, 2015
8. May 22, 2015

### lightarrow

You forgot a point on q_i, it's $p_i= \partial L/ \partial \dot{q}_i$ but it's clear you wanted to write it.
Ok. However, in rotating or, in general, non inertial frames, you have to introduce inertial forces and so inertial potential energies (ex. centrifugal potentials in rotating frames).
Yes, I think you are right