Skip to main content

3  Calculus of Variations

Author
Affiliation

Enrico Bertolazzi

University of Trento, Department of Industrial Engineering

Everything needed to set up and solve functional-minimization exercises: first variation, Euler–Lagrange and Euler–Poisson equations, boundary terms, second-order tests, and integral and path constraints. Colors: \color{CornflowerBlue}\text{integrand }L, \color{SeaGreen}\text{endpoint cost }\Phi, \color{RoyalBlue}\text{dynamics}, \color{Brown}\text{equality constraints}, \color{DarkOrchid}\text{inequality constraints}, \color{OrangeRed}\text{boundary conditions, variations}, \color{Crimson}\text{labels}.

3.1 Variational Foundations

First and second variation. For x,\eta\in\mathbb V and g(\alpha)=\mathcal J(x+\alpha\eta): \delta\mathcal J(x;\eta)=g'(0) =\lim_{\alpha\to0}\frac{\mathcal J(x+\alpha\eta)-\mathcal J(x)}{\alpha}, \qquad \delta^2\mathcal J(x;\eta)=g''(0).

Stationarity (necessary condition). An \eta is admissible if x+\alpha\eta stays admissible for all small |\alpha|. If x^\star is an interior local minimizer, then \delta\mathcal J(x^\star;\eta)=0, \qquad \delta^2\mathcal J(x^\star;\eta)\ge0 \qquad\text{for every admissible }\eta .

Integral functional. Differentiation under the integral sign is allowed when L is C^1 and x,\eta are C^1: \mathcal J(x)={\color{CornflowerBlue}\int_a^b L(x,x',t)\,\mathrm dt}, \qquad \delta\mathcal J(x;\eta)=\int_a^b\big(L_x\,\eta+L_{x'}\,\eta'\big)\,\mathrm dt .

Watch out.

  • Stationary does not mean minimizer (maximum, saddle). If L is jointly convex in (x,x'), a stationary admissible function is a global minimizer (strict convexity: unique).
  • The admissible class is part of the problem: \int_{-1}^1(x-|t|)^2\mathrm dt has minimizer |t| in C([-1,1]), but in C^1([-1,1]) the infimum 0 is not attained.

3.2 Fundamental Lemma and first variation

Fundamental lemma. If f\in C([a,b]) and \int_a^b f\,g\,\mathrm dt=0 for every g\in C_c^\infty with support in (a,b), then f\equiv0 on [a,b].

Independent functions. For \int_a^b L(x,y,t)\,\mathrm dt with x,y independent: \delta\mathcal F=\int_a^b\big(L_x\,{\color{OrangeRed}\delta x}+L_y\,{\color{OrangeRed}\delta y}\big)\,\mathrm dt , linear in (\delta x,\delta y); set one of them to zero to isolate each coefficient.

Recipe (stationarity with boundary terms). For \mathcal F(x)=\int_a^b G(x,x',t)\,\mathrm dt+x(a)\,x(b):

  1. Perturb x\to x+\alpha\,\delta x, differentiate at \alpha=0: integral part plus boundary part.
  2. Integrate by parts: \int_a^b G_{x'}\,\delta x'\,\mathrm dt=\big[G_{x'}\,\delta x\big]_a^b-\int_a^b\big(\tfrac{\mathrm d}{\mathrm dt}G_{x'}\big)\,\delta x\,\mathrm dt.
  3. Collect the coefficients of \delta x in (a,b), of \delta x(b) and of \delta x(a).
  4. Fundamental lemma on the coefficient of \delta x in (a,b); at a free endpoint its coefficient vanishes; at a prescribed endpoint \delta x=0 and no condition arises.

\begin{aligned} \delta\mathcal F &=\int_a^b\big(G_x\,{\color{OrangeRed}\delta x}+G_{x'}\,{\color{OrangeRed}\delta x'}\big)\mathrm dt +x(b)\,{\color{OrangeRed}\delta x(a)}+x(a)\,{\color{OrangeRed}\delta x(b)} \\[0.5em] &\color{Crimson}\text{integration by parts} \\[0.5em] &=\int_a^b\Big[G_x-\frac{\mathrm d}{\mathrm dt}G_{x'}\Big]{\color{OrangeRed}\delta x}\,\mathrm dt +\big(x(b)-G_{x'}(a)\big){\color{OrangeRed}\delta x(a)} +\big(x(a)+G_{x'}(b)\big){\color{OrangeRed}\delta x(b)} \end{aligned}

\left\{\begin{aligned} G_x-\frac{\mathrm d}{\mathrm dt}G_{x'}&=0 &&\text{\color{Crimson}Euler--Lagrange}\\[0.5em] x(a)+G_{x'}\big(x(b),x'(b),b\big)&=0 &&\text{\color{Crimson}coefficient of }\delta x(b)\\[0.5em] x(b)-G_{x'}\big(x(a),x'(a),a\big)&=0 &&\text{\color{Crimson}coefficient of }\delta x(a) \end{aligned}\right.

Watch out.

  • The lemma applies to the coefficient of \delta x, never to a coefficient of \delta x': integrate by parts first. If \delta\mathcal F=\int_a^b\psi\,\delta x'\,\mathrm dt=0 for all admissible \delta x, integration by parts gives \psi'=0 (so \psi=C) and \psi=0 at free ends, not \psi=0 by the lemma applied to \psi.

3.3 Euler–Lagrange Equations

Problem. \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\mathcal A(x)=\int_a^b L(x,x',t)\,\mathrm dt}\\ \text{in}\quad&x\in C^2([a,b]),\ {\color{OrangeRed}x(a)=x_a,\ x(b)=x_b},\qquad {\color{OrangeRed}\delta x\in C^\infty,\ \delta x(a)=\delta x(b)=0}. \end{aligned}

Conditions. \left\{\begin{aligned} \frac{\mathrm d}{\mathrm dt}L_{x'}-L_x&=0 &&\text{\color{Crimson}Euler--Lagrange (equivalently }L_x-\tfrac{\mathrm d}{\mathrm dt}L_{x'}=0\text{\color{Crimson})}\\[0.5em] {\color{OrangeRed}x(a)}&{\color{OrangeRed}{}=x_a} &&\text{\color{Crimson}boundary condition}\\[0.5em] {\color{OrangeRed}x(b)}&{\color{OrangeRed}{}=x_b} &&\text{\color{Crimson}boundary condition} \end{aligned}\right. Expanded form: \frac{\mathrm d}{\mathrm dt}L_{x'}=L_{x'x'}\,x''+L_{x'x}\,x'+L_{x't}.

Recipe. Compute L_x and L_{x'}; differentiate L_{x'} along x(t) (chain rule); impose the boundary data.

Watch out.

  • L independent of x: L_{x'}=C (first integral).

Beltrami identity

L=L(x,x') of class C^2 with no explicit t, x\in C^2 solving Euler–Lagrange: L-x'\,L_{x'}=C\qquad\text{(constant on }[a,b]).

Watch out.

  • \frac{\mathrm d}{\mathrm dt}\big(L-x'L_{x'}\big)=L_t-x'\big(\frac{\mathrm d}{\mathrm dt}L_{x'}-L_x\big): the identity implies Euler–Lagrange only where x'\ne0. Arcs with x'=0 satisfy it automatically and must be checked in Euler–Lagrange.
  • With explicit t the quantity L-x'L_{x'} is not constant: its derivative is L_t.

Corner conditions (Weierstrass–Erdmann)

Broken extremal: x continuous, C^1 on [a,c] and on [c,b], corner at c\in(a,b) with p^\pm=x'(c^\pm), p^-\ne p^+; [\,G\,]_{c^-}^{c^+}=G^+-G^- with G^\pm evaluated at (x(c),p^\pm,c). A minimizer satisfies \left\{\begin{aligned} \frac{\mathrm d}{\mathrm dt}L_{x'}-L_x&=0 \ \text{ on }(a,c)\text{ and }(c,b) &&\text{\color{Crimson}Euler--Lagrange on both arcs}\\[0.5em] \Big[L_{x'}\Big]_{c^-}^{c^+}&=0 &&\text{\color{Crimson}WE1: continuity of }L_{x'}\\[0.5em] \Big[L-x'L_{x'}\Big]_{c^-}^{c^+}&=0 &&\text{\color{Crimson}WE2} \end{aligned}\right. WE2 holds also when L depends on t (derivation assumes the left arc extends smoothly slightly beyond c). For \bm x\in\mathbb R^n: WE1 componentwise, WE2 with \bm x'\cdot L_{\bm x'}.

Recipe. Solve Euler–Lagrange on [a,c] and on [c,b] (unknowns: the four integration constants and c); impose continuity of x at c, WE1, WE2 and the boundary conditions.

Watch out.

  • L_{x'x'}>0 (strict convexity in x'): no corners.
  • WE1 and WE2 together give E\big(x(c),p^-,p^+,c\big)=0 (E the excess function below): a corner needs a bitangent of p\mapsto L(x,p,t).
  • A corner can win: for \int_0^2(x'^2-1)^2\mathrm dt, x(0)=x(2)=0, the tent with slopes \pm1 has \mathcal F=0, the smooth extremal x\equiv0 has \mathcal F=2.

3.4 Second Variation

Weak and strong minimizers. Setting: \mathcal F(x)=\int_a^bL(x,x',t)\,\mathrm dt on \mathcal A=\{x\in C^1([a,b])\mid x(a)=x_a,\ x(b)=x_b\}, with \|x\|_0=\max_{[a,b]}|x|,\qquad \|x\|_1=\max_{[a,b]}|x|+\max_{[a,b]}|x'| .

  • weak local minimizer: there is \varepsilon>0 with \mathcal F(x^\star)\le\mathcal F(x) for all x\in\mathcal A with \|x-x^\star\|_1<\varepsilon;
  • strong local minimizer: the same with \|x-x^\star\|_0<\varepsilon.

Strict: strict inequality for x\ne x^\star. Strong \Rightarrow weak, not conversely. Same definitions for continuous piecewise C^1 functions.

Second variation at an extremal x^\star, for \eta(a)=\eta(b)=0, derivatives of L along (x^\star,x^{\star\prime},t): \begin{aligned} \mathcal F(x^\star+\alpha\eta)&=\mathcal F(x^\star)+\tfrac{\alpha^2}{2}\,\delta^2\mathcal F(x^\star;\eta)+o(\alpha^2),\\ \delta^2\mathcal F(x^\star;\eta) &=\int_a^b\big[L_{xx}\,\eta^2+2L_{xx'}\,\eta\eta'+L_{x'x'}\,(\eta')^2\big]\mathrm dt =\int_a^b\big[P\,(\eta')^2+Q\,\eta^2\big]\mathrm dt,\\ P&=L_{x'x'},\qquad Q=L_{xx}-\frac{\mathrm d}{\mathrm dt}L_{xx'} . \end{aligned} Weak local minimizer \Rightarrow\delta^2\mathcal F\ge0 for all admissible \eta; \delta^2\mathcal F<0 for some \eta \Rightarrow not a minimizer.

Legendre condition

x^\star weak local minimizer \Rightarrow P(t)=L_{x'x'}\big(x^\star,x^{\star\prime},t\big)\ge0 on [a,b]. Strengthened Legendre: P>0 on [a,b].

Watch out.

  • Necessary, not sufficient: with P>0 the term Q\,\eta^2 can still win on a long interval (see Jacobi).

Jacobi equation and conjugate points

-\frac{\mathrm d}{\mathrm dt}\big(P(t)\,v'(t)\big)+Q(t)\,v(t)=0 c\in(a,b] is conjugate to a if a solution v\not\equiv0 has v(a)=0 and v(c)=0.

Recipe. For P>0: solve Jacobi with v(a)=0, v'(a)=1; the conjugate points are the zeros of v in (a,b].

Jacobi condition (x^\star extremal, P>0 on [a,b]):

  • necessary: x^\star weak local minimizer \Rightarrow no conjugate point in (a,b);
  • sufficient: no conjugate point in (a,b] \Rightarrow x^\star strict weak local minimizer.

Watch out.

  • \frac12\int_0^b(x'^2-x^2)\mathrm dt, x(0)=0, x(b)=\beta: P=1, Q=-1, v=\sin t, conjugate point \pi; not a minimizer if b>\pi, strict weak minimizer if b<\pi.

Weierstrass excess function and condition

E(x,p,q,t)=L(x,q,t)-L(x,p,t)-(q-p)\,L_{x'}(x,p,t). L\in C^2, x^\star\in C^2 extremal: x^\star strong local minimizer \Rightarrow E\big(x^\star(t),x^{\star\prime}(t),q,t\big)\ge0\qquad\forall t\in[a,b],\ \forall q\in\mathbb R .

Watch out.

  • E=\frac12L_{x'x'}(\xi)(q-p)^2 for some \xi between p and q: Weierstrass \Rightarrow Legendre. L convex in x' \Rightarrow E\ge0 automatically.
  • \int_0^1x'^3\mathrm dt, x(0)=0, x(1)=1: x^\star=t has P=6>0, no conjugate point (weak minimizer), but E(1,q)=(q-1)^2(q+2)<0 for q<-2: not a strong minimizer.

Classification of an extremal

Recipe.

  1. Compute P=L_{x'x'} and Q along x^\star; P<0 somewhere: not a weak minimizer.
  2. If P>0 on [a,b]: solve Jacobi with v(a)=0, v'(a)=1. A zero in (a,b): not a weak minimizer; no zero in (a,b]: strict weak minimizer (a first zero exactly at b is inconclusive).
  3. Strong minimum: check E(x^\star,x^{\star\prime},q,t)\ge0 for all q (automatic if L is convex in x'); failure means not a strong minimizer.

Table of second-order tests

Condition Type Statement along x^\star
Euler–Lagrange necessary (first order) \frac{\mathrm{d}}{\mathrm{d}t}L_{x'}-L_x=0
Legendre necessary for a weak minimum L_{x'x'}\geq 0
Jacobi necessary for a weak minimum (with L_{x'x'}>0) no conjugate point in (a,b)
Legendre + Jacobi sufficient for a strict weak minimum L_{x'x'}>0, no conjugate point in (a,b]
Weierstrass necessary for a strong minimum E(x^\star,x^{\star\prime},q,t)\geq 0 for all q

3.5 Higher-Order Functionals

Problem. \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\mathcal B(x)=\int_a^b L\big(x,x',x'',t\big)\,\mathrm dt}\\ \text{in}\quad&x\in C^4,\\ &{\color{OrangeRed}x(a),\,x'(a),\,x(b),\,x'(b)\text{ prescribed}},\\ &{\color{OrangeRed}\delta x=\delta x'=0\text{ at }a\text{ and }b}. \end{aligned}

Conditions. \left\{\begin{aligned} L_x-\frac{\mathrm d}{\mathrm dt}L_{x'}+\frac{\mathrm d^2}{\mathrm dt^2}L_{x''}&=0 &&\text{\color{Crimson}Euler--Poisson}\\[0.5em] {\color{OrangeRed}x(a),\ x'(a),\ x(b),\ x'(b)}&{\color{OrangeRed}\ \text{prescribed}} &&\text{\color{Crimson}four boundary data} \end{aligned}\right. Order m, L\big(t,x,x',\dots,x^{(m)}\big): \sum_{k=0}^{m}(-1)^k\frac{\mathrm d^k}{\mathrm dt^k}\Big(L_{x^{(k)}}\Big)=0 \qquad\text{\color{Crimson}(Euler--Poisson, order }m\text{\color{Crimson})} The equation has order 2m when L_{x^{(m)}x^{(m)}}\ne0 and needs 2m boundary data.

Natural boundary conditions. If some data are free, keep the boundary terms: \begin{aligned} \delta\mathcal B&=\int_a^b(A)\,{\color{OrangeRed}\delta x}\,\mathrm dt +(B)\,{\color{OrangeRed}\delta x(b)}-(C)\,{\color{OrangeRed}\delta x(a)} +(D)\,{\color{OrangeRed}\delta x'(b)}-(E)\,{\color{OrangeRed}\delta x'(a)},\\ (A)&=L_x-\frac{\mathrm d}{\mathrm dt}L_{x'}+\frac{\mathrm d^2}{\mathrm dt^2}L_{x''},\\ (B)&=\Big(L_{x'}-\frac{\mathrm d}{\mathrm dt}L_{x''}\Big)\Big|_{b},\qquad (C)=\Big(L_{x'}-\frac{\mathrm d}{\mathrm dt}L_{x''}\Big)\Big|_{a},\\ (D)&=L_{x''}\Big|_{b},\qquad (E)=L_{x''}\Big|_{a}. \end{aligned} (A)=0 always; each free datum gives its coefficient =0, each prescribed datum gives nothing:

Datum Prescribed Free: natural condition
x(b) \delta x(b)=0 (B)=\big(L_{x'}-\frac{\mathrm d}{\mathrm dt}L_{x''}\big)\big|_b=0
x(a) \delta x(a)=0 (C)=\big(L_{x'}-\frac{\mathrm d}{\mathrm dt}L_{x''}\big)\big|_a=0
x'(b) \delta x'(b)=0 (D)=L_{x''}\big|_b=0
x'(a) \delta x'(a)=0 (E)=L_{x''}\big|_a=0

Watch out.

  • Each free datum gives exactly one natural condition from the table: L=(x'')^2-x^2+t gives x''''-x=0; with only x(a)=0, x'(b)=2 prescribed: x'''(b)=0, x''(a)=0, x(a)=0, x'(b)=2.
  • The necessary conditions may be inconsistent (no stationary point): \int_0^1\big(\tfrac12y'^2+yy'+y\big)\mathrm dx with only y(1)=1 gives y''=1, y'(0)+y(0)=0, y(1)=1, which has no solution.

3.6 Boundary Conditions

Endpoint constraints with boundary multipliers

Problem. Handle w_k=0 with multipliers. \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\int_a^b L(z,z',t)\,\mathrm dt}\\ \text{subject to}\quad&{\color{Brown}w_k\big(z(a),z(b)\big)=0},\quad k=1,\dots,p \end{aligned}

Recipe. Lagrangian \displaystyle\int_a^bL\,\mathrm dt-\sum_{k=1}^p\lambda_k\,w_k; require \delta=0 for \delta z and \delta\lambda_k in turn.

Conditions. Unknowns: z(t) and \lambda_1,\dots,\lambda_p. \left\{\begin{aligned} L_z-\frac{\mathrm d}{\mathrm dt}L_{z'}&=0 &&\text{\color{Crimson}Euler--Lagrange}\\[0.5em] {\color{Brown}w_k\big(z(a),z(b)\big)}&{\color{Brown}{}=0} &&\text{\color{Crimson}constraints }(\delta\lambda_k)\\[0.5em] L_{z'}\big(z(a),z'(a),a\big)+\sum_{k=1}^p\lambda_k\frac{\partial w_k}{\partial z(a)}&=0 &&\text{\color{Crimson}boundary condition at }a\\[0.5em] L_{z'}\big(z(b),z'(b),b\big)-\sum_{k=1}^p\lambda_k\frac{\partial w_k}{\partial z(b)}&=0 &&\text{\color{Crimson}boundary condition at }b \end{aligned}\right.

Fixed ends as a special case. w_1=x(a)-x_a, w_2=x(b)-x_b: the boundary conditions read -\lambda_1-L_{x'}(a)=0, -\lambda_2+L_{x'}(b)=0, always solvable for \lambda_1,\lambda_2 and without information; one is left with Euler–Lagrange and x(a)=x_a, x(b)=x_b.

Endpoint costs and free endpoints

Problem. \mathcal F(x)={\color{CornflowerBlue}\int_a^bL(x,x',t)\,\mathrm dt}+{\color{SeaGreen}\Phi\big(x(a),x(b)\big)} \begin{aligned} \delta\mathcal F &=\int_a^b\Big[L_x-\frac{\mathrm d}{\mathrm dt}L_{x'}\Big]{\color{OrangeRed}\delta x}\,\mathrm dt +\Big(\Phi_{x_a}-L_{x'}\big(x(a),x'(a),a\big)\Big){\color{OrangeRed}\delta x(a)}\\ &\quad+\Big(\Phi_{x_b}+L_{x'}\big(x(b),x'(b),b\big)\Big){\color{OrangeRed}\delta x(b)} \end{aligned} \Phi_{x_a},\Phi_{x_b}: partial derivatives of \Phi with respect to its first and second argument. At a free endpoint \delta x is arbitrary and its coefficient vanishes:

Boundary data at an endpoint Condition to impose
x(a)=x_a or x(b)=x_b prescribed \delta x=0 there: no extra condition
x(a) free, no endpoint cost L_{x'}\big(x(a),x'(a),a\big)=0
x(b) free, no endpoint cost L_{x'}\big(x(b),x'(b),b\big)=0
x(a) free, endpoint cost \Phi \Phi_{x_a}-L_{x'}\big(x(a),x'(a),a\big)=0
x(b) free, endpoint cost \Phi \Phi_{x_b}+L_{x'}\big(x(b),x'(b),b\big)=0
w\big(x(a),x(b)\big)=0 coupling the ends w=0 and the multiplier conditions above

Watch out.

  • Free ends and L independent of x: L_{x'}=C and L_{x'}=0 at both ends give C=0 (e.g. \int_0^1x'(\log x')^2\mathrm dt: \log x'\,(\log x'+2)=0).
  • Mind the sign at a versus b: x(0)+\int_0^1(tx^2+x'^2)\mathrm dt, no boundary data: tx-x''=0, \Phi_{x_a}-L_{x'}(0)=1-2x'(0)=0, x'(1)=0.

3.7 Isoperimetric Constraints

Problem. \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\mathcal F(x)=\int_a^bF\big(x,x',\dots,x^{(n)},t\big)\,\mathrm dt}\\ \text{subject to}\quad&{\color{Brown}\mathcal G_k(x)=\int_a^bG_k\big(x,x',\dots,x^{(n)},t\big)\,\mathrm dt=0},\quad k=1,\dots,p \end{aligned}

Multiplier rule (normal case). Stationary candidates are stationary points, with respect to x(t) and the constants \lambda_k (one per constraint), of \mathcal L(x,\bm\lambda)=\mathcal F(x)-\sum_{k=1}^p\lambda_k\,\mathcal G_k(x)=\int_a^b\Big(F-\sum_{k=1}^p\lambda_kG_k\Big)\mathrm dt .

Recipe.

  1. Form the augmented integrand F-\sum_k\lambda_kG_k with constant \lambda_k.
  2. Write its Euler–Lagrange (Euler–Poisson for higher order) equation.
  3. Add the boundary conditions, prescribed or natural, computed with the augmented integrand.
  4. Solve with the \lambda_k as parameters, then impose \mathcal G_k=0 (from \delta\lambda_k) to fix them.
  5. If the constraint qualification fails, see the abnormal case.

General problem. \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\int_a^bL(x,x',t)\,\mathrm dt}+{\color{SeaGreen}\Phi\big(x(a),x(b)\big)}\\ \text{subject to}\quad&{\color{Brown}w_k\big(x(a),x(b)\big)=0},\quad k=1,\dots,p\\ &{\color{Brown}\int_a^bg_k(x,x',t)\,\mathrm dt+\Psi_k\big(x(a),x(b)\big)=0},\quad k=1,\dots,m \end{aligned} \begin{aligned} M(x,x',\bm\lambda,t)&=L(x,x',t)-\sum_{k=1}^m\lambda_k\,g_k(x,x',t),\\ N(x_a,x_b,\bm\lambda,\bm\mu)&=\Phi(x_a,x_b)-\sum_{k=1}^m\lambda_k\,\Psi_k(x_a,x_b)-\sum_{k=1}^p\mu_k\,w_k(x_a,x_b). \end{aligned}

Conditions (normal case). \left\{\begin{aligned} M_x-\frac{\mathrm d}{\mathrm dt}M_{x'}&=0 \quad&&\text{\color{Crimson}Euler--Lagrange}\\[0.5em] N_{x_a}\big(x(a),x(b),\bm\lambda,\bm\mu\big)-M_{x'}\big(x(a),x'(a),\bm\lambda,a\big)&=0 \quad&&\text{\color{Crimson}adjoint BC at }a\\[0.5em] N_{x_b}\big(x(a),x(b),\bm\lambda,\bm\mu\big)+M_{x'}\big(x(b),x'(b),\bm\lambda,b\big)&=0 \quad&&\text{\color{Crimson}adjoint BC at }b\\[0.5em] {\color{Brown}w_k\big(x(a),x(b)\big)}&{\color{Brown}{}=0} \quad&&\text{\color{Crimson}endpoint constraints }(\delta\mu_k),\ k=1,\dots,p\\[0.5em] {\color{Brown}\int_a^bg_k\,\mathrm dt+\Psi_k\big(x(a),x(b)\big)}&{\color{Brown}{}=0} \quad&&\text{\color{Crimson}integral constraints }(\delta\lambda_k),\ k=1,\dots,m \end{aligned}\right. For prescribed boundary values the corresponding endpoint equation is solved by the \mu_k and drops out.

Abnormal case. The normal case needs a constraint qualification (first variations of the constraints linearly independent). If it fails, use M=\lambda_0L+\sum_k\lambda_kg_k with \lambda_0\ge0, (\lambda_0,\bm\lambda)\ne0; the normal case is \lambda_0=1 (note the + sign: the sign of a multiplier is a convention).

Watch out.

  • Do not apply the fundamental lemma to the constrained variations (\int_0^1\delta x\,\mathrm dt=0 for \int_0^1x\,\mathrm dt=1): use a multiplier.
  • \lambda is a constant, fixed by the constraint: \min\int_0^1x'^2\mathrm dt, \int_0^1x\,\mathrm dt=1, x(0)=2, x(1)=1: 2x''+\lambda=0 and the constraint give \lambda=-12, x=3t^2-4t+2 (global minimizer by convexity).

3.8 Path Constraints

Problem (equality path constraint). \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\int_a^bL(x,x',t)\,\mathrm dt}\\ \text{subject to}\quad&{\color{Brown}g(x,x',t)=0\quad\forall t\in[a,b]} \end{aligned} \qquad M(x,x',\lambda,t)=L(x,x',t)-\lambda(t)\,g(x,x',t). The multiplier is a function \lambda(t).

Conditions (equality). Free endpoints, unknowns \big(x(t),\lambda(t)\big): \left\{\begin{aligned} M_x-\frac{\mathrm d}{\mathrm dt}M_{x'}&=0 &&\text{\color{Crimson}Euler--Lagrange of }M\\[0.5em] M_{x'}\big(x(b),x'(b),\lambda(b),b\big)&=0 &&\text{\color{Crimson}natural BC at }b\\[0.5em] -M_{x'}\big(x(a),x'(a),\lambda(a),a\big)&=0 &&\text{\color{Crimson}natural BC at }a\\[0.5em] -M_\lambda=\color{Brown}g(x,x',t)&{\color{Brown}{}=0} &&\text{\color{Crimson}constraint} \end{aligned}\right. A prescribed endpoint value replaces the natural condition at that end. Euler–Lagrange plus g=0 is a differential–algebraic system.

Problem (inequality path constraint). \begin{aligned} \text{minimize}\quad&{\color{CornflowerBlue}\int_a^bL(x,x',t)\,\mathrm dt}\\ \text{subject to}\quad&{\color{DarkOrchid}c(x,x',t)\le0\quad\forall t\in[a,b]} \end{aligned} \qquad M(x,x',\mu,t)=L(x,x',t)+\mu(t)\,c(x,x',t).

Conditions (inequality). Under a constraint qualification: \left\{\begin{aligned} M_x-\frac{\mathrm d}{\mathrm dt}M_{x'}&=0 &&\text{\color{Crimson}stationarity}\\[0.5em] {\color{DarkOrchid}c(x,x',t)}&{\color{DarkOrchid}{}\le0} &&\text{\color{Crimson}primal feasibility}\\[0.5em] {\color{DarkOrchid}\mu(t)}&{\color{DarkOrchid}{}\ge0} &&\text{\color{Crimson}dual feasibility}\\[0.5em] {\color{DarkOrchid}\mu(t)\,c(x,x',t)}&{\color{DarkOrchid}{}=0} &&\text{\color{Crimson}complementarity} \end{aligned}\right. \mu=0 on inactive arcs; \mu>0 only where the constraint is active.

Recipe.

  1. Form M: L-\lambda g for an equality, L+\mu c for an inequality.
  2. Write Euler–Lagrange of M together with the constraint, with the boundary conditions (prescribed, or natural as above).
  3. Inequality: guess the active and inactive arcs; set \mu=0 on inactive arcs and c=0 on active ones.
  4. Check c\le0 and \mu\ge0, and impose the Weierstrass–Erdmann conditions for M at the junctions.

Watch out.

  • Signs: equality M=L-\lambda g, inequality M=L+\mu c with \mu\ge0.
  • Regularity: \lambda(t), \mu(t) are not automatically regular (for state inequalities and changing active sets the multiplier can even be a measure); the pointwise equations hold under smoothness and constraint-qualification hypotheses.
  • Junctions: at active/inactive junctions also impose the Weierstrass–Erdmann matching conditions for the augmented integrand M; solving the ODE separately on each arc does not give them.

3.9 Summary

  1. Notation \frac{\mathrm{d}}{\mathrm{d}\alpha}\bigg|_{\alpha=0}={\color{OrangeRed}\delta}

  2. Problem: minimize \color{CornflowerBlue}\int_a^b L(x,x^\prime,t)\,\mathrm{d}t \;+\; \color{SeaGreen}\Phi(x(a),x(b))

  3. Boundary conditions: {\color{OrangeRed} x(a) = x_a, \quad x(b)=\text{free}}, \quad {\color{Brown} w_k(x(a),x(b)) = 0}, \quad \cdots

  4. Integral constraints: \color{Brown} \int_a^b g_k(x,x^\prime,t)\,\mathrm{d}t \;+\; \Psi_k( x(a),x(b)) = 0

  5. Higher order problem: minimize

\color{CornflowerBlue}\int_a^b L(x,x^\prime,x^{\prime\prime},\ldots,x^{(n)},t)\,\mathrm{d}t \;+\;\color{SeaGreen}\Phi(x(a),x(b))

Admissible Spaces

  • \mathbb{V} = \Big\{x\in C^m([a,b]),\ldots\Big\}
  • \mathbb{D} = \Big\{\delta x\in C^\infty([a,b]),\delta x(a) = \delta x(b) = 0, \delta x^\prime(a) = \delta x^\prime(b) = 0, \ldots \Big\}

Endpoint Costs

\begin{aligned} \mathcal{F}(x) &= \int_a^b L(x,x^\prime,t)\,\mathrm{d}t + \Phi(x(a),x(b)) \\ \delta\mathcal{F}(x) &= \delta\int_a^b L(x,x^\prime,t)\,\mathrm{d}t + \delta \Phi(x(a),x(b)) \\ &= \int_a^b \delta L(x,x^\prime,t)\,\mathrm{d}t + \delta \Phi(x(a),x(b)) \\ &= \int_a^b L_x(x,x^\prime,t){\color{OrangeRed}\delta x}+ L_{x^\prime}(x,x^\prime,t){\color{OrangeRed}\delta x^\prime}\,\mathrm{d}t \\ & \quad + \Phi_{x_a}(x(a),x(b)){\color{OrangeRed}\delta x(a)} + \Phi_{x_b}(x(a),x(b)){\color{OrangeRed}\delta x(b)} \\[0.5em] &\color{Crimson}\text{integration by parts} \\[0.5em] &= \int_a^b \left[L_x(x,x^\prime,t)- \frac{\mathrm{d}}{\mathrm{d}t}L_{x^\prime}(x,x^\prime,t)\right]{\color{OrangeRed}\delta x}\,\mathrm{d}t \\[0.5em] & \quad+ \left(\Phi_{x_a}(x(a),x(b))- L_{x^\prime}(x(a),x^\prime(a),a)\right){\color{OrangeRed}\delta x(a)} \\[0.5em] & \quad+ \left(\Phi_{x_b}(x(a),x(b))+L_{x^\prime}(x(b),x^\prime(b),b)\right){\color{OrangeRed}\delta x(b)} \\[0.5em] \end{aligned}

Endpoint Constraints

Define \begin{aligned} \mathcal{F}(x) & = \int_a^b L(x,x^\prime,t)\,\mathrm{d}t- \sum_{k=1}^p \lambda_k w_k(x(a),x(b)) \\ \delta\mathcal{F}(x) &= \delta\int_a^b L(x,x^\prime,t)\,\mathrm{d}t - \delta\sum_{k=1}^p \lambda_k w_k(x(a),x(b)) \\ &= \int_a^b L_x(x,x^\prime,t){\color{OrangeRed}\delta x}+ L_{x^\prime}(x,x^\prime,t){\color{OrangeRed}\delta x^\prime}\,\mathrm{d}t - \sum_{k=1}^p w_k(x(a),x(b)){\color{OrangeRed}\delta\lambda_k} \\ & \quad - \sum_{k=1}^p \lambda_k \left( \frac{\partial w_k}{\partial x_a}(x(a),x(b)){\color{OrangeRed}\delta x(a)}+ \frac{\partial w_k}{\partial x_b}(x(a),x(b)){\color{OrangeRed}\delta x(b)} \right) \\[2em] &\color{Crimson}\text{integration by parts} \\[0.5em] &= \int_a^b \left[L_x(x,x^\prime,t) - \frac{\mathrm{d}}{\mathrm{d}t} L_{x^\prime}(x,x^\prime,t)\right]{\color{OrangeRed}\delta x}\,\mathrm{d}t - \sum_{k=1}^p w_k(x(a),x(b)){\color{OrangeRed}\delta\lambda_k} \\ & \quad - \left(\sum_{k=1}^p \lambda_k \frac{\partial w_k}{\partial x_a}(x(a),x(b)) +L_{x^\prime}(x(a),x^\prime(a),a)\right){\color{OrangeRed}\delta x(a)} \\ & \quad - \left( \sum_{k=1}^p \lambda_k \frac{\partial w_k}{\partial x_b}(x(a),x(b)) -L_{x^\prime}(x(b),x^\prime(b),b) \right) {\color{OrangeRed}\delta x(b)} \end{aligned}

Integral Constraints

Define \begin{aligned} M(x,x^\prime,\bm{\lambda},t) &= L(x,x^\prime,t)-\sum_{k=1}^m \lambda_k g_k(x,x^\prime,t) \\ N(x_a,x_b,\bm{\lambda}) &= \Phi(x_a,x_b)-\sum_{k=1}^m \lambda_k \Psi_k(x_a,x_b) \end{aligned}

\begin{aligned} \mathcal{F}(x,\bm{\lambda}) &= \int_a^b M(x,x^\prime,\bm{\lambda},t)\,\mathrm{d}t +N(x(a),x(b),\bm{\lambda})\\ \delta\mathcal{F}(x,\bm{\lambda}) &= \delta\int_a^b M(x,x^\prime,\bm{\lambda},t)\,\mathrm{d}t +\delta N(x(a),x(b),\bm{\lambda}) \\ &= \int_a^b M_x(x,x^\prime,\bm{\lambda},t){\color{OrangeRed}\delta x}+ M_{x^\prime}(x,x^\prime,\bm{\lambda},t){\color{OrangeRed}\delta x^\prime}+ M_{\bm{\lambda}}(x,x^\prime,\bm{\lambda},t)\cdot {\color{OrangeRed}\delta\bm{\lambda}} \,\mathrm{d}t\\ & \quad +N_{x_a}(x(a),x(b),\bm{\lambda}) {\color{OrangeRed}\delta x(a)} +N_{x_b}(x(a),x(b),\bm{\lambda}) {\color{OrangeRed}\delta x(b)} +N_{\bm{\lambda}}\cdot {\color{OrangeRed}\delta\bm{\lambda}} \\[0.5em] &\color{Crimson}\text{integration by parts} \\[0.5em] &= \int_a^b \left[M_x(x,x^\prime,\bm{\lambda},t)- \frac{\mathrm{d}}{\mathrm{d}t}M_{x^\prime}(x,x^\prime,\bm{\lambda},t)\right]{\color{OrangeRed}\delta x}\,\mathrm{d}t\\ & \quad - \sum_{k=1}^m {\color{OrangeRed}\delta\lambda_k} \left[\int_a^b g_k(x,x^\prime,t)\,\mathrm{d}t+ \Psi_k(x(a),x(b))\right]\\ & \quad+\Big(N_{x_a}(x(a),x(b),\bm{\lambda})- M_{x^\prime}(x(a),x^\prime(a),\bm{\lambda},a)\Big){\color{OrangeRed}\delta x(a)} \\ & \quad+\Big(N_{x_b}(x(a),x(b),\bm{\lambda})+M_{x^\prime}(x(b),x^\prime(b),\bm{\lambda},b)\Big){\color{OrangeRed}\delta x(b)} \end{aligned}

Higher-Order Reduction

Transform to optimal control problem

\begin{aligned} \text{minimize:}\qquad & \color{CornflowerBlue}\int_a^b L(x_1,x_2,x_3,\ldots,x_n,u,t)\,\mathrm{d}t\\ \text{subject to:}\qquad & \left\{ \color{RoyalBlue} \begin{aligned} x_1^\prime & = x_2\\ x_2^\prime & = x_3\\ \quad & \vdots \\ x_{n-1}^\prime & = x_n \\ x_n^\prime & = u \end{aligned} \right. \end{aligned}

General Problem

\begin{aligned} \text{minimize:}\quad & \color{CornflowerBlue}\int_a^b L(x,x^\prime,t)\,\mathrm{d}t \;+\; \color{SeaGreen}\Phi(x(a),x(b)) \\[2em] \text{subject to:}\quad & \color{Brown}w_k(x(a),x(b)) = 0, \quad & k&=1,2,\ldots,p \\[0.5em] & \color{Brown}\int_a^b g_k(x,x^\prime,t)\,\mathrm{d}t \;+\; \Psi_k( x(a),x(b)) = 0, \quad & k& =1,2,\ldots,m \end{aligned}

defining

\begin{aligned} M(x,x^\prime,\bm{\lambda},t) &= L(x,x^\prime,t)-\sum_{k=1}^m \lambda_k g_k(x,x^\prime,t) \\ N(x_a,x_b,\bm{\lambda},\bm{\mu}) &= \Phi(x_a,x_b) -\sum_{k=1}^m\lambda_k \Psi_k(x_a,x_b) -\sum_{k=1}^p\mu_k w_k(x_a,x_b) \end{aligned}

the stationary points satisfy the BVP

\left\{\begin{aligned} M_x(x,x^\prime,\bm{\lambda},t)-\frac{\mathrm{d}}{\mathrm{d}t}M_{x^\prime}(x,x^\prime,\bm{\lambda},t) &= 0\quad && \text{\color{Crimson} Euler--Lagrange} \\[0.5em] N_{x_a}(x(a),x(b),\bm{\lambda},\bm{\mu})- M_{x^\prime}(x(a),x^\prime(a),\bm{\lambda},a)&=0 \quad && \text{\color{Crimson} Adjoint BC} \\[0.5em] N_{x_b}(x(a),x(b),\bm{\lambda},\bm{\mu})+M_{x^\prime}(x(b),x^\prime(b),\bm{\lambda},b) &=0\quad && \text{\color{Crimson} Adjoint BC} \\[0.5em] {\color{Brown}w_k(x(a),x(b))} &{\color{Brown}{}=0} \quad && \text{\color{Crimson} endpoint constraints},\ k=1,2,\ldots,p \\[0.5em] {\color{Brown}\int_a^b g_k(x,x^\prime,t)\,\mathrm{d}t + \Psi_k( x(a),x(b))} &{\color{Brown}{}=0} \quad && \text{\color{Crimson} integral constraints},\ k=1,2,\ldots,m \end{aligned}\right.

Path Constraints

Equality, with multiplier function \lambda(t), and inequality, with multiplier function \mu(t):

\begin{aligned} &{\color{Brown}g(x,x^\prime,t)=0}, \quad M=L-\lambda(t)\,g \\[0.5em] &{\color{DarkOrchid}c(x,x^\prime,t)\le0}, \quad M=L+\mu(t)\,c, \quad {\color{DarkOrchid}\mu(t)\ge0}, \quad {\color{DarkOrchid}\mu(t)\,c(x,x^\prime,t)=0} \end{aligned}

Minima and Existence

  • Stationary is not minimal: joint convexity of L in (x,x') on a convex admissible set gives a global minimizer, strict convexity uniqueness.
  • Classification: see the table of second-order tests.
  • Existence by the direct method: nonempty closed admissible set, coercivity, compactness, lower semicontinuity (convexity in x' gives weak lower semicontinuity).