Hamiltonian mechanics rewrites classical mechanics in terms of generalized coordinates qiq_i and conjugate momenta pip_i. Instead of one second-order equation for position, you get two linked first-order equations that show how a system moves through phase space.

For a system with coordinates qiq_i, momenta pip_i, and Hamiltonian H(q,p,t)H(q,p,t), the equations of motion are

q˙i=Hpi,p˙i=Hqi\dot{q}_i = \frac{\partial H}{\partial p_i}, \qquad \dot{p}_i = -\frac{\partial H}{\partial q_i}

If you searched for "what is Hamiltonian mechanics?", that is the core answer: it is a phase-space form of mechanics where HH generates the time evolution of qiq_i and pip_i.

What the Hamiltonian means

The Hamiltonian is a function of the variables that define the state. Its main job is to generate the equations of motion.

In many standard mechanics examples, HH also equals the total energy written in terms of coordinates and momenta. That identification needs conditions, so the safer statement is that the Hamiltonian often matches total energy, but not in every formulation.

What phase space shows

Phase space is the space whose axes are the coordinates and their conjugate momenta. For one degree of freedom, a state is a point (q,p)(q,p), so phase space is two-dimensional. For NN degrees of freedom, phase space has 2N2N dimensions.

This is why phase space is useful. Ordinary space tells you where a particle is. Phase space tells you where it is and the momentum paired with that coordinate. One point in phase space represents one complete instantaneous state of the model.

As time passes, that point traces out a curve. Hamilton's equations tell you the direction of motion along that curve.

Why Hamilton's equations help

Hamilton's equations split dynamics into two clean pieces:

  • q˙i\dot{q}_i comes from how HH changes with momentum
  • p˙i\dot{p}_i comes from how HH changes with position

That structure is useful because it turns mechanics into a consistent state-space problem. It is especially valuable in advanced mechanics, statistical mechanics, and as a bridge toward quantum mechanics.

Even in an introductory course, the payoff is clarity. You can see how coordinates, momenta, conservation laws, and geometry fit together in one framework.

Worked example: 1D harmonic oscillator

Take a mass mm on an ideal spring with spring constant kk. Let the coordinate be qq and the conjugate momentum be pp.

For this system,

H(q,p)=p22m+12kq2H(q,p) = \frac{p^2}{2m} + \frac{1}{2}kq^2

The first term is kinetic energy written in terms of momentum, and the second term is the spring potential energy.

Now apply Hamilton's equations:

q˙=Hp=pm\dot{q} = \frac{\partial H}{\partial p} = \frac{p}{m} p˙=Hq=kq\dot{p} = -\frac{\partial H}{\partial q} = -kq

Those two first-order equations already describe the motion. To connect them to the familiar second-order form, differentiate q˙=p/m\dot{q} = p/m with respect to time:

q¨=p˙m\ddot{q} = \frac{\dot{p}}{m}

Then substitute p˙=kq\dot{p} = -kq:

q¨=kmq\ddot{q} = -\frac{k}{m}q

So you recover the usual simple harmonic motion equation.

This is the main takeaway from the example: Hamiltonian mechanics does not describe a different oscillator. It describes the same physics in a form that is often easier to generalize.

Common mistakes in Hamiltonian mechanics

Assuming the Hamiltonian is always total energy

That is true for many standard mechanical systems, but not as a universal rule. The safer statement is that the Hamiltonian generates time evolution, and in many common cases it also equals total energy.

Confusing phase space with ordinary space

Phase space includes momentum coordinates as well as position coordinates. A phase-space point is not just a location in the room or along a line.

Treating pp as the same as mvmv in every coordinate system

In simple Cartesian cases, momentum often looks like p=mvp = mv. In more general coordinates, conjugate momentum must be defined from the model, not guessed from that formula.

Thinking first-order equations are less complete

Hamilton's equations are first-order, but together they contain the same dynamical information as the familiar second-order equations for the same system.

When Hamiltonian mechanics is used

Hamiltonian mechanics is useful when you want a structured view of classical dynamics, especially for systems with many degrees of freedom, conserved quantities, or symmetry. It is also the natural bridge to ideas in statistical mechanics and quantum theory.

For simpler problems, Newton's laws may be the fastest route. Hamiltonian mechanics becomes especially valuable when the geometry of the system matters as much as the force calculation.

Try a similar Hamiltonian mechanics problem

Start from

H(q,p)=p22m+mgqH(q,p) = \frac{p^2}{2m} + mgq

for a particle moving vertically near Earth's surface. Use Hamilton's equations to find q˙\dot{q} and p˙\dot{p}, then compare the result with the constant-acceleration model you already know.

If you want one natural next step, compare this page with simple harmonic motion. It helps to see how the same oscillator looks in Newtonian language and in Hamiltonian language.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →