IB Variational Principles
In calculus of variations, our goal is to extremise the functional (function on the space of functions) $$ \begin{align*} F[y] = \int_{x_1}^{x_2} f(x,y(x),y'(x))\, dx \end{align*} $$ among all (sufficiently smooth) functions $y(x)$ such that $y(x_1) = y_1$ and $y(x_2)=y_2$.
See IA Differential Equations for determining the nature of stationary points of multivariate functions.
See IB Optimisation for the Lagrange multiplier method.
Given some function $f$ and constants $x_1,x_2,y_1,y_2$, Suppose $y(x)$ is an extremum of the functional $$ \begin{align*} F[y] = \int_{x_1}^{x_2} f(x,y(x),y'(x))\, dx \end{align*} $$ subject to $y(x_1) = y_1$ and $y(x_2) = y_2$.
Then $y(x)$ satisfies the Euler-Lagrange equation $$ \begin{align*} \dd{x}\left(\pdfd{f}{y'}\right) - \pdfd{f}{y} = 0. \end{align*} $$
Other boundary conditions may also work; see the proof.
The Euler-Lagrange equation is typically a second-order ODE in $y$.
-
If $f$ does not depend explicitly on $y$, i.e. $f(x,y')$, then Euler-Lagrange gives $$ \begin{align*} \pdfd{f}{y'} = \text{const}. \end{align*} $$ (Derivation)
-
If $f$ does not depend explicitly on $x$, i.e. $f(y,y')$, then Euler-Lagrange gives $$ \begin{align*} f - y'\pdfd{f}{y'} = \text{const}. \end{align*} $$ (Derivation)
Examples:
We want to extremise $F[y] = \int_{\alpha}^{\beta} f(x,y,y')\, dx$ subject to $G[y] = \int_{\alpha}^{\beta} g(x,y,y')\, dx = k$ a constant.
In this case, we use Lagrange multiplier: extremise $\Phi[y;\lambda] = F[y] - \lambda G[y]$ for each $\lambda$, then set $\lambda$ so that the minimiser $y$ satisfies the constraint.
Therefore the Euler-Lagrange equation with Lagrange multiplier is $$ \begin{align*} \dd{x}\left(\pdd{y'}(f-\lambda g)\right) - \pdd{y}(f-\lambda g) = 0. \end{align*} $$
Let $\v y(x) = (y_1(x), y_2(x), \ldots, y_n(x))$ and we want to extremise $$F[\v y] = \int_{\alpha}^{\beta} f(x,y_1,y_2,\ldots,y_n, y_1', y_2',\ldots,y_n')\, dx$$ subject to boundary conditions $\v y(\alpha) = \v y_1$ and $\v y(\beta) = \v y_2$.
The necessary condition for an extremum is $$ \begin{align*} \dd{x}\left(\pdfd{f}{y_i'}\right) - \pdfd{f}{y_i} = 0, \quad \forall i=1,2,\ldots,n. \end{align*} $$
-
If $f$ does not depend on $y_j$ for some $j$, then $\pdfd{f}{y_j} = 0$ so $$ \begin{align*} \pdfd{f}{y_j'} = \text{const.} \end{align*} $$
-
If $f$ does not depend on $x$, then we have $$ \begin{align*} f - \sum_{i=1}^{n} y_i' \pdfd{f}{y_i'} = \text{const.} \end{align*} $$ (Derivation)
Let $\v x = (x_1, x_2,\ldots, x_n)$ and we want to find $\phi(x_1, x_2, \ldots, x_n)$ to extremise $$ \begin{align*} F[\phi] = \iiint_D f(x_1, x_2, \ldots, x_n, \phi, \phi_{x_1}, \phi_{x_2}, \ldots, \phi_{x_n})\, dV \end{align*} $$ (where $\phi_{x_j} \equiv \pdfd{\phi}{x_j}$) subject to $\phi(\v x) = g(\v x)$ on the boundary $\partial D$.
The necessary condition for an extremum is $$ \begin{align*} \left(\sum_{i=1}^n \pdd{x_i}\left(\pdfd{f}{\phi_{x_i}}\right)\right) - \pdfd{f}{\phi} = 0 \end{align*} $$ where $\partial/\partial x_i$ fixes $x_1,\ldots,x_n$ except $x_i$ but not $\phi, \phi_{x_1}, \ldots, \phi_{x_n}$, and $\partial/\partial \phi_{x_i}$ fixes $x_1, \ldots, x_n, \phi$ and $\phi_{x_1}, \ldots, \phi_{x_n}$ except $\phi_{x_1}$
We want to extremise $$ \begin{align*} F[y] = \int_{\alpha}^{\beta} f(x,y,y',y'',\ldots,y^{(n)})\, dx \end{align*} $$ subject to $y,y',\ldots,y^{(n-1)}$ being fixed at $\alpha$ and $\beta$.
The necessary condition for an extremum is $$ \begin{align*} \pdfd{f}{y} - \dd{x}\left(\pdfd{f}{y'}\right) + \dd[2]{x}\left(\pdfd{f}{y''}\right) + \ldots+(-1)^n \dd[n]{x}\left(\pdfd{f}{y^{(n)}}\right) \equiv \sum_{i=0}^{n} (-1)^i\dd[i]{x}\left(\pdfd{f}{y^{(i)}}\right) = 0 \end{align*} $$
If $f$ does not depend on $y$, we have a first integral $$ \begin{align*} \pdfd{f}{y'} - \dd{x}\left(\pdfd{f}{y''}\right) + \ldots + (-1)^{n-1} \dd[n-1]{x}\left(\pdfd{f}{y^{(n)}}\right) = \text{const.} \end{align*} $$
See IB Optimisation for discussion about convex functions.
The Legendre transform of $f(\v x): \R^n\to\R$ is defined as $$ \begin{align*} f^\ast(\v p) = \sup_{\v x} \left[\v p\cdot \v x - f(\v x)\right] \end{align*} $$ whose domain is all $\v p\in\R^n$ for which the right hand side is finite.
Let $f(\v x): \R^n\to\R$ be a function and $f^\ast$ be its Legendre transform.
The domain of $f^\ast$ is a convex set, and $f^\ast$ is a convex function.
If $f$ is convex, then $f^{\ast \ast} = f$.
If $f: \R^n \to \R$ is strictly convex and differentiable, then the Legendre transform $$ \begin{align*} f^\ast(\v p) = \v p\cdot \v x(\v p) - f(\v x(\v p)) \end{align*} $$ where $\v x(\v p)$ is the solution to $\v p = \nabla f(\v x)$.
Define the Lagrangian $$ \begin{align*} L(\v x,\dv x, t) = T - V \end{align*} $$ where
-
$t$ is the independent variable;
-
$\v x=(x,y,z)$ are the dependent variables;
-
$T$ is the kinetic energy;
-
$V$ is the potential energy.
Given the Lagrangian $L(\v x,\dv x, t)$, define the action $$ \begin{align*} S[\v x] = \int_{t_1}^{t_2} L\, dt. \end{align*} $$
The motion of the system is such that action is minimised.
Examples: Newton second law, central forces
We can consider $N$ particles in the same formalism: consider the configuration space $\R^{3N}$. We use a single generalised position $\v q\in\R^{3N}$ to represent all $N$ positions and a single Lagrangian $L(\v q, \dv q, t)$.
Suppose there is a family of transformations $\v x(t) \to \v X(t,s)$ with parameter $s$ satisfying $\v x(t) = \v X(t,0)$.
We say this is a (continuous) symmetry of a function $f(\v x, \dv x, t)$ if $$ \begin{align*} \dd{s} f(\v X(t,s), \dv X(t,s), t) = 0. \end{align*} $$
Examples: conservation of momentum, angular momentum.
Define the Hamiltonian as $$ \begin{align*} H(\v q, \v p, t) = \sup_{\dv q} \left[\v p\cdot\dv q - L(\v q,\dv q,t)\right], \end{align*} $$ i.e. the Legendre transform of the Lagrangian $L(\v q, \dv q, t)$ with respect to the generalised velocity $\dv q$.
$\v p$ is called the generalised momentum. $(\v q,\v p)$ is called a conjugate pair.
Assuming the convexity of $L$ with respect to $\dv q$, the Hamiltonian is $$ \begin{align*} H(\v q,\v p,t) = \v p\cdot \dv q - L(\v q,\dv q, t)\qquad \text{with $\dv q$ such that } p_i = \pdfd{L}{\dot q_i}. \end{align*} $$
Example (Hamiltonian with non-relativistic kinetic energy)
By the principle of least action, the Hamiltonian $H(\v q, \v p, t)$ satisfies Hamilton's equations $$ \begin{align*} \dot q_i = \pdfd{H}{p_i}, \qquad \dot p_i = -\pdfd{H}{q_i}, \qquad \pdfd{H}{t} = -\pdfd{L}{t}. \end{align*} $$ (Caution: in the last equation, $\left.\pdd{t}\right|_{\v q,\v p} \neq \left.\pdd{t}\right|_{\v q,\dv q}$.)
Suppose the Hamiltonian $H$ of a system does not depend explicitly on time, i.e. $\partial L/\partial t = -\partial H/\partial t = 0$.
Then $H$ is constant, i.e. $dH/dt = 0$.
We now have mulitple formulations of dynamics:
-
Newton's equations: second order DEs $$ \begin{align*} m\ddv x = \v F; \end{align*} $$
-
Lagrangian and least action: integral (or Euler-Lagrange) $$ \begin{align*} \int L\, dt \text{ minimised}; \end{align*} $$
-
Hamilton's equations: 1st order PDEs $$ \begin{align*} \dv q = \pdfd{H}{\v p}, \qquad \dv p = -\pdfd{H}{\v q}. \end{align*} $$
We want to test whether a stationary point $y(x)$ of the functional $F[y] = \int_{\alpha}^{\beta} f(x,y,y')\, dx$ is a local minimum.
The expansion of the functional $F[y] = \int_{\alpha}^{\beta} f(x,y,y')\, dx$ about a stationary point $y$ is, given that $\eta=0$ at endpoints, $$ \begin{align*} F[y+\epsilon\eta] = F[y] + \frac{1}{2}\epsilon^2\underbrace{\int_{\alpha}^{\beta} \left(P(x) (\eta')^2 + Q(x)\eta^2\right)\, dx}_\text{second variation $\delta^2 F$} \end{align*} $$ where $$ \begin{align*} P(x) &= \pdfd[2]{f}{y'}, & Q(x) &= \pdfd[2]{f}{y} - \dd{x}\left(\frac{\partial^2 f}{\partial y\partial y'}\right). \end{align*} $$
Under what conditions for $P$ and $Q$ is $y$ a local minimum, i.e. $\delta^2 F > 0$ for all non-zero pertubation $\eta$?
-
$P \geq 0, Q\geq 0$ is sufficient.
-
The Legendre condition $P = \partial^2 f/\partial y'^2 \geq 0$ is necessary (proof idea) but not sufficient.
-
Suppose $P\geq 0$. Consider the related eigenvalue problem (Sturm-Liouville equation) $$ \begin{align*} -(Pu')' + Qu = -\lambda u. \end{align*} $$
-
For some $\lambda>0$, if there is a solution $\eta$ that satisfies $\eta(\alpha) = \eta(\beta) = 0$ but is not identically zero, then it is not a minimum. (Proof)
-
Jacobi accessory condition: for $\lambda=0$, if there is a solution $u$ that is not zero anywhere in $[\alpha,\beta]$, then it is a minimum. (Proof)
-
The Sturm-Liouville equation is a linear second order ODE, so it always has solutions given some initial conditions. Hence we can choose an initial condition away from $u=0$ at $\alpha$, and the solution will not hit zero if $\beta$ is close enough to $\alpha$.
Intuitively, it makes sense that $P\geq 0$ is sufficient when the domain $[\alpha,\beta]$ is not too long. Suppose $Q\leq 0$ and we want to find a perturbation $\eta$ to make $\delta^2 F<0$. We would like a large value of $\eta$ but a small value of $\eta'$. If $\beta$ is far enough from $\alpha$, we can slowly increase $\eta$ from $0$ at $\alpha$ to a large value and back to $0$ at $\beta$. But if $\beta$ is close to $\alpha$, $\eta$ cannot rise to a large value without making $\eta'$ big as well. So when $\beta-\alpha$ is small enough, it is impossible to make $\delta^2 F<0$.