# Derivation Euler-Lagrange Equation in 13 Steps

Level 4 (for physics pros)
Level 4 requires the knowledge of vector calculus, (multidimensional) differential and integral calculus. Suitable for advanced students.
Updated by Alexander Fufaev on

## Video - Euler-Lagrange Equation

In the following we want to derive the Euler-Lagrange equation, which allows us to set up a system of differential equations for the function $$q(t)$$ we are looking for. For the derivation, we assume that the Lagrange function L(t, q(t), \dot{q}(t)) and the boundary values $$q(t_1) ~=~ q_1$$ and $$q(t_2) ~=~ q_2$$ of the searched function $$q$$ are known. The Lagrange function can depend on the time $$t$$, on the function value $$q(t)$$ and on the time derivative $$\dot{q}(t)$$ of the function $$q$$ at the time $$t$$.

The function $$q$$ makes the following action functional $$S[q]$$ stationary. That is, if we use $$q(t)$$ to calculate the action $$S[q]$$, $$S[q]$$ will give us a value of the action that is either minimum, maximum, or a saddle point:

Action functional as integral of the Lagrange function
Formula anchor

Now we want to consider an infinitesimally small variation $$\delta q$$ of $$q$$. For this we define the variation as $$\delta q := \epsilon \, \eta$$. Here $$\epsilon$$ is a very small real number and $$\eta(t)$$ is an arbitrary function. It must be defined and differentiable between $$t_1$$ and $$t_2$$ in every point, so that we - further in the derivation - may differentiate with respect to $$\epsilon$$ without problems.

The function $$\eta(t)$$ must vanish at the boundary points $$t_1$$ and $$t_2$$ because the boundary points are fixed:

Variation function at the boundary points vanishes
Formula anchor

In other words: $$\eta(t)$$ must coincide with $$q(t)$$ at the boundary points $$t_1$$ and $$t_2$$ so that the function $$q(t) ~+~ \epsilon \eta(t)$$ also passes through the boundary points.

The variation of the action functional 1 looks like this:

Variation of the functional
Formula anchor

Here we have simply replaced in 1 the function $$q$$ with $$q~+~ \epsilon \, \eta$$ and its derivative $$\dot{q}$$ with $$\dot{q}~+~ \epsilon \, \dot{\eta}$$.

A necessary condition for a local extremum (minimum, maximum, or saddle point of the action functional), is the vanishing of the first derivative of $$S[q ~+~ \epsilon\,\eta]$$ with respect to $$\epsilon$$. (This condition must be satisfied in any case for the functional $$S[q]$$ to become stationary with respect to $$q$$.)

First derivative of the functional vanishes
Formula anchor

The reason we introduced the infinitesimally small parameter $$\epsilon$$ is that we can do a Taylor expansion around this point and neglect all terms of higher order than two. (We do not have to neglect the higher order terms. However, this will make the Euler-Lagrange equation have a much more complicated form and at the same time not be of any greater use).

So let us expand the Lagrangian function $$L(t, q ~+~ \epsilon \,\eta, ~ \dot{q} ~+~ \epsilon \, \dot{\eta} )$$ around the point $$\epsilon = 0$$ to 1st order in the functional 3:

Action functional with Taylor expansion of the Lagrange function
Formula anchor

Here we have abbreviated $$L(t, q ~+~ \epsilon \,\eta, ~ \dot{q} ~+~ \epsilon \, \dot{\eta} )_{~\big|_{~\epsilon ~=~ 0}}$$ for compact notation as $$L$$. The neglected higher order terms are represented by the symbol $$\mathcal{O}(\epsilon^2)$$.

Next, we need to compute the total derivative $$\frac{\text{d} L}{\text{d} \epsilon}$$ in Eq. 5. To do this, we must differentiate each argument in $$L(t, q ~+~ \epsilon \,\eta, ~ \dot{q} ~+~ \epsilon \, \dot{\eta} )$$:

Total derivative of the Lagrange function with respect to epsilon
Formula anchor

Here the derivatives are $$\frac{\text{d} (q~+~\epsilon \eta)}{\text{d} \epsilon} = \eta$$ and $$\frac{\text{d} (\dot{q}~+~\epsilon \dot{\eta})}{\text{d} \epsilon} = \dot{\eta}$$ and $$\frac{\text{d} t}{\text{d} \epsilon} = 0$$. Thus 6 becomes:

Total derivative of the Lagrange function with respect to epsilon simplified
Formula anchor

Insert the calculated total derivative back into the functional 5:

Functional with calculated total derivative
Formula anchor

Now you use the necessary condition 4 for stationarity. To do this, we differentiate the functional 8 with respect to $$\epsilon$$ and set it equal to zero:

Differentiate the functional and set it to zero
Formula anchor

Here, in the second step, the derivative $$\frac{\partial}{\partial \epsilon}$$ was pulled into the integral. The derivative $$\frac{\partial L}{\partial \epsilon}$$ is omitted, because $$L = L(t, q ~+~ \epsilon \,\eta, ~ \dot{q} ~+~ \epsilon \, \dot{\eta} )_{~\big|_{\epsilon ~=~ 0}}$$ is independent of $$\epsilon$$ ($$\epsilon$$ was set to zero). Moreover, $$\frac{\partial \epsilon}{\partial \epsilon} = 1$$. Remember that the remaining terms do not depend on $$\epsilon$$ for the same reason as $$L$$.

The derivative of the functional 9 becomes zero exactly when the integrand vanishes. Unfortunately, it still depends on $$\eta$$ and $$\eta'$$. We can eliminate these terms by partial integration. To do this, we apply partial integration to the second summand in 9:

Partial integration of the integrand in the functional
Formula anchor

In this way we transferred the derivative of $$\eta$$ to $$\frac{\partial L}{\partial \dot{q}}$$. The price we have to pay for this transfer is an additional term in the integrand (in the middle). However, the good thing is that because of the condition $$\eta(t_1) ~=~ \eta(t_2) ~=~ 0$$, this term is eliminated:

Partial integration of the integrand in the functional simplified
Formula anchor

Factor out the integral and $$\eta$$:

Integral of the Euler-Lagrange equation
Formula anchor

Since $$\eta$$ may be arbitrary (i.e., also nonzero), the expression in the parenthesis must vanish so that the integral is zero for all $$\eta$$. As a result we get:

Euler-Lagrange equation
Formula anchor

If the Euler-Lagrange equation 11 is satisfied for the function $$q$$, then the functional $$S[q]$$ in 1 becomes stationary.