Constructing a hamiltonian for a harmonic oscillator

AI Thread Summary
The discussion focuses on constructing a Hamiltonian for a harmonic oscillator, emphasizing the relationship between generalized momentum (p) and velocity (\dot{q}). It clarifies that while p and \dot{q} can be related in specific cases, they are not generally the same, particularly in more complex systems like relativistic particles. The participants also discuss the implications of expressing the Hamiltonian solely as a function of time, noting that this approach limits the understanding of the system's trajectories. Additionally, it is highlighted that Hamiltonian mechanics can effectively solve for trajectories, contrary to the notion that it only provides average quantities. Overall, the conversation aims to deepen the understanding of Hamiltonian mechanics and its applications.
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:

T = \frac{1}{2} m v^{2}

V = \frac{1}{2} k q^{2}

L(q,\dot{q},t) = T + V

H(p,q,t) = p \dot{q} - L(q,\dot{q},t)

\dot{q} =\frac{\partial H}{\partial p}

\dot{p} = - \frac{\partial H}{\partial q}


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

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

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

2. So can the hamiltonian be function of only t?​

Thank for your help in advance,
Dan
 
Physics news on Phys.org
woodssnoop said:
1a. Are the terms p and \dot{q} 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 p and q (not \dot{q}) 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 p and q and make some clever sign change. Mathematically, \{p,q\} 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 \dot{q}, \dot{p} and other dotted terms I see in many texts referring to the time derivative of that term? If so, why is \dot{p} not referred to as \ddot{q}?
Because they are different thing. Again, this only works when p \propto \dot{q}, which is not necessarily true.

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

2. So can the hamiltonian be function of only t?
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 m \dot{q} be replaced by p? 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. q, \dot{q}, p, 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:
L(q,\dot{q},t) = T + V

Also, the quote above should be:

L(q,\dot{q},t) = T - V
 
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 m \dot{q} be replaced by p? 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. q, \dot{q}, p, 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 p is not the same as the mechanical momentum m\dot{q}

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 (q,p) space and you can trace any trajectory corresponding to any initial condition from that.
 
Thread ''splain this hydrostatic paradox in tiny words'
This is (ostensibly) not a trick shot or video*. The scale was balanced before any blue water was added. 550mL of blue water was added to the left side. only 60mL of water needed to be added to the right side to re-balance the scale. Apparently, the scale will balance when the height of the two columns is equal. The left side of the scale only feels the weight of the column above the lower "tail" of the funnel (i.e. 60mL). So where does the weight of the remaining (550-60=) 490mL go...
Consider an extremely long and perfectly calibrated scale. A car with a mass of 1000 kg is placed on it, and the scale registers this weight accurately. Now, suppose the car begins to move, reaching very high speeds. Neglecting air resistance and rolling friction, if the car attains, for example, a velocity of 500 km/h, will the scale still indicate a weight corresponding to 1000 kg, or will the measured value decrease as a result of the motion? In a second scenario, imagine a person with a...
Scalar and vector potentials in Coulomb gauge Assume Coulomb gauge so that $$\nabla \cdot \mathbf{A}=0.\tag{1}$$ The scalar potential ##\phi## is described by Poisson's equation $$\nabla^2 \phi = -\frac{\rho}{\varepsilon_0}\tag{2}$$ which has the instantaneous general solution given by $$\phi(\mathbf{r},t)=\frac{1}{4\pi\varepsilon_0}\int \frac{\rho(\mathbf{r}',t)}{|\mathbf{r}-\mathbf{r}'|}d^3r'.\tag{3}$$ In Coulomb gauge the vector potential ##\mathbf{A}## is given by...
Back
Top