Introduction
Welcome to the first lesson of our module on Analytical Mechanics! In the previous module, we explored Newtonian dynamics, culminating in the analysis of coupled oscillators. We saw how systems of coupled differential equations can describe complex motion, and we developed matrix methods to find the simple, underlying normal modes. That approach, based on forces (), is powerful but can become cumbersome for complex systems with many constraints.
In this new module, we will explore a more elegant and powerful formulation of mechanics. Instead of dealing with vector forces, we will work with scalar quantities like energy and a profound concept known as the Principle of Least Action. The mathematical foundation for this principle is the calculus of variations.
Today's lesson is dedicated to this essential mathematical tool. You will learn how to find not just a point that minimizes a value, but an entire function or path that minimizes (or maximizes) a certain quantity. Specifically, the learning outcome for this lesson is to apply the calculus of variations to find functions that extremize functionals, such as finding the brachistochrone. This will equip you with the mathematical machinery needed to unlock the Lagrangian and Hamiltonian formalisms in the lessons to come.
1. From Functions to Functionals
In standard calculus, you work with functions, which are maps from numbers to numbers. For example, takes a number and returns a number .
The calculus of variations deals with a different kind of object called a functional. A functional is a map from a function to a number.
Consider these examples:
- Arc Length: The total length of a curve described by the function from to is given by the integral . The functional takes the entire function as input and outputs a single number, its length.
- Travel Time: The time it takes for a particle to travel along a path with speed is given by . Again, the functional maps a path (a function) to a number (the travel time).
The fundamental problem of the calculus of variations is this: Given a functional that depends on a function and its derivatives, find the specific function that makes the functional's value an extremum (a minimum or a maximum).
Chapter 1 Calculus of Variations
To formalize this, please read the introductory sections of the chapter 'Calculus of Variations' from the textbook 'Mathematics for Physics' by Stone and Goldbart. This will introduce the concept of a functional and set up the problem we aim to solve.
Please read sections 1.1 'What is it good for?' and 1.2 'Functionals' (up to subsection 1.2.1). This will introduce some classic problems, including the Brachistochrone, and formally define what a functional is.
2. The Euler-Lagrange Equation: A Condition for Extrema
How do we find the function that extremizes a functional of the form ?
Let's draw an analogy with ordinary calculus. To find an extremum of a function , we find the point where its derivative is zero, . For functionals, we do something similar. We assume we have the correct solution, , and we consider a family of "nearby" functions given by . Here:
- is an arbitrary, well-behaved function that vanishes at the endpoints () so that all varied paths start and end at the same points.
- is a small parameter. When , we recover our true path .
By substituting into the functional , it becomes a regular function of , i.e., . The condition for an extremum is that the derivative with respect to must be zero at :
Working through the mathematics of this condition, which involves differentiating under the integral sign and using integration by parts, leads to a remarkable result: the Euler-Lagrange equation.
The following video provides a clear, rigorous derivation. Given your preference for mathematical formalism, following these steps is crucial for a deep understanding.
Derivation of the Euler-Lagrange Equation | Calculus of Variations
This video from 'Faculty of Khan' provides a step-by-step derivation of the Euler-Lagrange equation. Pay close attention to the role of the varied path and the integration by parts step, which is the key mathematical maneuver.
Watch the entire video (about 7.5 minutes). It starts by setting up the problem with a varied path and systematically derives the final equation. Ensure you understand why the arbitrary nature of the variation function \eta(x) forces the term multiplying it inside the integral to be zero.
The derivation shows that for the functional to be stationary, the function must satisfy the Euler-Lagrange equation:
This is a second-order ordinary differential equation for . By solving it with the given boundary conditions, we can find the path that extremizes our functional.
3. First Application: The Shortest Path
Let's test this powerful equation on a simple problem: finding the shortest path between two points and in a plane. We intuitively know the answer is a straight line, but let's prove it.
The functional to minimize is the arc length:
Here, the integrand is . Notice that does not depend explicitly on or .
Let's apply the Euler-Lagrange equation:
- since does not appear in .
- .
The Euler-Lagrange equation becomes:
This means the quantity inside the derivative must be a constant:
Solving for (by squaring both sides and rearranging) shows that must be a constant, let's call it .
Integrating with respect to gives the equation of a straight line:
The constants and are determined by the boundary conditions that the line must pass through and . This confirms our intuition and validates the method.
The Beltrami Identity: A Useful Shortcut
In the example above, and in many physics problems, the integrand does not depend explicitly on the variable of integration . In such cases, there is a simplified "first integral" of the Euler-Lagrange equation, known as the Beltrami Identity (or Beltrami's formula):
Applying this to the shortest path problem () gives:
This implies that is constant, which in turn means must be constant. We arrive at the same conclusion much faster. Keep this identity in mind, as it will be very useful for our next problem.
4. The Brachistochrone Problem
Now we will tackle a famous historical problem posed by Johann Bernoulli in 1696: the brachistochrone problem. The name means "shortest time" in Greek. The challenge is to find the shape of a frictionless wire connecting two points, A and B, such that a bead sliding on it under gravity travels from A to B in the minimum possible time.
To solve this, we must first formulate the functional for the total travel time and then use the Euler-Lagrange equation to minimize it. The following video walks through the entire process, from physical setup to the final mathematical solution.
The Brachistochrone Problem and Solution | Calculus of Variations
The 'Faculty of Khan' video on the Brachistochrone problem provides an excellent, self-contained solution. It begins by setting up the time functional using conservation of energy and then solves it using the Beltrami identity we just learned.
Watch from the beginning to 10:33. (0:00 - 2:40): Understand the problem statement and the physical intuition. (2:40 - 4:49): Pay close attention to how the functional for total time T[y] is constructed. The velocity v is found using conservation of energy. (4:49 - 10:33): Follow the application of the Beltrami identity and the subsequent steps to solve the resulting differential equation. The use of a trigonometric substitution is a standard technique for this type of integral.
As the video explains, let's set up the coordinate system with the starting point at the origin (0,0) and the y-axis pointing downwards.
- Velocity: From conservation of energy, , so the velocity at a depth is .
- Time element: The time to travel an infinitesimal arc length is .
- Functional: The total time to minimize is:
The integrand, , does not depend on . This makes it a perfect candidate for the Beltrami Identity. Applying it leads to the differential equation:
where is a constant. This equation can be solved using a parameterization, and the solution is a remarkable curve: the cycloid.

The parametric equations for the cycloid are:
where is a constant related to the radius of the generating circle, and is the parameter. The constant is chosen to ensure the curve passes through the desired endpoint.
Test your understanding!
Fermat's Principle in optics states that light travels between two points along the path that takes the minimum time. In a medium with a refractive index that varies with position, the speed of light is , where is the speed of light in vacuum.
Formulate the functional for the travel time of a light ray, and write down the corresponding Beltrami identity (since will not depend on ). How does this relate to the brachistochrone problem?
Show answer
-
Functional: The travel time is .
The integrand is . -
Beltrami Identity: Since has no explicit dependence, we have .
Simplifying gives:
-
Relation: The brachistochrone problem is mathematically identical to finding the path of light in a medium where the refractive index is inversely proportional to the square root of the depth, .
Conclusion
In this lesson, we have introduced the foundational concepts of the calculus of variations. You have learned how to shift your thinking from finding extremal points of functions to finding extremal paths (functions) of functionals.
Key Takeaways:
- A functional is a mapping from a function to a real number, often expressed as an integral involving the function and its derivatives.
- The condition for a functional to be stationary is given by the Euler-Lagrange equation: .
- For cases where the integrand does not explicitly depend on , the Beltrami identity provides a simpler, first-integral form of the solution: .
- We applied this machinery to show that the shortest path between two points is a straight line and, more impressively, that the path of fastest descent under gravity (the brachistochrone) is a cycloid.
Preview of the Next Lesson:
The Euler-Lagrange equation you mastered today is not just a mathematical curiosity; it is the engine of analytical mechanics. In our next lesson, we will introduce the Principle of Least Action (also known as Hamilton's Principle). We will postulate that the true path taken by any classical mechanical system between two points in time is the one that minimizes a functional called the "action." By applying the Euler-Lagrange equation to the action functional, we will derive the fundamental equations of motion in a new, powerful form, marking our official entry into Lagrangian Mechanics.