For a functional,
the condition for equilibrium is given by
In the present example,
i.e.
So, for extrema
The first term inside the braces is while the other is .