Maximizing Integral Subject to Constraint in Calculus of Variations

calculus-of-variationseuler-lagrange-equation

I am trying to find the differential equation which implies a smooth path $q:[a,b] \rightarrow \mathbb{R}^n$ subject to $|\dot{q}(t)| = 1$ (i.e. $q$ has unit speed) is a stationary point of
$$
\int_a^b L(t,q(t), \dot{q}(t)) \ dt
$$

for a certain $L(t,q(t), \dot{q}(t))$. This question and answer here appears to be exactly what I need, but when I tried to apply their formula to an easy example, it didn't work. Did I make a mistake or is their formula wrong? The example I tried to apply it to is below.

Following the notation of their question, suppose $F(x,y) = x^2+y^2$ and $g(x',y') = {x'}^2 + {y'}^2 -1 = 0$ and $x(0) = y(0) = 0$. So you are trying to maximize
$$
\int_0^1 x(t)^2 + y(t)^2 dt \tag 1
$$

subject to $(x(t),y(t))$ having unit speed. Because $x(t)^2 + y(t)^2 \leq t^2$, $(1)$ is less than $\int_0^1 t^2 dt = 1/3$. On the other hand, this maximal value is obtainable by having $(x(t),y(t))$ move in a straight line at unit speed. However their equation
$$
\frac{\partial F}{\partial x}-\frac{d}{dt}\frac{\partial F}{\partial x'}=\lambda(t)\left(\frac{\partial g}{\partial x}-\frac{d}{dt}\frac{\partial g}{\partial x'}\right) \tag 2
$$

yields
$$2x = -\lambda(t) 2x''.
$$

Their other equation for $y$ yields
$$
2y = -\lambda(t) 2y''.
$$

When $(x(t),y(t))$ moves in a straight line at unit speed, $x'' = y'' = 0$. Their equations imply $(x,y) = 0$. So $(x,y)$ maximizing $(1)$ by moving in a line is not detected by their equations.


$\textbf{Updated Question}$: Is it mathematically justifiable to consider the modified Lagrangian $L(t,q(t),\dot{q}(t)) + \lambda(t) g(q(t),\dot{q}(t))$? I have been searching through books to find out if this is mathematically valid, and I can't find any proofs for this type of constraint.

By considering this modified the Lagrangian I derived the formula
$$
L_q(t,q(t),\dot{q}(t)) – \frac{d}{dt} L_{\dot{q}}(t,q(t), \dot{q}(t)) = – \lambda(t) g_q(q(t),\dot{q}(t)) + \frac{d}{dt} \big(\lambda(t) g_{\dot{q}}(q(t),\dot{q}(t)) \big)
$$

which is different from $(2)$ due to $\lambda(t)$ being differentiated.

Best Answer

The problem is simpler in polar coordinates. The augmented Lagrangian, then, is given by $$ L=r^2+\lambda(\dot{r}^2+r^2\dot{\theta}^2-1). \tag{1} $$ The correct Euler-Lagrange equations are$^{(*)}$ \begin{align} \frac{\partial L}{\partial r}-\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{r}}\right)=0 &\implies \left(1+\lambda\dot{\theta}^2\right)r-\dot{\lambda}\dot{r}-\lambda\ddot{r}=0, \tag{2} \\ \frac{\partial L}{\partial \theta}-\frac{d}{dt}\left(\frac{\partial L}{\partial\dot{\theta}}\right)=0 &\implies \frac{d}{dt}(\lambda r^2\dot{\theta})=0 \implies \lambda r^2\dot{\theta}=C, \tag{3} \\ \frac{\partial L}{\partial \lambda}=0 &\implies \dot{r}^2+r^2\dot{\theta}^2-1=0. \tag{4} \end{align} The initial condition $x(0)=y(0)=0$, or $r(0)=0$, implies $C=0$ in Eq. $(3)$. There are, then, three possibilities:

  1. $r(t)=0$: this is not consistent with Eq. $(4)$, which becomes $\dot{r}^2=1$;

  2. $\lambda(t)=0$: Eq. $(2)$ then implies $r(t)=0$, which we have seen is not consistent with Eq. $(4)$;

  3. $\dot{\theta}=0$: Eq. $(4)$ again becomes $\dot{r}^2-1=0$. Plugging the solution $r(t)=t$ (and $\dot{\theta}=0$) into Eq. $(2)$, we obtain an equation for $\lambda(t)$: $$ t-\dot{\lambda}=0 \implies \lambda(t)=\lambda_0+\frac{t^2}{2}. \tag{5} $$

In conclusion, the solution to the maximization problem is the one expected, $r(t)=t$ --- or, in Cartesian coordinates, $(x(t),y(t))=(t\cos\theta,t\sin\theta)$.


$^{(*)}$ Compare with Eq. $(2)$ in the question, which missed the time derivative of $\lambda(t)$.

Related Question