In this post we will talk briefly about the Euler-Lagrange equations and show a simple application. Consider a differentiable application $L:\mathbb{R}^n \times \mathbb{R}^n \times \mathbb{R} \rightarrow \mathbb{R}$. We will call this application an action. Now, take a curve $\gamma : [a,b] \rightarrow \mathbb{R}^n$. Consider the "inclusion" $\widetilde{\gamma}: [a,b] \rightarrow \mathbb{R}^n\times \mathbb{R}^n \times \mathbb{R}$ given by $\widetilde{\gamma}(t)=(\gamma(t), \dot{\gamma(t)}, t)$. The action of $L$ in $\gamma$ is defined as
$$A_L(\gamma):=\int_a^b L \circ \widetilde{\gamma}.$$
This defines a map $A_L: Crvs \rightarrow \mathbb{R}$, where $Crvs$ is some space of curves. We will take, for now, $Crvs$ to be the affine space $C^1([0,1], \mathbb{R}^n, p,q)$ of $C^1$ curves with initial point $p$ and endpoint $q$, with underlying vector space $C^1([0,1], \mathbb{R}^n, 0,0)$ with its $C^1$ norm. Therefore, $Crvs$ is an affine space and we can talk about derivatives here. Moreover, this is a Banach affine space, which makes the situation quite pleasant since we can not only compute derivatives (which is available in any normed space) but also solve differential equations, find extrema etc (although we are not interested in these aspects in this post). However, there are cases where other spaces are desirable and/or more convenient.
Let's find the critical points of $A_L$. Fix $\gamma \in Crvs$. Note that
$$\big(L \circ (\widetilde{\gamma + h})\big)(t)=L\big( \gamma(t)+h(t), \dot{\gamma}(t)+\dot{h}(t), t \big) $$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+L'_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t), \dot{h}(t), 0 \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big) $$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) $$
$$ +\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( \dot{h}(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big)$$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)$$
$$ +\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg)} -\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big),$$
where $\nabla_1$ are the first $n$ components of the gradient of $L$, and $\nabla_2$ are the next $n$ components. Hence, we have that
$$A_L(\gamma+h)=\int_a^b \big[L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)$$
$$ +\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg)} -\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big) \big]dt$$
$$=A_L(\gamma)+ \bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg) \bigg|_a^b $$
$$+\int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt$$
$$+ \int_a^b \epsilon\big(h(t), \dot{h}(t), 0 \big)dt $$
$$=A_L(\gamma)$$
$$+\int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt$$
$$+ \int_a^b \epsilon\big(h(t), \dot{h}(t), 0 \big)dt $$
The Lebesgue Dominated Convergence Theorem (or uniform convergence on compact sets of the error of a differential) can then be used to conclude that
$$(D_{\gamma}A_L)( h ) = \int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt.$$
We then have that $D_{\gamma} A_L=0$ (that is, it is the $0$ functional) if and only if
$$ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \equiv 0.$$
The above equation is called the Euler-Lagrange equation.
We will now present a simple application. Consider the action $L: \mathbb{R}^2 \times \mathbb{R}^2 \times \mathbb{R} \rightarrow \mathbb{R}$ given by
$$L(x,y,t)=\|y\|^2.$$
Note that the action of $L$ on a path will yield its energy. We compute $\nabla_1$ and $\nabla_2$:
$$\nabla_1 L(x,y,t)=0,$$
$$\nabla_2 L(x,y,t)=2y.$$
Therefore,
$$\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)}=0,$$
$$\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}=2\dot{\gamma}(t)$$
The Euler-Lagrange equation then tells us that the extremal path satisfies
$$ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \equiv 0$$
$$\therefore 0-2\ddot{\gamma}(t)=0 \quad \forall t.$$
$$\therefore \ddot{\gamma}(t)=0 \quad \forall t,$$
which shows us that the critical paths are lines with constant velocity, which was expected.
As an ending note, we observe that, on a manifold, the action is a function $L: TM \times \mathbb{R} \rightarrow \mathbb{R}$, as expected.
$$A_L(\gamma):=\int_a^b L \circ \widetilde{\gamma}.$$
This defines a map $A_L: Crvs \rightarrow \mathbb{R}$, where $Crvs$ is some space of curves. We will take, for now, $Crvs$ to be the affine space $C^1([0,1], \mathbb{R}^n, p,q)$ of $C^1$ curves with initial point $p$ and endpoint $q$, with underlying vector space $C^1([0,1], \mathbb{R}^n, 0,0)$ with its $C^1$ norm. Therefore, $Crvs$ is an affine space and we can talk about derivatives here. Moreover, this is a Banach affine space, which makes the situation quite pleasant since we can not only compute derivatives (which is available in any normed space) but also solve differential equations, find extrema etc (although we are not interested in these aspects in this post). However, there are cases where other spaces are desirable and/or more convenient.
Let's find the critical points of $A_L$. Fix $\gamma \in Crvs$. Note that
$$\big(L \circ (\widetilde{\gamma + h})\big)(t)=L\big( \gamma(t)+h(t), \dot{\gamma}(t)+\dot{h}(t), t \big) $$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+L'_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t), \dot{h}(t), 0 \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big) $$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) $$
$$ +\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( \dot{h}(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big)$$
$$=L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)$$
$$ +\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg)} -\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big),$$
where $\nabla_1$ are the first $n$ components of the gradient of $L$, and $\nabla_2$ are the next $n$ components. Hence, we have that
$$A_L(\gamma+h)=\int_a^b \big[L \big( \gamma(t), \dot{\gamma}(t), t \big)+\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)$$
$$ +\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg)} -\dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) + \epsilon\big(h(t), \dot{h}(t), 0 \big) \big]dt$$
$$=A_L(\gamma)+ \bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big)\bigg) \bigg|_a^b $$
$$+\int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt$$
$$+ \int_a^b \epsilon\big(h(t), \dot{h}(t), 0 \big)dt $$
$$=A_L(\gamma)$$
$$+\int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt$$
$$+ \int_a^b \epsilon\big(h(t), \dot{h}(t), 0 \big)dt $$
The Lebesgue Dominated Convergence Theorem (or uniform convergence on compact sets of the error of a differential) can then be used to conclude that
$$(D_{\gamma}A_L)( h ) = \int_a^b \big[ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} \cdot \big( h(t) \big) - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \cdot \big( h(t) \big) \big]dt.$$
We then have that $D_{\gamma} A_L=0$ (that is, it is the $0$ functional) if and only if
$$ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \equiv 0.$$
The above equation is called the Euler-Lagrange equation.
We will now present a simple application. Consider the action $L: \mathbb{R}^2 \times \mathbb{R}^2 \times \mathbb{R} \rightarrow \mathbb{R}$ given by
$$L(x,y,t)=\|y\|^2.$$
Note that the action of $L$ on a path will yield its energy. We compute $\nabla_1$ and $\nabla_2$:
$$\nabla_1 L(x,y,t)=0,$$
$$\nabla_2 L(x,y,t)=2y.$$
Therefore,
$$\nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)}=0,$$
$$\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}=2\dot{\gamma}(t)$$
The Euler-Lagrange equation then tells us that the extremal path satisfies
$$ \nabla_1 L_{(\gamma(t),\cdot{\gamma(t)},t)} - \dot{\bigg(\nabla_2 L_{(\gamma(t),\cdot{\gamma(t)},t)}} \bigg) \equiv 0$$
$$\therefore 0-2\ddot{\gamma}(t)=0 \quad \forall t.$$
$$\therefore \ddot{\gamma}(t)=0 \quad \forall t,$$
which shows us that the critical paths are lines with constant velocity, which was expected.
As an ending note, we observe that, on a manifold, the action is a function $L: TM \times \mathbb{R} \rightarrow \mathbb{R}$, as expected.