The Principle of Least Action states that the true trajectory of a system is that for which the action is stationary.
The action itself is a functional, meaning that it depends on the whole of the trajectories . To say that the action is stationary with respect to variations in these trajectories is to say that it behaves as a stationary point with respect to any variation in these trajectories.
Computing the derivative of a functional with respect to a set of functions may seem daunting but we can make the problem more tractable by turning it into a familiar calculus problem. Recall that the action must be stationary with respect to any variation in the trajectories. We're going to pick a very specific kind of variation which will make computing the derivative of easier.
Let the true trajectories - those which correspond to a stationary point of the action - be denoted . There are many ways to perturb these trajectories and so let's pick one which makes the problem easy:
Where is just a number and are a set of functions which all vanish at the endpoints of the integral. This second condition ensures that the endpoints of the trajectories stay fixed as we perturb them - and . The number gives us a way to turn on the perturbation in a smooth way, such that at , . I said above that we were going to pick a specific kind of perturbation in order to make the problem easier. While that may have been our initial justification, the expression we've landed on is actually very general. There is enough flexibility in the choice of and to define any possible perturbation we can think of. What we've really done is to write the perturbation in a convenient way that makes the problem easier.
The statement that the action is stationary for the true trajectories is equivalent to the statement that the action is stationary with respect to at :
We know how to compute the derivative of a function with respect to a single variable.
Computing the Derivative
Our goal is to compute the derivative:
First, since and don't depend on (they're just numbers) the derivative can be moved inside the integral.
Using the multivariable chain rule, we can expand the derivative.
Where the sum over has come from the fact that we need to apply the chain rule over all the that depends on. The order of summation (whether infinite or otherwise) doesn't matter and so we can move the summation outside of the integral:
Next, recall that,
Since doesn't depend on ,
And since the unperturbed paths, and , don't depend on :
Substituting back into the integral:
In the left hand term we have an and in the right hand term an . It would be nice if we could turn that into an , since that would allow us to factorise out of the expression all together. There is a simple way to do this which is to integrate the second term by parts (leaving the first term as it is).
Since we defined such that , the term in the square brackets simplifies to and vanishes. This lets us recombine the integral and factorise out :
Reducing the Expression
This unweildy expression would generally not be solvable if it were not for one important fact: It is true for all possible choices of . This fact can be used in 2 (related) ways to simplify the expression further.
Firstly, we are free to choose the such that they all equal zero everywhere, bar one - say at . This is equivalent to saying that we only perturb one of the degrees of freedom of the system and leave the rest at their true values.
Doing this, the sum over reduces to a single term at , removing the sum from the expression all together. Since we are free to do this for any choice of , we can simply say that each individual term of the sum is equal to zero individually.
Where we've now made it clear that we are not summing over the index. This is a much stricter statement than saying that the sum as a whole equals zero. We were able to make it due to the flexibility afforded to us in our choice of .
This flexibility will, in an exactly analagous way, allow us to remove the integral from the expression too. We could always pick such that it had a spike at one value of and was zero everywhere else, therefore (in an infinitesimal sense) isolating a single term in the integral. This is the continuous equivalent of what we did with the discrete sum before, and allows us to write the final Euler-Lagrange equation:
A Bit of Pedanticism
Strictly speaking, the equation above is written in terms of the primed (perturbed) trajectories, not the real trajectories which are what we actually want to compute. To remedy this we return to our original statement of the principle of least action.
We notice that our derived Euler-Lagrange equation is strictly only true when . Recall that at , , finally allowing us to write the Euler-Lagrange equation in terms of the real trajectories, :