Constructing a hamiltonian for a harmonic oscillator

Click For Summary

Discussion Overview

The discussion revolves around constructing a Hamiltonian for a harmonic oscillator, focusing on the foundational aspects of Hamiltonian mechanics and its relationship to classical mechanics. Participants explore the definitions and relationships between generalized coordinates, velocities, and momenta, as well as the implications of expressing the Hamiltonian as a function of time.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants clarify that the terms p and \dot{q} are not the same, although they can be proportional in specific cases, such as non-relativistic systems.
  • There is a discussion about whether \dot{q}, \dot{p}, and other dotted terms refer to time derivatives, with some noting that \dot{p} is not referred to as \ddot{q} because they represent different concepts.
  • One participant questions if the Hamiltonian can be expressed solely as a function of time, suggesting that doing so may discard important information about the system's trajectories.
  • Another participant points out that while generalized coordinates and momenta can be interpreted in Newtonian terms for simple systems, there are cases (e.g., charged particles in magnetic fields) where this equivalence does not hold.
  • There is a debate about the role of Hamiltonian mechanics in finding trajectories versus understanding general system quantities, with some arguing that Hamiltonian mechanics can effectively visualize motion in phase space.

Areas of Agreement / Disagreement

Participants express differing views on the relationship between generalized momentum and velocity, as well as the implications of expressing the Hamiltonian in terms of time. The discussion remains unresolved regarding the extent to which Hamiltonian mechanics can be used to find trajectories versus general system properties.

Contextual Notes

Participants note that the relationship between momentum and velocity may vary depending on the system, particularly in non-constant mass scenarios or systems with external fields. There are also unresolved questions about the implications of simplifying the Hamiltonian to a function of time.

woodssnoop
Messages
9
Reaction score
0
Hello:

I am trying to understand how to build a hamiltonian for a general system and figure it is best to start with a simple system (e.g. a harmonic oscillator) first before moving on to a more abstract understanding. My end goal is to understand them enough so that I can move to symplectic transforms and then on to symplectic integration methods, but I plan on taking this one step at a time. From what I know and understand so far:

[itex]T = \frac{1}{2} m v^{2}[/itex]

[itex]V = \frac{1}{2} k q^{2}[/itex]

[itex]L(q,\dot{q},t) = T + V[/itex]

[itex]H(p,q,t) = p \dot{q} - L(q,\dot{q},t)[/itex]

[itex]\dot{q} =\frac{\partial H}{\partial p}[/itex]

[itex]\dot{p} = - \frac{\partial H}{\partial q}[/itex]


I have been replacing [itex]v[/itex] with [itex]\dot{q}[/itex], but I don't believe I am getting the right answer. So my first questions are:

1a. Are the terms [itex]p[/itex] and [itex]\dot{q}[/itex] the same thing, and if not why?
1b. Are the [itex]\dot{q}, \dot{p}[/itex] and other dotted terms I see in many texts referring to the time derivative of that term? If so, why is [itex]\dot{p}[/itex] not referred to as [itex]\ddot{q}[/itex]?​

While I was working though the problem I tried above, I noticed that given [itex]q = a \sin(2\pi f t)[/itex], [itex]H[/itex] could be expressed as just a function of just [itex]t[/itex].

2. So can the hamiltonian be function of only [itex]t[/itex]?​

Thank for your help in advance,
Dan
 
Physics news on Phys.org
woodssnoop said:
1a. Are the terms [itex]p[/itex] and [itex]\dot{q}[/itex] the same thing, and if not why?
No, they are not. They happen to be easily related in this particular case since they are proportional to each other. But generalized velocity and generalized momentum are not generally proportional to each other (although it might be true for most if not all example you encounter in class). A simple case to the contrary is a relativistic particle.

When you really dwell into Hamiltonian mechanics, you realized that [itex]p[/itex] and [itex]q[/itex] (not [itex]\dot{q}[/itex]) are sort of interchangeable via what's called Canonical Transformation. In fact, you can already see that the two Hamiltonian equations are invariant under if you interchange [itex]p[/itex] and [itex]q[/itex] and make some clever sign change. Mathematically, [itex]\{p,q\}[/itex] are points of an geometric object called the Cotangent Bundle. But that's probably just formalism mumbo jumbo for you at this point.

1b. Are the [itex]\dot{q}, \dot{p}[/itex] and other dotted terms I see in many texts referring to the time derivative of that term? If so, why is [itex]\dot{p}[/itex] not referred to as [itex]\ddot{q}[/itex]?
Because they are different thing. Again, this only works when [itex]p \propto \dot{q}[/itex], which is not necessarily true.

While I was working though the problem I tried above, I noticed that given [itex]q = a \sin(2\pi f t)[/itex], [itex]H[/itex] could be expressed as just a function of just [itex]t[/itex].

2. So can the hamiltonian be function of only [itex]t[/itex]?
This is a specific trajectory of the motion, of a particular initial condition. Hamiltonian mechanics is more interested in the general structure of the system itself. So in fact, you are throwing away information by making such a substitution: instead of studying all trajectories govern by this Hamiltonian, you are studying a particular trajectory that solves the Hamiltonian.
 
Last edited:
mathfeel said:
No, they are not. They happen to be easily related in this particular case since they are proportional to each other. But generalized velocity and generalized momentum are not generally proportional to each other (although it might be true for most if not all example you encounter in class). A simple case to the contrary is a relativistic particle.

Thank you for replying. I made a mistake in my first question and I should probably rephrase as well. I meant to ask, can [itex]m \dot{q}[/itex] be replaced by [itex]p[/itex]? I understand that if the mass was not constant then this would not be possible, but in a non-relativistic calculation, such as this harmonic approximation, are these terms (i.e. [itex]q, \dot{q}, p[/itex], etc.) treated the same way as in Newtonian mechanics?

This is a specific trajectory of the motion, of a particular initial condition. Hamiltonian mechanics is more interested in the general structure of the system itself. So in fact, you are throwing away information by making such a substitution: instead of studying all trajectories govern by this Hamiltonian, you are studying a particular trajectory that solves the Hamiltonian.

So if I understand you right, Hamiltonian mechanics is not generally used for finding trajectories of particles, just the quantities of a general system such as energy, average velocity, average position, etc.?
 
woodssnoop said:
[itex]L(q,\dot{q},t) = T + V[/itex]

Also, the quote above should be:

[itex]L(q,\dot{q},t) = T - V[/itex]
 
woodssnoop said:
Thank you for replying. I made a mistake in my first question and I should probably rephrase as well. I meant to ask, can [itex]m \dot{q}[/itex] be replaced by [itex]p[/itex]? I understand that if the mass was not constant then this would not be possible, but in a non-relativistic calculation, such as this harmonic approximation, are these terms (i.e. [itex]q, \dot{q}, p[/itex], etc.) treated the same way as in Newtonian mechanics?
I suppose one can interpret generalized coordinate, its time derivative, and its conjugate momentum in Newtonian term if you want (and it is often good to do so). For you SHO problem, they are the same anyway. But in principle, there can be system with effective Hamiltonian in which this is not the case. For example, for a charged particle moving in a plane with a uniform magnetic field perpendicular to the plane. The conjugate momentum [itex]p[/itex] is not the same as the mechanical momentum [itex]m\dot{q}[/itex]

So if I understand you right, Hamiltonian mechanics is not generally used for finding trajectories of particles, just the quantities of a general system such as energy, average velocity, average position, etc.?
There is no less power to solve for trajectory in Hamiltonian form than in the Newtonian form, when it can be done in closed form. And no, it is not correct to say that Hamiltonian mechanics can only solve for "average" something. Hamiltonian mechanics visualizes motion as flow in the phase space. So you end up with a picture of motion of an incompressible fluid in [itex](q,p)[/itex] space and you can trace any trajectory corresponding to any initial condition from that.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 19 ·
Replies
19
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 2 ·
Replies
2
Views
5K