Euler-Lagrange with constraints

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*} $$

Example (Dido's problem) Example (Sturm-Liouville problem)