Physics · Introductory

Example: Motion in a uniform gravitational field

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

This lesson analyzes a particle of mass μ in a uniform gravitational field using Lagrangian and Hamiltonian mechanics in Cartesian coordinates. The derivation shows that horizontal momentum is conserved while vertical motion follows constant acceleration. It highlights that choosing Cartesian coordinates avoids the complexity introduced by polar coordinates.

Intuition

When modeling a particle in a uniform gravitational field, the choice of coordinates drastically affects the complexity of the equations. In Cartesian coordinates, the potential energy depends only on the vertical position, leaving the horizontal coordinate cyclic. This symmetry means the horizontal momentum is conserved, simplifying the problem into two independent parts: uniform horizontal motion and constant vertical acceleration. In contrast, polar coordinates couple the radial and angular variables through the potential energy, leading to difficult differential equations. The Lagrangian and Hamiltonian formalisms provide a systematic way to derive these equations of motion from scalar energy functions rather than vector forces.

Key equations

L=12μ(x˙2+y˙2)−μgy
(1)

The Lagrangian for a particle in the x-y plane, defined as kinetic energy minus potential energy.

x¨=0
(2)

The horizontal acceleration is zero, indicating conservation of horizontal momentum.

y¨=−g
(3)

The vertical acceleration is constant and equal to negative gravity.

H=px2+py2+pz22μ+μgz
(4)

The Hamiltonian representing the total energy of the system.

Derivation

  1. Define the system as a particle of mass μ in a uniform gravitational field g.
  2. Express potential energy as U=μgy (or z) and kinetic energy as T=12μ(x˙2+y˙2).
  3. Construct the Lagrangian L = T - U.
  4. Apply the Euler-Lagrange equation to the horizontal coordinate x. Since L does not depend on x, the horizontal momentum μx˙ is conserved, implying acceleration is zero.
  5. Apply the Euler-Lagrange equation to the vertical coordinate y. The derivative yields μy¨=−μg, resulting in y¨=−g.
  6. Construct the Hamiltonian H using generalized momenta. H represents the total energy and is conserved.
  7. Apply Hamilton's equations to confirm the results for velocity and momentum change.
  8. Contrast with polar coordinates, where U=μgrsin⁡θ couples r and θ, making the equations significantly more complex.

Worked example

Problem

Derive the equation of motion for the vertical coordinate y using the Lagrangian L=12μ(x˙2+y˙2)−μgy.

  1. Identify the generalized coordinate q_i as y.
  2. Calculate the partial derivative of L with respect to y˙: ∂L∂y˙=μy˙.
  3. Calculate the time derivative: ddt(μy˙)=μy¨.
  4. Calculate the partial derivative of L with respect to y: ∂L∂y=−μg.
  5. Substitute into the Euler-Lagrange equation: d/dt (partial L / partial dot y) - partial L / partial y = 0.
  6. This gives μy¨−(−μg)=0, which simplifies to μy¨=−μg.
  7. Divide by μ to get y¨=−g.

Answer ddot y = -g

Common mistakes

  • Using polar coordinates unnecessarily, which couples r and theta in the potential energy and complicates the differential equations.
  • Forgetting that the potential energy depends only on the vertical coordinate, leading to incorrect partial derivatives.
  • Sign errors when deriving the vertical equation of motion from the Lagrangian.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.