Worked Lagrangian examples
Anchor (Master): Lagrange *Mecanique analytique* 1788 (originator); Arnold *Mathematical Methods* Ch. 2-4; Landau-Lifshitz *Mechanics* Ch. 1-2; Goldstein *Classical Mechanics* Ch. 1-3
Intuition [Beginner]
The Lagrangian method takes a single function — the Lagrangian — and turns it into equations of motion. The examples in this unit show how this works in practice for four physical systems that every physicist and engineer meets repeatedly.
The harmonic oscillator is a mass on a spring: it bounces back and forth at a fixed frequency. The pendulum is a mass swinging under gravity: it oscillates at small angles and goes over the top at large ones. The two-body problem is a planet orbiting a star: gravity pulls them into ellipses. A charged particle in a magnetic field spirals along helical paths.
Each of these systems has a Lagrangian, and in each case the Euler-Lagrange equation reproduces the correct equation of motion. The four examples together show that the Lagrangian formalism handles constraints, external fields, and multi-particle systems with the same mechanical procedure.
Visual [Beginner]
Four panels arranged in a grid. Top left: a mass-spring system oscillating along a line with a sinusoidal trace below it. Top right: a pendulum swinging with the angular position plotted against angular velocity forming a closed loop in phase space. Bottom left: an elliptical Kepler orbit with the central body at one focus and the radius vector sweeping equal areas in equal times. Bottom right: a helical trajectory of a charged particle in a uniform magnetic field.
The picture to keep in mind: each panel is a different physical system, each has a different Lagrangian, and the Euler-Lagrange equation gives the correct motion in every case.
Worked example [Beginner]
Take the harmonic oscillator: a particle of mass on a spring with spring constant . The kinetic energy is (one-half of times velocity-squared) and the potential energy is (one-half of times displacement-squared). The Lagrangian is
Step 1. Compute the derivative of with respect to velocity: .
Step 2. Compute its rate of change: .
Step 3. Compute the derivative of with respect to position: .
Setting rate-of-change of step 1 equal to step 3 gives , or . The angular frequency is and the solutions are .
What this tells us: from a single function we recovered the entire harmonic motion by a mechanical procedure — differentiate twice and read off the equation.
Check your understanding [Beginner]
Formal definition [Intermediate+]
This unit collects four canonical worked examples of the Euler-Lagrange equations applied to specific Lagrangians. For each example, the procedure is:
- Identify the configuration manifold and the Lagrangian .
- Write the Euler-Lagrange equations .
- Solve the resulting ODE (or identify its qualitative features).
- Extract physical consequences.
Counterexamples to common slips
- The pendulum Lagrangian uses , not , for the potential. With the zero of gravitational potential at the pivot, , and . The equation of motion is , not — the sine comes from differentiating with respect to .
- The two-body reduction requires the centre-of-mass coordinate, not just the relative coordinate. The full six-degree-of-freedom problem splits into a free-particle motion of the centre of mass (3 DOF) and a one-body Kepler problem for the relative coordinate (3 DOF). Dropping the centre-of-mass piece loses conservation of total momentum.
- The magnetic force does no work, yet the vector potential enters the Lagrangian. The term in the Lagrangian is velocity-dependent, so the Euler-Lagrange equation produces the velocity-dependent Lorentz force without violating energy conservation (the magnetic force is perpendicular to velocity, hence does zero work).
Key theorem with proof [Intermediate+]
Theorem (Euler-Lagrange equations for the four canonical examples). Each of the following four systems admits a Lagrangian whose Euler-Lagrange equations reproduce the correct equation of motion:
(i) Harmonic oscillator: , , giving .
(ii) Simple pendulum: with coordinate , , giving .
(iii) Two-body Kepler problem: (relative coordinate ), , giving .
(iv) Charged particle in an EM field: , , giving where and .
Proof. Each case is a direct computation.
(i) Harmonic oscillator. , . The Euler-Lagrange equation is , i.e. , or . Solutions: with .
(ii) Pendulum. , . The Euler-Lagrange equation is , i.e. . For small angles, and the equation reduces to the harmonic oscillator with .
(iii) Two-body Kepler. Let be the two masses, their positions. The full Lagrangian on is . Introduce centre-of-mass and relative coordinate . The Jacobian of the change of variables has unit determinant, and separates as where is the reduced mass. The centre-of-mass coordinate is cyclic, giving free-particle motion. The relative coordinate satisfies . Setting and dividing by gives — the one-body Kepler problem.
(iv) Charged particle. The Lagrangian is . Compute . Then
The position derivative is . Equating:
The first bracket is (the -th component of the electric field). The second bracket is (the -th component of ). So — the Lorentz force law.
Bridge. The four examples in this theorem build toward the general theory of Lagrangian mechanics on 05.00.01 by showing that the abstract Euler-Lagrange machinery produces correct equations of motion in every concrete case. The bridge between the abstract and the concrete is the coordinate computation: each example picks a chart on , writes in local coordinates, and the Euler-Lagrange computation is a mechanical algebraic procedure. This is exactly the pattern that appears again in 05.00.10 (scattering, where the Kepler orbit enters the cross-section calculation) and in 05.00.11 (normal modes, where the quadratic Lagrangian near equilibrium generates the stiffness matrix). The foundational reason these four examples are canonical is that they exhibit the four qualitatively distinct types of Lagrangian system: natural ( with position-dependent), constrained (the pendulum on ), reduced (the two-body problem after centre-of-mass separation), and velocity-dependent (the charged particle with the magnetic term ). Putting these together one sees that the Lagrangian formalism unifies conservative forces, geometric constraints, and electromagnetic interactions under a single variational principle.
Exercises [Intermediate+]
Advanced results [Master]
Harmonic oscillator — complete solution. The general solution with is the projection of uniform circular motion in the plane. The complex notation makes the oscillator into a one-dimensional unitary representation of the circle group . The energy levels of the quantum harmonic oscillator are the eigenvalues of the number operator on this representation.
Pendulum — phase portrait and elliptic functions. The energy integral defines the phase portrait in . Three regimes: (a) : libration (closed loops around the stable equilibrium ), with period where is the complete elliptic integral of the first kind and is the amplitude; (b) : the separatrix, connecting the unstable equilibria ; (c) : rotation (open curves with never vanishing). The solution for case (a) is a Jacobi elliptic function where .
Two-body Kepler problem — conservation laws and orbit closure. The Kepler Lagrangian in polar coordinates separates into radial and angular parts. Angular momentum conservation is a consequence of the rotational symmetry. The Laplace-Runge-Lenz vector is an additional conserved quantity specific to the potential (a consequence of the symmetry of the Kepler problem at negative energy, which enlarges the manifest rotational symmetry). The existence of explains the closure of Kepler orbits: it fixes the orientation of the ellipse in the orbital plane.
Charged particle — adiabatic invariants. In a non-uniform magnetic field that varies slowly compared to the cyclotron period, the magnetic moment is an adiabatic invariant — it is preserved to exponential accuracy along the guiding-centre trajectory. The charged particle spirals along the field line with conserved and adiabatically conserved , leading to the mirror effect: as the particle enters a region of stronger , grows (to keep constant) at the expense of , and the particle reflects if reaches zero. This is the principle behind magnetic confinement fusion devices.
Theorem (Runge-Lenz conservation in Kepler). For the Kepler problem with angular momentum , the vector is conserved: . The direction of is the perihelion direction and where is the eccentricity.
Synthesis. The four canonical examples of this unit are the foundational instances of Lagrangian mechanics, and the reason they are canonical is that each exhibits a distinct qualitative feature that recurs throughout the subject. The harmonic oscillator is the linear case — every smooth Lagrangian near a stable equilibrium reduces to a harmonic oscillator at leading order, which appears again in 05.00.11 (normal modes) as the eigenvalue problem for small oscillations. The pendulum is the nonlinear case — the phase-portrait topology changes at the separatrix, and this is exactly the pattern that generalises to Hamiltonian systems on cotangent bundles of non-simply-connected manifolds.
The bridge between the pendulum and the Kepler problem is the central-force reduction: both separate in polar coordinates by conservation of angular momentum, and the Binet equation is the universal tool for central-force orbit calculations. The charged-particle example is the bridge between conservative mechanics and gauge theory: the velocity-dependent term in the Lagrangian is the simplest instance of a minimal coupling prescription, and this pattern recurs in 05.00.01 (Lagrangian on ) where the Poincare-Cartan one-form acquires an electromagnetic contribution. Putting these together identifies the four examples as the four corners of the Lagrangian landscape: linear, nonlinear, reduced (central-force), and gauge-coupled. The foundational reason the Euler-Lagrange equations handle all four uniformly is that the variational principle makes no assumption about the form of — it works for any smooth function on — and the central insight is that the four qualitatively different physical behaviours arise from four qualitatively different Lagrangians, all governed by the same Euler-Lagrange machinery.
Full proof set [Master]
Proposition (harmonic oscillator energy conservation). The energy is constant along solutions of .
Proof. .
Proposition (pendulum energy conservation). The energy is constant along solutions of .
Proof. after substituting .
Proposition (Runge-Lenz conservation). For with , define where and . Then .
Proof. Compute . Since is conserved (), . Also . Using the BAC-CAB rule: . Meanwhile . Adding: the -terms cancel and the -terms give .
Connections [Master]
Lagrangian on
05.00.01. Each example in this unit is a concrete instance of the abstract Lagrangian developed in05.00.01. The harmonic oscillator uses , the pendulum uses , the Kepler problem uses the reduced , and the charged particle uses with a velocity-dependent Lagrangian.Noether's theorem
05.00.04. The conservation laws exhibited in each example — energy for the oscillator and pendulum, angular momentum for the Kepler problem, linear momentum along and canonical angular momentum for the charged particle — are all instances of Noether's theorem. The Runge-Lenz vector is the non-manifest symmetry (the of the Kepler problem) that goes beyond the standard Noether catalogue of05.00.04.Hamilton's principle
05.00.02. Each worked example can be derived from the variational principle: the physical trajectory makes the action critical among nearby paths with the same endpoints. The Euler-Lagrange equations computed here are the stationarity conditions for .Scattering and Rutherford formula
05.00.10. The Kepler problem at positive energy (, hyperbolic orbits) is the prototype scattering problem. The Rutherford cross-section is computed from the Kepler hyperbolic trajectory in the Coulomb potential.Small oscillations and normal modes
05.00.11. The harmonic oscillator of this unit is the one-degree-of-freedom version of the normal-mode analysis. Near any stable equilibrium, the Lagrangian reduces to a sum of harmonic-oscillator Lagrangians in the normal coordinates.
Historical & philosophical context [Master]
Joseph-Louis Lagrange's Mecanique analytique (1788) [Lagrange 1788] collected the first systematic set of worked examples in generalised coordinates: the harmonic oscillator, the compound pendulum, the two-body problem, and the rigid body. Lagrange's contribution was not any single example but the realisation that the same procedure — write and apply the Euler-Lagrange equation — handles every case.
The two-body problem was solved by Isaac Newton in the Principia (1687) [Newton 1687] using geometric methods; the algebraic solution via the Binet equation and conic sections is due to Johann Bernoulli and Jakob Hermann in the early 1700s. The Laplace-Runge-Lenz vector was known to Laplace and Lagrange; its interpretation as a conserved quantity reflecting the hidden symmetry was made by Vladimir Fock (1935) and Valentin Bargmann (1936) in the quantum context.
The formulation of the charged-particle Lagrangian with the vector potential is due to Hendrik Lorentz and was placed in the variational framework by Arnold Sommerfeld and Karl Schwarzschild around 1903-1916 [pending]. The gauge-invariant form became standard with the development of classical electrodynamics in the early 20th century.
Bibliography [Master]
@book{Lagrange1788Mecanique,
author = {Lagrange, Joseph-Louis},
title = {M{\'e}canique analytique},
year = {1788},
publisher = {Veuve Desaint},
address = {Paris}
}
@book{Arnold1989Mathematical,
author = {Arnold, V. I.},
title = {Mathematical Methods of Classical Mechanics},
series = {Graduate Texts in Mathematics},
volume = {60},
publisher = {Springer},
edition = {2nd},
year = {1989}
}
@book{Goldstein1980Classical,
author = {Goldstein, Herbert},
title = {Classical Mechanics},
publisher = {Addison-Wesley},
edition = {2nd},
year = {1980}
}
@book{LandauLifshitz1976Mechanics,
author = {Landau, L. D. and Lifshitz, E. M.},
title = {Mechanics},
series = {Course of Theoretical Physics},
volume = {1},
publisher = {Pergamon Press},
edition = {3rd},
year = {1976}
}
@book{Newton1687Principia,
author = {Newton, Isaac},
title = {Philosophiae Naturalis Principia Mathematica},
year = {1687},
publisher = {Royal Society},
address = {London}
}