The Euler-Lagrange equation
In this article, I’ll prove the Euler-Lagrange equation and give some examples of applications. I’ll use some other theorems without proof: Fermat’s theorem, the fundamental lemma of the calculus of variations, the multivariate chain rule, and integrations by parts.
Theorem: Consider the functional defined by
If is a differentiable function for which this functional has a local extremum, then it must satisfy the Euler-Lagrange equation:
Proof: Define a mapping that maps a real number to a function as
where is any differentiable function with . Suppose that is a differential function for which has a local extremum. Then, by Fermat’s theorem, we have that when is a local extremum of .
Working out gives
Technically, I have to show that switching the order of integration and differentiation is allowed, but I’ll omit this step for now.
Using the multivariate chain rule, we see this last expression equals , so we have
Note that the term does not occur since . Now we use that and , and obtain
Now, consider the integral over only the second term. By using integration by parts, we see
Using that , this simplifies to just
Substituting this back in the equation for yields
We have , so evaluating the whole thing at , we get
Remembering that by Fermat’s theorem, we have
for any differentiable with . By the fundamental lemma of the calculus of variations, it follows that , which yields
when rearranged.
If the integrand does not depend on or on , the Euler-Lagrange equation can be simplified. Let’s first consider the case where the integrand does not depend on :
Corollary: Consider the functional defined by
If is a differentiable function for which this functional has a local extremum, then
is constant.
Proof: Note that this is a special case of the Euler-Lagrange equation where we have . Substituting this in the Euler-Lagrange equation, we get . It follows that is constant.
The case where does not depend on is similar, but less straightforward to prove.
Corollary: Consider the functional
If is a differentiable function for which this functional has a local extremum, then
is constant.
Proof: By the multivariate chain rule, we have
Substituting the Euler-Lagrange equation in this expression yields
Writing for , we can use the product rule:
Substituting this, we obtain
After subtracting from both sides we have
This implies that
is constant.
Examples
The Euler-Lagrange equation is a helpful tool, but it usually requires some work to arrive at a solution. Here, I show some well-known applications of the Euler-Lagrange equation.
The shortest path between two points is a straight line
This intuitively obvious statement is not trivial to prove. I’ll give a proof using the Euler-Lagrange equation. I’ll take as a given that the length of a curve from to is given by
An intuitive idea for why this holds can be obtained by considering that the length of a linear line segment is , where and are the differences in the x-coordinate and y-coordinate. Letting , we get , and integrating yields the expression
for the length of the differentiable curve from to .
Setting , the Euler-Lagrange equation now gives
Working out the derivatives gives
Since the denominator is always positive, it follows that , and must be of the form
Brachistochrone
A brachistochrone curve through two points and on a plane is defined as the curve that minimizes the time that it takes from a point to slide from to from a standstill, neglecting friction. Of course, this assumes that the height of is less than the height of .
Tackling this problem requires some physics. The potential energy, which is the energy that the particle gets from its height is , where is the mass of the particle, is some gravitational constant, and is the height of the particle. The kinetic energy, that the particle gets from its speed, is . Since we pretend there’s no friction and ignore other types of energy, the sum of these two energies is constant by the law of conservation of energy. If we assume that the mass of the particle is constant as well, we find
for some constant .
Re-arranging, we find with . Since is a constant, the speed depends only on the height of the ball, which is an interesting result in itself. It is particularly convenient to assume that the height is zero, so that . Note that the axis points downwards in this case. In this case, we obtain:
Now, as we used before, the length of an infinitesimal curve segment is . The speed at is . The time that is takes a ball to roll over the line segment is simply the length of the segment divided by its speed. So we can express the time it takes to roll from to as
With this we finally have the integral to minimize, and we can use the Euler-Lagrange equation with . In fact, the integrand does not depend on , so we can use a simplified version. From this, we gather that
for some constant . Now, first, compute :
Substituting this in the previous equation yields
Simplifying gives
with . Now, write . We can then rewrite to
Now, we want to write and as a function of a parameter . Divide both sides by to get
Then it can be checked that
is a solution to this differential equation.