How do I know if the Hamiltonian is constant?

In summary, the conversation discusses the calculation of the Hamiltonian for an oscillator and the question of whether it is constant. The Hamiltonian is derived from the Lagrangian and is found to be equal to \frac{m}{2}(\dot{Q}^2 - \omega^2 Q^2). It is then discussed whether this Hamiltonian is constant or not, with the conclusion that if it is not explicitly dependent on time, it is conserved.
  • #1
komodekork
17
0
Lets say [tex]H = \frac{m}{2} (\dot{Q}^2 - \omega^2 Q^2 )[/tex]
where Q is the generalized coordinate.
It doesn't explicitly depend on time, but the Q and the [tex]\dot{Q}[/tex] does.
If i differentiate it with respect to time it should be zero if it's constant, right?
So i guess my question is should i treat the Q's as constants or as functions depending on time when i differentiate?
 
Last edited:
Physics news on Phys.org
  • #2
komodekork said:
Lets say [tex]H = \frac{m}{2} (\dot{Q}^2 - \omega^2 Q^2 )[/tex]
where Q is the generalized coordinate.
It doesn't explicitly depend on time, but the Q and the [tex]\dot{Q}[/tex] does.
If i differentiate it with respect to time it should be zero if it's constant, right?
So i guess my question is should i treat the Q's as constants or as functions depending on time when i differentiate?

If you want to view it like that, then if the Hamiltonian is explicitly independent of time, then it just comes from equality of mixed partials.

[tex]\dot{H}=\frac{\partial H}{\partial q}\dot{q}+\frac{\partial H}{\partial p}\dot{p} =
\frac{\partial H}{\partial q} \left(\frac{\partial H}{\partial p}\right)+
\frac{\partial H}{\partial p}\left(-\frac{\partial H}{\partial q}\right)
=0[/tex]
 
Last edited:
  • #3
RedX said:
If you want to view it like that, then if the Hamiltonian is explicitly independent of time, then it just comes from equality of mixed partials.
I don't understand what you mean, could you please explain?
 
  • #4
komodekork said:
I don't understand what you mean, could you please explain?

oops, you're right. it's not equality of mixed partials, but comes from Hamilton's equations.

so take H=.5(p2+q2)

Then dH/dp=p and dH/dq=q
But p.=-q and q.=p

So H.=p(-q)+q(p)=0
 
  • #5
Hm...
I don't know if I see what you are getting at. I'm not sure if you are telling me that what you did is right or wrong.

Should it be [tex]\frac{d}{dt}(H) = m ( \dot{Q} \ddot{Q} - \omega^2 Q \dot{Q} ) [/tex]

or just

[tex]\frac{d}{dt}(H) = 0[/tex]
 
  • #6
komodekork said:
Hm...
I don't know if I see what you are getting at. I'm not sure if you are telling me that what you did is right or wrong.

Should it be [tex]\frac{d}{dt}(H) = m ( \dot{Q} \ddot{Q} - \omega^2 Q \dot{Q} ) [/tex]

or just

[tex]\frac{d}{dt}(H) = 0[/tex]

oops, sorry. First of all, your Hamiltonian doesn't represent an oscillator. If it does, then the second term should be + rather than -:
[tex]
H = \frac{m}{2} (\dot{Q}^2 + \omega^2 Q^2 )
[/tex]

So as you say: [tex]
\frac{d}{dt}(H) = m ( \dot{Q} \ddot{Q} + \omega^2 Q \dot{Q} )
[/tex]

Now from the equations of motion of an oscillator, [tex]\ddot{Q}=-\omega^2 Q [/tex]. PLugging that in should get you zero.
 
  • #7
I don't know what my Hamilton represents. I may have done something wrong.

I all i got is this lagrangian [tex] L = \frac{m}{2} (\dot{q}^2 sin^2(\omega t) + \dot{q} q \omega sin(2\omega t) + \omega^2 q^2) [/tex]
and this new coordinate [tex]Q = q sin(\omega t)[/tex]

after this substitution i get [tex]L = \frac{m}{2} (\dot{Q}^2 + \omega^2 Q^2)[/tex]

then i make the Hamiltonian [tex]H = p\dot{Q} - L[/tex]

and get [tex]H = \frac{m}{2}(\dot{Q}^2 - \omega^2 Q^2)[/tex]



Then the question is, is the Hamiltonian constant?

Thanks for helping me out btw.
 
  • #8
But forget all of that, just in a genreal case,
if [tex] H=H( \dot{q},q)[/tex] is it constant just because it's not [tex] H=H(p,q,t)[/tex]?
Or because it cancels out?
 
Last edited:
  • #9
you need to write your Hamiltonian in terms of p and q not in terms of q and q-dot,
and THEN if time doesn't appear explicitly it's conserved.
 
  • #10
komodekork said:
I don't know what my Hamilton represents. I may have done something wrong.

I all i got is this lagrangian [tex] L = \frac{m}{2} (\dot{q}^2 sin^2(\omega t) + \dot{q} q \omega sin(2\omega t) + \omega^2 q^2) [/tex]
and this new coordinate [tex]Q = q sin(\omega t)[/tex]

after this substitution i get [tex]L = \frac{m}{2} (\dot{Q}^2 + \omega^2 Q^2)[/tex]

then i make the Hamiltonian [tex]H = p\dot{Q} - L[/tex]

and get [tex]H = \frac{m}{2}(\dot{Q}^2 - \omega^2 Q^2)[/tex]



Then the question is, is the Hamiltonian constant?

Thanks for helping me out btw.

Can't you just plug in [tex]
Q = q sin(\omega t)
[/tex] into your Hamiltonian [tex]H = \frac{m}{2}(\dot{Q}^2 - \omega^2 Q^2)[/tex], and see if the time-dependence vanishes?
 

FAQ: How do I know if the Hamiltonian is constant?

How do I determine if the Hamiltonian is constant?

The Hamiltonian is constant if it does not depend on time, meaning it remains the same over time. This can be determined by looking at the equations of motion and checking if they are time-independent.

Can the Hamiltonian change over time?

Yes, the Hamiltonian can change over time if there is an external force or if the system is not isolated. In these cases, the Hamiltonian will not be constant and will depend on time.

What does a constant Hamiltonian indicate?

A constant Hamiltonian is a sign of a conserved quantity in the system. This means that the total energy of the system remains constant, even as the system evolves over time.

How does a non-constant Hamiltonian affect the system?

A non-constant Hamiltonian indicates that the system is not isolated and that energy is being exchanged with its surroundings. This can result in changes in the system's dynamics and behavior over time.

Are there any real-world examples of a constant Hamiltonian?

Yes, a pendulum swinging in vacuum is an example of a system with a constant Hamiltonian. In this case, the total energy of the pendulum (kinetic energy + potential energy) remains constant, as there is no external force acting on it.

Similar threads

Replies
1
Views
737
Replies
21
Views
2K
Replies
1
Views
934
Replies
7
Views
1K
Back
Top