Cheatsheet

Calculus of Variations

All topics on one page

4modules
12articles
117definitions
42formulas

01

Foundations of the Calculus of Variations

Functionals, the first variation, and the Euler–Lagrange equation

Functionals and the Euler-Lagrange Equation

What is Calculus of Variations? → What is a Functional? → First Variation and the Idea of Deriving the EL Equation → Full Analysis: The Problem of the Shortest Distance → The Brachistochrone Problem → Extensions of the EL Equation → Applications

Definitions

Functional
a mapping from a space of functions to $\mathbb{R}$: $J: \{y : [a,b] \rightarrow \mathbb{R}\} \rightarrow \mathbb{R}$.
First variation
$\delta J[y^*; \eta] = \frac{d}{d\epsilon}\Big|_{\epsilon=0} J[y^* + \epsilon\eta]$
Main lemma
if a continuous $g$ is such that $\int g(x)\eta(x)\,dx = 0$ for all smooth $\eta$ with zero endpoints, then $g \equiv 0$.
Euler-Lagrange equation
$F_y - \frac{d}{dx}(F_{y'}) = 0$
Problem
Find the shortest curve in $\mathbb{R}^2$ between points $A = (0, 0)$ and $B = (1, 1)$.
Integrate
$\frac{y'}{\sqrt{1 + (y')^2}} = C$ (constant). Solve: $y'^2 = C^2(1 + y'^2) \rightarrow y'^2(1 - C^2) = C^2 \rightarrow y' = \frac{C}{\sqrt{1 - C^2}} = \text{const}$.
Conclusion
$y' = \text{constant} \rightarrow y = a x + b$—a straight line!
Higher derivatives
$J = \int F(x, y, y', y'')\,dx$. EL: $F_y - \frac{d}{dx} F_{y'} + \frac{d^2}{dx^2} F_{y''} = 0$.

Formulas

First variation: $\delta J[y^*; \eta] = \frac{d}{d\epsilon}\Big|_{\epsilon=0} J[y^* + \epsilon\eta]$Euler-Lagrange equation: $F_y - \frac{d}{dx}(F_{y'}) = 0$Problem: Minimize the time $J[y] = \int_0^a \frac{\sqrt{1 + (y')^2}}{\sqrt{2gy}}\,dx$.Higher derivatives: $J = \int F(x, y, y', y'')\,dx$. EL: $F_y - \frac{d}{dx} F_{y'} + \frac{d^2}{dx^2} F_{y''} = 0$.
  • ·$F_y = \partial F/\partial y = 0$ (F does not explicitly depend on $y$!)
  • ·$F_{y'} = \partial F/\partial p = p/\sqrt{1 + p^2} = y'/\sqrt{1 + (y')^2}$

Ordinary mathematical analysis seeks the extremum of a function of a number or vector: find $x$ that minimizes $f(x)$. Calculus of variations solves a problem of another level: find a function $y(x)$ that minimizes some “function of a function”—a functional. Such problems arise in physics (“along...

The history of the discipline begins in 1696, when Johann Bernoulli proposed the brachistochrone problem: find the shape of a slide along which a ball rolls between two points in the shortest time. The problem astonished contemporaries: the answer is not a straight line (the shortest distance), b...

Functional—a mapping from a space of functions to $\mathbb{R}$: $J: \{y : [a,b] \rightarrow \mathbb{R}\} \rightarrow \mathbb{R}$.

Here, $F$ is a given “Lagrangian function” of three arguments: $F(x, y, p)$, where $x$ is the independent variable, $y$ is the value of the function, $p = y'$ is the derivative. The functional “sums” the contribution of $F$ along the curve.

Second-Order Conditions and the Jacobi Condition

Motivation: When Is an Extremal a Minimum? → The Second Variation → The Legendre Condition → The Jacobi Equation and Conjugate Points → Complete Analysis: The Pendulum (Conjugate Points Problem) → Morse Theorem and Topological Consequences → Ritz Method: Approximate Solution → Weierstrass Conditions for Strong Minimum → Singular Extremals → Applications

Definitions

Second variation
$\delta^2 J[y^*; \eta] = \frac{d^2}{d\varepsilon^2}\Big|_{\varepsilon=0} J[y^* + \varepsilon\eta]$
Necessary condition for a minimum
$\delta^2 J[y^*; \eta] \geq 0$ for all admissible $\eta$.
Legendre condition (necessary)
for a minimum, it is necessary that $P(x) = F_{y'y'}(x, y^*(x), y^{*\prime}(x)) \geq 0$ on the entire segment $[x_0, x_1]$.
Meaning
$F$ must be “convex in $y'$” along the extremal. If $P(x) < 0$ at even a single point, the extremal is not a minimum.
Strengthened Legendre Condition (sufficient)
$P(x) > 0$ strictly on the entire $[x_0, x_1]$.
Example
$J[y] = \int \frac{1}{2}(y'^2 - y^2)\, dx$ (the pendulum). $F = \frac{1}{2}(p^2 - y^2)$. $F_{y'y'} = 1 > 0$—the Legendre condition is satisfied. This alone is not sufficient for a minimum; the Jacobi condition must also be checked.
Quadratic functional
$\delta^2 J = \int (P\, (\eta')^2 + Q\, \eta^2)\, dx$—this is a functional of $\eta$. For which $\eta$ is it minimal?
Jacobi condition for a minimum
the conjugate point $\bar{x}$ must not lie in the open interval $(x_0, x_1)$. If $\bar{x} \in (x_0, x_1)$, the extremal is not a minimum.
Functional
$J[y] = \frac{1}{2}\int_0^T (y'^2 - y^2)\, dx$ (small oscillations of the pendulum, $y$—the angle).
Jacobi equation
$-u'' - u = 0 \Rightarrow u'' + u = 0$. This is the harmonic oscillator equation!
Conjugate points
$u(\bar{x}) = \sin(\bar{x}) = 0 \Rightarrow \bar{x} = \pi, 2\pi, 3\pi, ...$
Conclusion
If $T < \pi$, then the conjugate point $\bar{x} = \pi > T$—the Jacobi condition is satisfied, the extremal is a minimum. If $T > \pi$, then $\bar{x} = \pi \in (0, T)$—the Jacobi condition is violated, the extremal is NOT a minimum.
Physical meaning
when $T < \pi$, the pendulum has not yet completed a quarter period—the trajectory is optimal. When $T > \pi$, the pendulum has “swung over”—there is a shorter path.
Morse theorem
connects critical points of the functional (extremals) with the topology of the path space. The number of geodesics between two points on a compact manifold is ≥ the sum of the Betti numbers of the path manifold. This gives lower bounds on the num...
Finite element method (FEM)
a variant of Ritz's method with piecewise linear basis functions. This is the foundation of ANSYS, COMSOL, and other engineering analysis systems. FEM reduces an infinite-dimensional variational problem to a finite-dimensional system of linear equ...

Formulas

Second variation: $\delta^2 J[y^*; \eta] = \frac{d^2}{d\varepsilon^2}\Big|_{\varepsilon=0} J[y^* + \varepsilon\eta]$Jacobi equation (zero eigenvalue): $-\left( P u' \right)' + Q u = 0$Functional: $J[y] = \frac{1}{2}\int_0^T (y'^2 - y^2)\, dx$ (small oscillations of the pendulum, $y$—the angle).Jacobi equation: $-u'' - u = 0 \Rightarrow u'' + u = 0$. This is the harmonic oscillator equation!Conjugate points: $u(\bar{x}) = \sin(\bar{x}) = 0 \Rightarrow \bar{x} = \pi, 2\pi, 3\pi, ...$
  • ·$P = F_{y'y'}$ (second derivative of $F$ with respect to $y'$)
  • ·$Q = F_{yy} - \frac{d}{dx} F_{yy'}$ (combined term)
  • ·Rocket control: calculating the optimal trajectory requires checking all second-order conditions to guarantee minimality
  • ·Aerodynamics: wing profile optimization as minimization of drag—one must check the Jacobi condition to ensure that the found profile is actually a minimum and not a saddle
  • ·Finance: optimal Merton consumption strategy—extremal of the HJB equation; second-order conditions guarantee maximum utility
  • ·Robotics: manipulator trajectory planning with energy minimization—checking second-order conditions at segment junction points

The Euler-Lagrange equation is a first-order condition, the analogue of “derivative equals zero.” Just like in ordinary calculus, a critical point can be a minimum, maximum, or a saddle point. Second-order conditions are needed to determine the type of extremal. This is especially important in op...

Consider the functional $J[y] = \int F(x, y, y')\, dx$ and its second derivative with respect to the parameter $\varepsilon$ under the perturbation $y^* + \varepsilon\eta$:

Second variation: $\delta^2 J[y^*; \eta] = \frac{d^2}{d\varepsilon^2}\Big|_{\varepsilon=0} J[y^* + \varepsilon\eta]$

Calculation (Taylor expansion in $\varepsilon$ up to $\varepsilon^2$ inclusive):

Isoperimetric Problems and Lagrange Multipliers

The Classical Riddle of Dido → Formulation of the Isoperimetric Problem → The Method of Lagrange Multipliers for Functionals → The Problem of the Catenary (Chain Line) → Dido's Problem: The Semicircle → General Formulation with Several Constraints → Fully Worked Example: Euler's Column Problem → Lagrange Principle: General Formulation → Second-Order Conditions with Constraints → Modern Isoperimetric Problems

Definitions

Classical formulation
among all closed curves of a given length L, find the one that bounds the largest area.
Theorem
for the problem $min\, J[y] = \int F(x,y,y')\, dx$ with constraint $J_2[y] = \int G(x,y,y')\, dx = C$, the extremal is an extremal of the auxiliary functional:
Formulation
a flexible chain of fixed length $L$ hangs between points $A$ and $B$. Under the influence of gravity, it assumes a shape minimizing potential energy. Find the shape of the chain.
Euler-Lagrange equation
the functional $H$ does not explicitly depend on $x$ → use the first integral:
Answer
$y = a\cosh(x/a + b) - \lambda$, where $a$, $b$ are constants from boundary conditions. This is the chain line (catenary).
Physical interpretation
the shape of the chain is not a parabola (as thought until Huygens and Leibniz)—it is a hyperbolic cosine! The difference is clearly visible for large sags.
Problem
fence the maximum territory along a straight shoreline, using a rope of length $L$.
This is the theorem on the isoperimetric inequality
for a curve of length $L$, the area $\leq L^2/(4\pi)$, with equality achieved for the circle.
Application
in construction, all columns, beams, and thin-walled structures are designed with a safety margin according to Euler's formula. This is a direct application of isoperimetric problems in variational calculus.

Formulas

How to find $\lambda$? From the condition $J_2[y] = C$—substitute the found extremal into the constraint and solve the equation for $\lambda$.Answer: $y = a\cosh(x/a + b) - \lambda$, where $a$, $b$ are constants from boundary conditions. This is the chain line (catenary).
  • ·Spectral optimization: which shape of a membrane has the smallest fundamental eigenvalue of the Laplacian for a given area? The answer is the disk (Faber-Krahn inequality)
  • ·Isoperimetric inequalities in high dimensions: in $\mathbb{R}^n$, the volume of the ball $V(r)$ gives the minimal surface $\Sigma$ for a given volume (Brunn-Minkowski theorem)
  • ·Isoperimetry on manifolds: on the sphere, geodesic balls minimize boundary area (Levy, Gromov)
  • ·Isoperimetry in graph theory (expansion): minimizing the number of edges at the boundary of a subset of vertices for a fixed size—foundation of random walk theory and spectral methods

According to legend, the Phoenician princess Dido fled to North Africa and asked the local chief for as much land as could be encompassed by a bull's hide. She cut the hide into thin strips and fenced a plot with them—taking the straight shoreline as one side. What shape did Dido choose? Naturall...

Classical formulation: among all closed curves of a given length L, find the one that bounds the largest area.

In analytical form: max $J_1[y] = \int_0^a y\, dx$ given $J_2[y] = \int_0^a \sqrt{1+y'^2}\, dx = L$.

This is a functional with a constraint-functional—an analogue of a constrained optimization problem in finite-dimensional space.

02

The Bolza Problem and Boundary Conditions

Generalized formulations of the calculus of variations and transversality conditions

Bolza Problem and Transversality Condition

Formulations with Free Endpoints → Three Classical Formulations → Transversality Condition → Multidimensional Problems: Functionals of $u(x, y)$ → Full Analysis: Shortest Distance from a Point to a Parabola → Applications of the Bolza Problem → Numerical Methods

Definitions

Lagrange problem
$\min J = \int F\, dx$ subject to differential constraints $G(x, y, y') = 0$. Motion along a curve with additional constraints.
Mayer problem
$\min J = g(x_0, y(x_0), x_1, y(x_1))$—we minimize only a boundary function, without an integral. This is a problem with free endpoints.
Derivation
when varying $\delta J = 0$ with an unfixed right endpoint, a “remainder” arises from integration by parts:
Transversality condition
$F_{y'} \cdot \varphi_x = (F - y' F_{y'}) \cdot \varphi_y$
Geometric meaning for the geodesic problem
if we seek the shortest distance from point A to a curve C, the transversality condition means that the extremal is perpendicular to C at the endpoint. This is intuitively evident: the shortest path from a point to a curve is the perpendicular to ...
Problem
find the shortest curve from point $A = (0, 2)$ to the parabola $C: y = x^2/2$.
Euler–Lagrange equation
extremals are straight lines $y = a x + b$.

Formulas

Lagrange problem: $\min J = \int F\, dx$ subject to differential constraints $G(x, y, y') = 0$. Motion along a curve with additional constraints.Derivation: when varying $\delta J = 0$ with an unfixed right endpoint, a “remainder” arises from integration by parts:Transversality condition: $F_{y'} \cdot \varphi_x = (F - y' F_{y'}) \cdot \varphi_y$Problem: find the shortest curve from point $A = (0, 2)$ to the parabola $C: y = x^2/2$.
  • ·Rocket control: the flight time $T$ is variable, the final position is the target point (Mayer). Fuel is minimized (Lagrange).
  • ·Economic growth: Ramsey’s problem—a consumer maximizes $\int_{0}^{\infty} e^{-\rho t} u(c(t))\,dt$ under capital dynamics $\dot{k} = f(k) - c$. Infinite horizon, a terminal condition on the limit $...
  • ·Robotics: manipulator trajectory—minimizing energy plus a penalty for final orientation.
  • ·Direct methods: discretization of state and controls, reduction to nonlinear programming (NLP). Solvers: IPOPT, SNOPT, Knitro.
  • ·Shooting method: integrating the system with adjustment of initial conditions via Newton’s method.
  • ·Pseudospectral methods (Radau, Chebyshev): representing the trajectory as a high-order polynomial, with exponential accuracy for smooth solutions. Used in GPOPS-II, DIDO.

In the simplest formulation of the calculus of variations, both endpoints of the curve are fixed: $y(x_0) = y_0$, $y(x_1) = y_1$. However, in many real problems, this is not the case. For example, one may need to find the shortest path from point A to a certain curve C (the endpoint is not fixed,...

Lagrange problem: $\min J = \int F\, dx$ subject to differential constraints $G(x, y, y') = 0$. Motion along a curve with additional constraints.

Mayer problem: $\min J = g(x_0, y(x_0), x_1, y(x_1))$—we minimize only a boundary function, without an integral. This is a problem with free endpoints.

Bolza problem (general form): $\min J = \int F\, dx + g(x_0, y_0, x_1, y_1)$ under additional constraints. It unifies the Lagrange and Mayer problems.

Variational Problems with Constraints and Connections

Constrained Systems in Physics and Mechanics → Holonomic Constraints → Non-holonomic Constraints → Carathéodory’s Theorem on Complete Variational Problems → Variational Inequality → Complete Analysis: The Pendulum via the Lagrange Multiplier Method → Lagrange Constraints vs Non-holonomic Constraints → Hamilton-Pontryagin Principle → Numerical Methods → Applications

Definitions

Method of solution
Either explicit parameterization (as with the pendulum), or the method of Lagrange multiplier functions.
Obstacle problem
find the minimal surface lying above a given obstacle $\psi(x, y)$. The solution satisfies:
Problem
a particle of mass $m$ is attached by a thread of length $l$ to the point $O = (0, 0)$. It moves under gravity. Find the equations of motion.
Variables
$x(t), y(t)$ — coordinates. Constraint: $\varphi = x^2 + y^2 - l^2 = 0$ (inextensible string).
Equations with multiplier
the Lagrange equation with reaction force from the constraint:
Transition to generalized coordinate
$\theta$ (angle). $x = l \sin\theta$, $y = -l \cos\theta$. $L = ml^2 \dot{\theta}^2/2 + mgl \cos\theta$. Euler-Lagrange: $ml^2\ddot{\theta} = -mgl\sin\theta \rightarrow \ddot{\theta} + (g/l)\sin\theta = 0$ — the pendulum equation. The constraint h...

Formulas

General formulation with $n$ variables $y_i(x)$ and $m$ constraints $G_j(x, y, y') = 0$:Variables: $x(t), y(t)$ — coordinates. Constraint: $\varphi = x^2 + y^2 - l^2 = 0$ (inextensible string).
  • ·Holonomic: $\varphi(x, y) = 0$ — a constraint only on coordinates. It can be explicitly solved and substituted, reducing the dimensionality.
  • ·Direct NLP transformation: discretization of states and controls, adding constraints as nonlinear conditions, solution via IPOPT, SNOPT
  • ·Projection method: after each gradient descent step, project the solution onto the set of admissible functions
  • ·Augmented Lagrangian: penalty function plus multipliers — robust solution of problems with active constraints
  • ·Robotics: motion of manipulators with mechanical connections (joints, contacts)
  • ·Transportation planning: accounting for constraints on acceleration, jerk, turning angle
  • ·Aerospace industry: trajectory optimization with constraints on thrust, heating, overloads
  • ·Biomechanics: modeling human gait as energy optimization under anatomical joint constraints
  • ·Chemical process control: constraints on temperature, pressure, reagent concentration — a standard formulation of a variational problem with active connections

In the real world, the motion of bodies is almost always constrained: a pendulum moves along an arc of a circle, a car rolls without slipping, a fluid flows through a pipe. Such constraints are called connections (constraints). The calculus of variations with constraints is a theory that enables ...

A holonomic constraint imposes a condition of the form φ(x, y(x)) = 0 — this is a functional equation on the curves. It is called this from the Greek “holos” (whole) — the constraint fully determines the configuration.

Example: the mathematical pendulum in Cartesian coordinates. A particle moves in ℝ² but is attached to a fixed point by a string of length $l$. The holonomic constraint: $x^2 + y^2 = l^2$. The system has $2 − 1 = 1$ degree of freedom. In the generalized coordinate θ (angle): $x = l \sin \theta$, ...

Method of solution: Either explicit parameterization (as with the pendulum), or the method of Lagrange multiplier functions.

Hamilton's Principle and Analytical Mechanics

Why is the Principle of Least Action so Important? → Principle of Least Action (Hamilton's Principle) → Generalized Coordinates: Elegance of the Method → Hamiltonian Formalism → Poisson Brackets and Conservation Laws → Complete Analysis: CO₂ Molecule Oscillations → Extension to Field Theory → Principle of Least Action in Physics → Symmetries and Integrability → Applications in Engineering

Definitions

Action
the functional $S[q] = \int_{t_0}^{t_1} L(t, q, \dot{q}) dt$, where $L = T - U$ is the Lagrangian (kinetic − potential energy), $q = (q_1,...,q_n)$ are generalized coordinates.
Hamilton's principle
the physical trajectory between $q(t_0)$ and $q(t_1)$ is the extremal of the functional $S$.
Generalized momentum
$p_i = \frac{\partial L}{\partial \dot{q}_i}$ (conjugate to $q_i$)
Hamiltonian
$H = \sum_i p_i\dot{q}_i - L$ (Legendre transformation)
Physical meaning
for conservative systems $H = T + U$ is the total energy. Conservation of $H \leftrightarrow$ does not explicitly depend on time: $\frac{\partial H}{\partial t} = 0$.
Poisson bracket
$\{f, g\} = \sum_i \left( \frac{\partial f}{\partial q_i} \frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i} \frac{\partial g}{\partial q_i} \right)$
Noether’s theorem (mechanical version)
each continuous symmetry of the action corresponds to a conservation law:
Model
three masses $m_1$, $m_2$, $m_1$ (O−C−O) on springs with stiffness $k$.

Formulas

Generalized momentum: $p_i = \frac{\partial L}{\partial \dot{q}_i}$ (conjugate to $q_i$)Hamiltonian: $H = \sum_i p_i\dot{q}_i - L$ (Legendre transformation)Mode 1 (symmetric): $x_1 = -x_3$, $x_2 = 0$. Both O atoms move in antiphase, C is stationary. $\omega_1 = \sqrt{2k/m_1}$.Mode 2 (asymmetric): $x_1 = x_3$, $x_2 = -2m_1x_1/m_2$. $\omega_2 = \sqrt{k (2m_1 + m_2)/(m_1 m_2)}$.Mode 3 (translation): $x_1 = x_2 = x_3 = \text{const}$. $\omega_3 = 0$—center-of-mass transfer.
  • ·Invariance under time shift $t \to t+\varepsilon$: $H$ (energy) is conserved
  • ·Invariance under translation $q \to q+\varepsilon$: $p$ (momentum) is conserved
  • ·Invariance under rotation: $L = q \times p$ (angular momentum) is conserved

In the 17th century, Newton described mechanics through forces: F = ma. This worked, but required explicit accounting for all forces, including reaction forces of constraints. In the 18th century, Lagrange showed: all mechanics can be expressed through a single variational principle—the principle...

Action: the functional $S[q] = \int_{t_0}^{t_1} L(t, q, \dot{q}) dt$, where $L = T - U$ is the Lagrangian (kinetic − potential energy), $q = (q_1,...,q_n)$ are generalized coordinates.

Hamilton's principle: the physical trajectory between $q(t_0)$ and $q(t_1)$ is the extremal of the functional $S$.

Lagrange equations (from Euler-Lagrange for S): $\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_i}\right) - \frac{\partial L}{\partial q_i} = 0$, $i=1,...,n$

03

Hamilton–Jacobi Theory and Geometrical Optics

The Hamilton–Jacobi equation, optimal transport, and geometric applications

Canonical Formalism and the Hamilton–Jacobi Equation

The Connection Between Optics and Mechanics → Legendre Transformation and the Hamiltonian → The Jacobi Action Function → The Hamilton–Jacobi Equation → Analogy Between Mechanics and Geometrical Optics → The Method of Characteristics → Complete Analysis: The Pendulum via HJ → Dynamic Programming as Discrete HJ → Method of Characteristics → Viscosity Solutions

Definitions

Generalized momentum
$p = \partial L / \partial y'$—the variable conjugate to $y'$.
Hamiltonian
$H(x, y, p) = p\cdot y' - L(x, y, y')$, where $y'$ is expressed through $p$ from $p = \partial L/\partial y'$.
Canonical equations
$\dot{y} = \partial H / \partial p$, $\dot{p} = -\partial H / \partial y$.
Example
$L = (1/2)y'^2 - U(y)$ (one-dimensional mechanics). $p = y'$. $H = p\cdot y' - (1/2)y'^2 + U = (1/2)p^2 + U$. Canonical equations: $\dot{y} = p$, $\dot{p} = -U'(y)$. This is Newton's equation!
Jacobi’s Theorem
along an extremal, $p = \partial S / \partial y$ (momentum = partial derivative of the action with respect to the configuration).
Geometric meaning
level surfaces $S(x, y) = C$ are called "wavefronts." Extremals ("trajectories," "rays") are perpendicular to the wavefronts—they point along $\nabla S$.
Fermat’s principle
light travels along the path that minimizes travel time. The functional: $J = \int n(x, y)\, ds$, where $n$ is the refractive index, $ds$ is the element of length.
Eikonal equation
$|\nabla S|^2 = n^2(x, y)$. This is a special case of HJ for optics.
Quantum mechanics
the wave function $\psi = \exp(iS/\hbar)$. Schrödinger’s equation as $\hbar\to0$: $[(\partial S/\partial t) + H(x, \nabla S)]\,\psi \to 0$. This is the HJ equation! Quantum interference effects are a consequence of finite $\hbar$.
Problem
free oscillations of a pendulum. $H = p^2/(2ml^2) + mgl(1 - \cos\theta)$.
Period of oscillations
$T = \partial S/\partial E = 2 \oint d\theta / |p/ml^2| = 2ml^2 \oint d\theta/\sqrt{2ml^2(E-mgl(1-\cos\theta))}$.

Formulas

Generalized momentum: $p = \partial L / \partial y'$—the variable conjugate to $y'$.Hamiltonian: $H(x, y, p) = p\cdot y' - L(x, y, y')$, where $y'$ is expressed through $p$ from $p = \partial L/\partial y'$.Canonical equations: $\dot{y} = \partial H / \partial p$, $\dot{p} = -\partial H / \partial y$.Jacobi’s Theorem: along an extremal, $p = \partial S / \partial y$ (momentum = partial derivative of the action with respect to the configuration).Period of oscillations: $T = \partial S/\partial E = 2 \oint d\theta / |p/ml^2| = 2ml^2 \oint d\theta/\sqrt{2ml^2(E-mgl(1-\cos\theta))}$.
  • ·Wavefronts = surfaces of equal phase
  • ·Rays = extremals (gradients of phase)
  • ·Refractive index $n$ = "slowness" (analogue of potential)

In the 1820s, William Hamilton noticed a striking analogy: the mathematics of geometrical optics (the path of a light ray) formally coincides with that of classical mechanics. This led him to create a unified formalism—the Hamilton–Jacobi equation. Later, in 1926, Schrödinger showed that quantum ...

Generalized momentum: $p = \partial L / \partial y'$—the variable conjugate to $y'$.

Hamiltonian: $H(x, y, p) = p\cdot y' - L(x, y, y')$, where $y'$ is expressed through $p$ from $p = \partial L/\partial y'$.

Canonical equations: $\dot{y} = \partial H / \partial p$, $\dot{p} = -\partial H / \partial y$.

Optimal Transport and the Monge-Kantorovich Problem

The Earth Moving Problem → Monge's Problem: Rigorous Formulation → Kantorovich's Formulation → Wasserstein Distance → Brenier-McCann Theorem → Applications in Machine Learning → Complete Analysis: Transport Plan in ℝ

Definitions

Monge’s problem
Find a mapping T: X → X (“transport plan”), mapping μ to ν (that is, T_#μ = ν — the “pushforward” of μ under T equals ν), minimizing the total cost:
The formulation problem of Monge
the mapping T is a “deterministic” plan, but sometimes it is optimal to “split” a unit of material. For example, part of the earth from location x₁ goes to hole y₁, part — to y₂. Monge’s plan does not allow for this.
Kantorovich's dual problem
by the LP duality theorem:
Properties
W_p is a true metric on the space of probability measures. Convergence in W_p is equivalent to weak convergence + convergence of the p-th moment.
Wasserstein space
P_p(ℝⁿ) with metric W_p is the “space of shapes”. Interpolation between μ and ν by W₂ is “optimal morphing” between two distributions.
Meaning
the optimal transport plan is a “shift along the gradient of a convex function”. This is striking: from the earth-moving problem, convexity arises!
Brenier-McCann polar decomposition
any mapping T: ℝⁿ → ℝⁿ that preserves measures (T_#μ = ν) decomposes as T = R ∘ ∇φ, where R is a rotation (distance-preserving), ∇φ is optimal transport.
WGAN (Wasserstein GAN)
training generative neural networks. The regular GAN uses KL-divergence, which is unstable for disjoint distributions. WGAN replaces it with W₁:
Point Cloud Matching
to match two sets of points {xᵢ} ~ μ and {yⱼ} ~ ν with minimal cost. The Sinkhorn algorithm is a fast iterative method for approximate solution of the Kantorovich problem with entropic regularization.
Morph between images
averaging images in Wasserstein space. Wasserstein barycenter: min_{ν} Σᵢ wᵢ W₂²(μᵢ, ν). The result is a “mean” image preserving geometry.
Problem
μ = 0.5 δ₀ + 0.5 δ₂ (mass 0.5 at points 0 and 2), ν = 0.5 δ₁ + 0.5 δ₃ (mass 0.5 at points 1 and 3). Cost c(x,y) = |x−y|².
Admissible plans
γ is defined by a 2×2 matrix with row sums (0.5, 0.5) and column sums (0.5, 0.5):
Cost
C(γ) = a|0−1|² + (0.5−a)|0−3|² + (0.5−a)|2−1|² + a|2−3|² = a + 9(0.5−a) + (0.5−a) + a = 4.5 − 8a.
W₂
√C = √0.5 ≈ 0.707.

Formulas

Theorem (for c(x,y) = |x−y|²/2, μ absolutely continuous): there exists a unique optimal mapping T = ∇φ, where φ is a convex function.
  • ·Kantorovich's problem is linear in γ (infinite-dimensional LP!)
  • ·Always has a solution (under reasonable conditions on c and μ, ν)
  • ·Monge’s problem is a special case: γ concentrated on the graph of T

In 1781, the French mathematician Gaspard Monge posed the question: how can a pile of earth (density μ) be moved into a hole (density ν) with minimal labor costs? The problem turned out to be incredibly difficult and remained unsolved for 160 years. In 1942, the Soviet mathematician Leonid Kantor...

Given two measures μ and ν on a space X (for example, probability distributions on ℝⁿ) and a cost function c(x, y) ≥ 0 (the cost of moving a “unit of material” from x to y).

Monge’s problem: Find a mapping T: X → X (“transport plan”), mapping μ to ν (that is, T_#μ = ν — the “pushforward” of μ under T equals ν), minimizing the total cost:

The formulation problem of Monge: the mapping T is a “deterministic” plan, but sometimes it is optimal to “split” a unit of material. For example, part of the earth from location x₁ goes to hole y₁, part — to y₂. Monge’s plan does not allow for this.

Geodesics on Surfaces and Minimal Surfaces

Geometry and Variational Calculus: an Inseparable Link → Geodesics: Definition and Equations → Geometric Meaning: Parallel Transport → Conjugate Points and Global Minimality → Minimal Surfaces → Thorough Analysis: Catenoid → Applications → Geodesics in General Theory of Relativity → Minimal Surfaces and Bubbles → Plateau's Problem

Definitions

On the plane
$g_{ij} = \delta_{ij} \rightarrow \Gamma^k_{ij} = 0 \rightarrow$ equation: $d^2 x^k/ds^2 = 0 \rightarrow x^k = a^k s + b^k$ (straight lines!).
Covariant acceleration
$\nabla_{\gamma'} \gamma' = \frac{d^2 x^k}{ds^2} + \Gamma^k_{ij} \dot{x}^i \dot{x}^j$.
Intuition
on a curved surface, a “straight line” is a curve along which you “walk straight” (not turning). If you draw a straight line on a sheet of paper and roll the paper into a cylinder, the drawn straight line becomes a geodesic (helical curve or strai...
Second variation of length
$\delta^2 J = \int [|J'|^2 - K(J, \gamma', J, \gamma')] ds$, where $K$ is Gaussian curvature, $J$ is the Jacobi field.
Jacobi–Bonnet theorem
a geodesic is the shortest curve up to the first conjugate point.
Example
on a sphere of radius $R$, geodesics are great circles. For the point $A = $“north pole,” the conjugate point is the “south pole” (at distance $\pi R$). The arc of a great circle from the north pole to the south is the shortest. But if you continu...
Physical meaning
a soap film assumes a minimal surface shape—when there is zero pressure difference, surface tension forces balance at every point. This is indeed $H = 0$.
Plateau's problem
does a minimal surface exist with a given boundary curve $\Gamma$?
Problem
find a surface of revolution of minimal area connecting two circles $x^2 + z^2 = r_0^2$ at $y = \pm h$.
Functional
$\text{Area} = 2\pi \int_{-h}^h r(y)\sqrt{1 + r'(y)^2}\, dy$.
Euler–Lagrange equation
$\frac{d}{dy}\left[\frac{r\, r'}{\sqrt{1 + r'^2}}\right] - \sqrt{1 + r'^2} = 0$.
Physical application
a soap film between two rings assumes the shape of a catenoid. When separating the rings: if the distance exceeds a critical value, the film “breaks” into two disks. This is a bifurcation of minimal surfaces!

Formulas

Covariant acceleration: $\nabla_{\gamma'} \gamma' = \frac{d^2 x^k}{ds^2} + \Gamma^k_{ij} \dot{x}^i \dot{x}^j$.Second variation of length: $\delta^2 J = \int [|J'|^2 - K(J, \gamma', J, \gamma')] ds$, where $K$ is Gaussian curvature, $J$ is the Jacobi field.Jacobi field along a geodesic $\gamma$: $J'' + K \cdot J = 0$ (simplified for surfaces). Zeros—conjugate points.Problem: find a surface of revolution of minimal area connecting two circles $x^2 + z^2 = r_0^2$ at $y = \pm h$.Functional: $\text{Area} = 2\pi \int_{-h}^h r(y)\sqrt{1 + r'(y)^2}\, dy$.Euler–Lagrange equation: $\frac{d}{dy}\left[\frac{r\, r'}{\sqrt{1 + r'^2}}\right] - \sqrt{1 + r'^2} = 0$.
  • ·Plane: $H = 0$ trivially
  • ·Catenoid: surface of revolution $y = a\cosh(x/a)$. The only minimal surface of revolution (apart from the plane)
  • ·Helicoid: $x = r\cos(az)$, $y = r\sin(az)$, $z = z$. “Twisted” catenoid
  • ·Mean curvature flow: evolution of the surface in the normal direction at speed $H$—the natural gradient flow for the area functional
  • ·Finite element method on surfaces: discretization of the surface with a triangular mesh and numerical solution of PDE
  • ·Level-set methods: representing the surface as the zero level of a function—robust to topological changes
  • ·Architecture: tent structures (stadiums, exhibition complexes—the roof of Munich Olympic Stadium by Frei Otto) are calculated as minimal surfaces
  • ·Materials science: grain structure in metals, phase boundaries
  • ·Biophysics: shape of biological membranes, vesicles, cell walls
  • ·Computer graphics: creation of smooth surfaces with given contours for 3D modeling
  • ·Tunnel engineering: optimization of tunnel shapes to minimize stress in rock

Differential geometry and variational calculus are closely intertwined: the key geometric objects are defined as extremals of functionals. Geodesics—the shortest curves—are extremals of the length functional. Minimal surfaces are extremals of the area functional. This connection is profound: unde...

A geodesic on a surface is a curve minimizing the length between two points (locally). Formally: an extremal of the functional $J[\gamma] = \int |\gamma'(t)| dt$.

where $s$ is arc length, $\Gamma^k_{ij}$ are Christoffel symbols—computed from the metric tensor $g_{ij}$:

$ \Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}) $

04

Modern Applications of the Calculus of Variations

Shape optimization, continuum mechanics, and Noether’s theorem

Shape Optimization and Topological Optimization

From Formula to Form: A Practical Task → Formulation of the Shape Optimization Problem → Method of Boundary Variations (Hadamard's Formula) → Topological Optimization: The SIMP Method → Aerodynamic Optimization: Adjoint Method → Full Analysis: Topological Optimization of a Beam → Theory of Optimal Control → Bang-bang Control → Numerical Methods of Optimal Control → Applications

Definitions

Optimality condition
for the optimal shape, $j(x) = \text{const}$ on $\partial\Omega$ (or equal to the Lagrange multiplier under an isoperimetric constraint).
Example
For a diffusion problem ($-\Delta u = f$ in $\Omega$, $u = 0$ on $\partial\Omega$), $J = \int_\Omega u \, dx$: the shape derivative $\frac{dJ}{dt} = -\int_{\partial\Omega} \left( \frac{\partial u}{\partial n} \right)^2 V \cdot n \, dS$. Optimality...
Density approach
$\rho(x) \in [0, 1]$—"material density" at each point. $\rho = 1$: material present. $\rho = 0$: void.
Task
$\min_{\rho \in [0,1]} \int_\Omega \rho \, d\Omega$ (material volume) subject to compliance constraints (structure stiffness).
Problem
$J$ depends on $u$, which depends on $\Omega$. The gradient $\frac{dJ}{d\Omega}$ is needed for optimization, but brute-force calculation requires $N$ computations for $N$ shape parameters.
Adjoint method
introduce an adjoint field $p$ (solution of the "reverse" problem), then:
Application
Airbus uses the adjoint method to optimize A380 wing profiles. NASA optimizes turbine blades. Fuel savings—2–5% due to optimal shaping.
Initial state
$\rho = 0.5$ everywhere. Stiffness is uniform.
After 5 iterations
"struts" appear from the supports to the loaded point, material flows out of unloaded regions.
After 50 iterations
black-and-white structure. Triangular struts stretching from the load center to the anchor points. Looks like a bridge truss!
Result
stiffness increased by 3.5 times at the same mass compared to uniform distribution. Such a design is impossible without topological optimization.

Formulas

Shape derivative (Hadamard's formula): $\left.\frac{dJ}{dt}\right|_{t=0} = \int_{\partial\Omega} j(x) \cdot (V \cdot n) \, dS$Density approach: $\rho(x) \in [0, 1]$—"material density" at each point. $\rho = 1$: material present. $\rho = 0$: void.
  • ·$J(\Omega) = \int_\Omega u \,dx$ (average displacement under load)
  • ·$J(\Omega) = \int_{\partial\Omega} q^2 \,dS$ (heat flux through the surface)
  • ·$J(\Omega) = \max_{x \in \Omega} \sigma(x)$ (maximum stress)
  • ·$J(\Omega) = |\Omega|$ (volume of material) under strength constraints
  • ·Indirect methods: derive necessary conditions (maximum principle), solve the boundary value problem for the ODE system
  • ·Direct methods: discretization and conversion to NLP—IPOPT, SNOPT
  • ·Pseudospectral methods: representing the trajectory by a high-order polynomial (GPOPS-II, DIDO)
  • ·Differential Dynamic Programming (DDP): iterative second-order method, basis for modern RL and trajectory planning algorithms
  • ·Aerospace industry: optimal rocket launch trajectories (fuel minimization to reach a given orbit), interplanetary missions (Voyager, New Horizons, Cassini)
  • ·Robotics: motion planning for manipulators and drones
  • ·Finance: optimal consumption and investment (Merton model)
  • ·Energy: optimal real-time control of power plants
  • ·Medicine: optimization of drug dosage, chemotherapy scheduling
  • ·Epidemiology: optimal vaccination and social distancing strategies

An engineer is designing a load-bearing beam of an aircraft wing. Requirements: withstand a given load and weigh as little as possible. Where to remove material? The shape of the wing is optimized precisely as the solution of a variational problem—to minimize the volume (mass) under strength cons...

Given a domain $\Omega \subset \mathbb{R}^n$—the "body"—with boundary $\Gamma = \partial\Omega$. A partial differential equation (deformation, flow, heat) is solved on $\Omega$. The problem: find a shape $\Omega$ minimizing a functional $J(\Omega)$.

A challenge: the region $\Omega$ is an infinite-dimensional object. How to take a "derivative" with respect to the shape?

A family of domains: $\Omega_t$, deformed along a velocity vector $V(x)$ on the boundary:

Variational Methods in Continuum Mechanics

Variational Principles as the Language of Mechanics → The Principle of Virtual Displacements → Principle of Minimum Potential Energy → FEM: Ritz Method with Finite Elements → Mixed Principles → Full Analysis: Bending of an Euler–Bernoulli Beam → Nonlinear Elasticity and Hyperelasticity → Principle of Minimum Potential Energy → Euler's and Navier–Stokes Equations for Fluids → The Finite Element Method (FEM)

Definitions

Statement
a body Ω is in equilibrium under the action of body forces f and surface loads t on a part ∂Ω_t.
Principle of virtual displacements
a body is in equilibrium if and only if the total virtual work is zero for any admissible virtual displacement δu:
Total potential energy
Π[u] = ∫_Ω W(ε(u)) dV − ∫_Ω f·u dV − ∫_{∂Ω_t} t·u dS
Principle
among all admissible displacement fields (satisfying kinematic boundary conditions), the equilibrium field minimizes Π.
Idea
partition Ω into finite elements Ωₑ (triangles, tetrahedra). Within each element, approximate u by polynomial shape functions Nᵢ(x): u ≈ Σᵢ uᵢ Nᵢ(x), where uᵢ are nodal displacements.
Substitute into Π
Π[u] = Π(u₁,...,uN)—a function of N real numbers.
Dimension
N = 3 × (number of nodes). For an aircraft model—millions of degrees of freedom. ANSYS solves such systems within hours.
Castigliano's principle
for structures with known forces—the displacement at the point of force application equals the derivative of the complementary energy with respect to that force. Simple for trusses and beams.
Problem
a beam of length L, clamped at x=0 (fixed: u(0)=u'(0)=0), the free end loaded by a force P at x=L. Find the deflected shape of the beam.
Functional
Π[u] = ∫₀ᴸ (EI/2)(u'')² dx − P·u(L)
Euler-Lagrange equation
∂Π/∂(δu) = 0 → EI u'''' = 0 on (0, L).
Boundary conditions
u(0) = u'(0) = 0 (clamping), EI u''(L) = 0, EI u'''(L) = P.
Solution
u'''' = 0 → u = ax³ + bx² + cx + d. From BC: d = 0, c = 0, 6aL + 2b = 0, 6aEI = P.
Deflection at the end
u(L) = PL³/(3EI)—the standard formula of structural mechanics!
Models
neo-Hookean (W = μ(I₁−3)/2), Mooney–Rivlin (W = C₁(I₁−3) + C₂(I₂−3)). Used in biomechanics (heart, blood vessel, skin modeling), rubber products, soft robotics.

Formulas

Problem: a beam of length L, clamped at x=0 (fixed: u(0)=u'(0)=0), the free end loaded by a force P at x=L. Find the deflected shape of the beam.Boundary conditions: u(0) = u'(0) = 0 (clamping), EI u''(L) = 0, EI u'''(L) = P.Deflection at the end: u(L) = PL³/(3EI)—the standard formula of structural mechanics!
  • ·σᵢⱼ — stress tensor (6 independent components for symmetric σ)
  • ·δεᵢⱼ = (δuᵢ,ⱼ + δuⱼ,ᵢ)/2 — virtual strain (symmetrized gradient)
  • ·fᵢ — components of body forces (for example, gravity, fi = ρgᵢ)
  • ·tᵢ = σᵢⱼnⱼ — components of surface loads
  • ·Civil engineering: analysis of bridges, skyscrapers, dams (Burj Khalifa, Akashi Kaikyo Bridge)
  • ·Aviation: analysis of load-bearing aircraft structures (Boeing 787, Airbus A350)
  • ·Automotive engineering: crash tests via numerical modeling
  • ·Biomechanics: modeling of bones, implants, blood flow
  • ·Geophysics: modeling tectonics, earthquakes

Continuum mechanics is the theory of deformable bodies: beams, plates, fluids, rubbers. Its equations (of equilibrium, motion) are derived from variational principles. This is not merely a mathematical convenience: the variational formulation directly generates the finite element method—the main ...

Statement: a body Ω is in equilibrium under the action of body forces f and surface loads t on a part ∂Ω_t.

Principle of virtual displacements: a body is in equilibrium if and only if the total virtual work is zero for any admissible virtual displacement δu:

This is the "weak" formulation of the equilibrium equations. The "strong" form follows from integration by parts: ∂ⱼσᵢⱼ + fᵢ = 0 in Ω, σᵢⱼnⱼ = tᵢ on ∂Ω_t.

Noether's Theorem and Conservation Laws

"The Most Beautiful Theorem in Mathematics" → Symmetries and Invariance of the Action → Formulation of Noether's Theorem → Examples of Conservation Laws → Noether's Theorem in Field Theory → Symmetry Breaking and the Goldstone/Higgs Theorems → Complete Analysis: Central Fields and Kepler's Laws

Definitions

Invariance
$S[\bar{y}] = S[y]$ for all admissible $y$ — a condition on $L$ and $(\xi, \eta)$.

Formulas

Invariance: $S[\bar{y}] = S[y]$ for all admissible $y$ — a condition on $L$ and $(\xi, \eta)$.System: a particle in a central field $U = U(r)$, $r = \sqrt{x^2 + y^2}$. $L = m(\dot{x}^2 + \dot{y}^2)/2 - U(r)$.Noether current: $J = m(x\dot{y} - y\dot{x}) = L_z$ (angular momentum along the $z$-axis). Law: $L_z = \text{const}$.

In 1915, Emmy Noether proved a theorem that physicists call one of the greatest achievements of mathematical physics of the 20th century. The theorem asserts: every continuous symmetry of a physical system corresponds to a conservation law. Is space homogeneous? → momentum is conserved. Is time h...

A symmetry of the action $S[y] = \int L(x, y, y')\,dx$ is a one-parameter group of transformations $(x, y) \to (\bar{x}(x, y, \varepsilon), \bar{y}(x, y, \varepsilon))$ as $\varepsilon \to 0$, not changing the value of $S$.

Infinitesimal transformation: $\bar{x} = x + \varepsilon\xi(x, y) + O(\varepsilon^2)$, $\bar{y} = y + \varepsilon\eta(x, y) + O(\varepsilon^2)$.

Invariance: $S[\bar{y}] = S[y]$ for all admissible $y$ — a condition on $L$ and $(\xi, \eta)$.