Euler-Lagrange equation
In this lesson, we will derive the Euler-Lagrange equation for the basic problem in the calculus of variations. The problem is to minimize the integral
\[S[x] = \int_a^b \mathcal{L}(t,x,\dot{x}) \d t\]over differentiable functions \(x\), where \(x(a)\) and \(x(b)\) are given. To do this, we assume that we have found a function \(x_{}\) which minimizes the integral. Then, we consider a general function \(x = x_{} + \epsilon\eta\), where \(\eta\) is a any function satisfying \(\eta(a) = \eta(b) = 0\); recall that we are only considering functions which satisfy the boundary conditions so we cannot have any extra contributions at \(t = a\) and \(t = b\). Thus, \(\epsilon\eta\) is a small perturbing funciton. We note that for \(\epsilon = 0\), \(y\) becomes the minimizer of the integral. This means that
\[\begin{equation} \frac{\d}{\d\epsilon} S[x]\bigg|_{\epsilon = 0} = 0. \end{equation}\]Armed with this condition, we compute the derivative of \(S\) with respect to \(\epsilon\).
\[\begin{align} \frac{\d}{\d\epsilon}S[x] ={}& \frac{d}{d\epsilon} \int_a^b \mathcal{L}(t,x,\dot{x}) \d t\\ ={}& \int_a^b\left(\frac{\partial\mathcal{L}}{\partial x}\frac{\d x}{d\epsilon} + \frac{\partial\mathcal{L}}{\partial \dot{x}} \frac{d\dot{x}}{d\epsilon}\right) \d t \\ ={}& \int_a^b\left(\frac{\partial\mathcal{L}}{\partial x}\eta + \frac{\partial\mathcal{L}}{\partial \dot{x}} \dot{\eta} \right) \d t \\ ={}& \int_a^b\left(\frac{\partial\mathcal{L}}{\partial x}\eta \right) \d t + \int_a^b\left(\frac{\partial\mathcal{L}}{\partial \dot{x}} \dot{\eta} \right) \d t \\ ={}& \int_a^b\left(\frac{\partial\mathcal{L}}{\partial x}\eta \right) \d t + \left(\frac{\partial\mathcal{L}}{\partial \dot{x}} \eta\right)\bigg|_a^b - \int_a^b \frac{d}{\d t}\left(\frac{\partial\mathcal{L}}{\partial \dot{x}} \right)\eta \d t \\ ={}& \int_a^b\left[\frac{\partial\mathcal{L}}{\partial x}- \frac{d}{\d t}\left(\frac{\partial\mathcal{L}}{\partial \dot{x}} \right)\right]\eta \d t \\ ={}& 0 \end{align}\]Since this integral is 0 for all \(\eta\), we conclude that the object multiplying it is zero, or,
\[\frac{\partial\mathcal{L}}{\partial x}- \frac{d}{\d t}\left(\frac{\partial\mathcal{L}}{\partial \dot{x}}\right) = 0\]This is known as the Euler-Lagrange equation.
Note that in this derivation, we have \(t\) as the independent variable and \(x = x(t)\) as the dependent variable. The Euler Lagrange equation works equally well if we simply relabel the variables; some problems have \(x\) as the independent variable and \(y = y(x)\) as the dependent variable. In these cases we have \(\L = \L(x,y,y’)\) and the Euler Lagrange equation is
\[\frac{\partial\L}{\partial y} = \frac{d}{\d x}\frac{\partial\L}{\partial y'}.\]Examples To get a feel for how this works, let us now find the Euler Lagrange equation for certain Lagrangians.
- Find the Euler Lagrange equation for the Lagrangian corresponding to the shortest path between two points: \(\)\L(y,y') = \sqrt{1+(y')^2}\(\)
- Solve the differential equation subject to boundary conditions \(y(x_1) = y_1\) and \(y(x_2) = y_2\).