Marginal

Analytical Mechanics

The elegant reformulations of mechanics that underlie modern physics and optimal control: the calculus of variations, the Lagrangian and the principle of least action, generalized coordinates, Noether's theorem, the Legendre transform, Hamilton's equations, Poisson brackets, Liouville's theorem, canonical transformations, action–angle variables and normal modes.

20 lessons in 2 units

Start your free trial14 days free. No card needed.
What you'll learn

20 lessons, one small step at a time

Each lesson states its goal, then works up to it in short steps with practice after each. A placement test at the start skips what you already know.

Lagrangian Mechanics

9 lessons
  1. FunctionalsEvaluate functionals on paths, compare paths with the same endpoints, and compute the first variation.
  2. The Euler–Lagrange equationCompute the partial derivatives of a Lagrangian, write its Euler–Lagrange equation, and read off what the equation gives.
  3. The LagrangianWrite the Lagrangian of a mechanical system, derive its equation of motion, and find the frequency of an oscillator.
  4. Angles as coordinatesWrite a pendulum's energy in its angle, derive its equation of motion, approximate it for small angles, and treat a bead on a spinning hoop.
  5. Generalized coordinatesDescribe two linked masses with one coordinate, recover a constraint force, and count degrees of freedom.
  6. The principle of least actionCompute the action of a free particle's true path, show that other paths cost more, and state what the principle does and does not claim.
  7. Cyclic coordinatesSpot cyclic coordinates in a Lagrangian, compute the momenta they conserve, and use the conservation to predict motion.
  8. The effective potentialCompute the effective potential of a central force, find circular orbits, and read the kind of orbit off the curve.
  9. Noether's theoremMatch symmetries of a Lagrangian to the quantities they conserve, and apply the same idea to gradient flow in machine learning.

Hamiltonian Mechanics

11 lessons
  1. The Legendre transformCompute the Legendre transform of a convex function, and use the duality between a function and its transform.
  2. Canonical momentumCompute canonical momenta from a Lagrangian, and Legendre-transform the Lagrangian into the Hamiltonian.
  3. Hamilton's equationsApply Hamilton's equations to find how a state moves in phase space, derive them from the Hamiltonian, and explain why their symmetric form matters.
  4. Poisson bracketsCompute Poisson brackets, and use them to find how quantities change in time and which are conserved.
  5. Liouville's theoremCompute the divergence of a phase-space flow, tell which flows preserve volume, and explain the consequences for statistical mechanics and sampling.
  6. Symplectic integratorsShow how explicit Euler drifts in energy, take symplectic Euler steps, and explain why leapfrog is used in practice.
  7. Canonical transformationsTest whether a change of phase-space variables is canonical, and explain what canonical transformations and generating functions are for.
  8. The action variableCompute the area of an oscillator's orbit in phase space, its action variable, and the frequency of motion from H(J).
  9. Adiabatic invarianceUse the adiabatic invariance of the action to compute how energy and amplitude change under slow changes, for oscillators and pendulums.
  10. Stiffness matricesCompute the potential energy of coupled springs, build the stiffness matrix, and write the equations of motion Mẍ = −Kx.
  11. Normal modesFind the normal modes and frequencies of coupled oscillators, and compute the beat time with which energy moves between them.
Sample lesson

Functionals

Goal: Evaluate functionals on paths, compare paths with the same endpoints, and compute the first variation.

In 1696 Johann Bernoulli challenged Europe's mathematicians: along which curve does a bead slide fastest between two points? Newton solved it overnight. The answer, a cycloid, launched the calculus of variations, which optimizes over whole functions rather than numbers.

We will get numbers from functions, compare paths, compute the first variation, and finish with length as a functional.

Step 1: Numbers from functions

A functional assigns a number to a whole function. The value y(0.5) at a midpoint, the area ∫₀¹ y dx and the maximum of y are all functionals of y. A derivative, by contrast, turns a function into another function, y′, not into a number. The central example in mechanics is an integral along a path:

S[x] = ∫t₀t₁ L(x, ẋ, t) dt

To evaluate it, substitute x(t) and ẋ(t) into L and integrate. Example: for x(t) = 2t, ẋ = 2, so ∫₀² ẋ² dt = ∫₀² 4 dt = 8. For x(t) = t, ∫₀¹ (ẋ² + x) dt = ∫₀¹ (1 + t) dt = 1.5.

Step 2: Comparing paths

Different paths with the same endpoints give different values. Among paths from x(0) = 0 to x(1) = 1, the functional ∫₀¹ ẋ² dt is 1 for the straight line x = t. Bulging the path, x = t + c·t(1 − t), keeps the endpoints, and ẋ = 1 + c(1 − 2t) gives

∫₀¹ ẋ² dt = 1 + c²/3

The cross term 2c∫₀¹(1 − 2t) dt vanishes and ∫₀¹(1 − 2t)² dt = ⅓, so any bulge, up or down, costs extra: with c = 3 the value is 4. The straight line is the minimizer.

Step 3: The first variation

The term linear in c is the first variation: the rate of change dS/dc at c = 0 along the perturbation η = t(1 − t). For ∫₀¹ ẋ² dt it is 2∫₀¹ ẋη̇ dt, which for the straight line is 2∫₀¹(1 − 2t) dt = 0: no first-order gain or loss, as at the bottom of a valley. For the path x = t², which has the same endpoints, it is 2∫₀¹ 2t(1 − 2t) dt = −⅔: bulging that way lowers the value, so x = t² is not the minimizer.

Step 4: Length as a functional

The length of a curve y(x) is also a functional, which depends on the curve only through its slope at each point:

Length[y] = ∫ √(1 + y′²) dx

For a straight line y = mx the integrand is the constant √(1 + m²): Pythagoras along each little step. Example: y = (5/12)x from x = 0 to 12 has √(1 + 25/144) = 13/12, so its length is 13. Finding the shortest curve between two points is then a calculus-of-variations problem: in a plane the answer is a straight line, and on the surface of a sphere the curves of stationary length are arcs of great circles.

In the app, each step ends with practice questions, new ones every time, and the lesson comes back later in spaced reviews.

Start Analytical Mechanics

Lessons that need something you haven't learned yet bring it in first, from any course.

Start your free trial14 days free. No card needed.