Calculus of variations and string theory In Polchinski's String theory book, Vol 1., in chapter 1, p. 18, he is deriving the Lagrangian in the light cone gauge (that's not necessary to know in order to answer this question), and he gets
$$L~=~L_{ok}+\int_{0}^{\ell}d\sigma \gamma_{\tau\sigma}\partial_{\sigma}Y^- ,\tag{1.3.11}$$
where
$$Y^-(\tau,\sigma)~=~X^-(\tau,\sigma)-x^-(\tau) \tag{1.3.12b}$$
and
$$x^-(\tau)~=~\frac{1}{\ell}\int_{0}^{\ell}\! d\sigma~ X^-(\tau,\sigma),\tag{1.3.12a}$$
so
$$\langle Y^-\rangle_{\sigma}~=~0  .$$
Now he makes the variation of the Lagrangian respect to $Y^-$:
$$\delta L_{Y^-}~=~\int_{0}^{\ell}d\sigma \gamma_{\tau\sigma}\delta(\partial_{\sigma}Y^-)~=~0$$
than he says that the variation yields
$$\partial^2_{\sigma}\gamma_{\tau\sigma}~=~0$$
where the extra $\partial_{\sigma}$ is due to the fact that
$$\langle Y^-\rangle_{\sigma}
~=~\int_{0}^{\ell}d\sigma Y^-(\tau,\sigma)~=~0 $$
I don't get why this fact should lead to an extra derivative, can anyone help? I "suspect" it has something to do with the fact that $Y^-$ is not positive definite (?)
 A: The extra derivative in Polchinski comes from the following version of the Fundamental Lemma of Calculus of Variation (FLCV):

$$\begin{align} \left[ \forall g : ~~\int_a^b\! dx~ g(x) ~=~0 \right. \quad\Rightarrow& \quad \left. 
\int_a^b\! dx ~f(x) g(x) ~=~0\right]
\cr\cr \Downarrow & \cr\cr 
f^{\prime}~=~&0.\end{align} \tag{1} $$

FLCV (1) states in words:

If it is true that for all functions $g$ with zero average that the integral $\int_a^b\! dx ~f(x) g(x) =0$ vanishes, then $f$ is a constant.

(Here we will for simplicity assume in what follows that $f$ and $g$ are sufficiently smooth functions, e.g. $f\in C^{1}[a,b]$. The mathematically minded reader is encouraged to try to weaken these assumptions.) The standard FLCV reads
$$ \left[ \forall g :  \quad \int_a^b\! dx ~f(x) g(x) ~=~0\right]\quad\Rightarrow \quad f~=~0.\tag{2} $$
Actually, the following FLCV (3) holds as well
$$\begin{align} [ \forall g : ~~g(a)~=~0~=~g(b)   \quad\Rightarrow& \quad   
\int_a^b\! dx ~f(x) g(x) ~=~0]
\cr\cr \Downarrow & \cr\cr 
f~=~&0,\end{align}\tag{3} $$
because $f$ is continuous. Let us prove FLCV (1) using FLCV (3). To this end, define the antiderivative
$$ G(x)~:=~\int_a^x\! dx^{\prime}~ g(x^{\prime}).\tag{4} $$
Then we can reformulate FLCV (1) as
$$\begin{align}  [ \forall G : ~~G(a)~=~0~=~G(b) 
  \quad\Rightarrow& \quad   
\int_a^b\! dx ~f(x) G^{\prime}(x) ~=~0 ]
\cr\cr \Downarrow & \cr\cr  
f^{\prime}~=~&0.\end{align}\tag{5} $$
If we integrate (5) by parts, this becomes exactly FLCV (3). So FLCV (1) holds.
