Proof of the variation of the nonlocal functional I am going through this document to read up a bit about functional calculus.
I have a question on the proof for the variation of the nonlocal functional, given on page 6. The nonlocal functional is defined as
$$F_w[f] = \int _{a}^b dx_1 \int _{a}^b dx_2 w(x_1, x_2) f(x_1) f(x_2)$$
And the author states that
$$ \frac{\delta F_w}{\delta f(x_1)} = \int dx_2 f(x_2)[w(x,x_2)+w(x_2,x)]$$
I do not quite understand how this was achieved. The following is my proof for it:
$$F_w[f+\epsilon \eta] - F_w [f] = \delta F_w = \int dx_1 \int dx_2 w(x_1, x_2)[\epsilon f(x_1) \eta (x_2) + \epsilon f(x_2) \eta (x_1) + \epsilon ^2 \eta (x_1) \eta (x_2)$$
In this document, the functional derivative of $F_w$ has been defined as
$$ \frac{dF_w [f+\epsilon \eta]}{d\epsilon} \Big| _{\epsilon = 0} = \int dx_1 \frac{\delta F_w}{\delta f(x_1)} \eta (x_1) $$
Doing some manipulations and ordering terms...
$$ \frac{dF_w [f+\epsilon \eta]}{d\epsilon} \Big| _{\epsilon = 0} = \int dx_1 \eta (x_1) \left[ \int dx_2 w(x_1, x_2) f (x_2) \right]+ \int dx_1 \eta (x_1) \left[\int dx_2 w(x_1, x_2) \frac{\eta (x_2)}{\eta (x_1)} f(x_1)\right] $$
Everything inside the big square brackets "[]" should feature in $\frac{\delta F_w}{\delta f(x_1)}$. However, I don't understand how I can reasonable scratch out the pesky $\eta(x_2)/\eta (x_1)$ term.
Is my reasoning valid? Am I messing up the computation somewhere? Any advice you have is appreciated!
 A: You didn't compute correctly the derivative with respect to $\varepsilon$; indeed, we have :
$$
\begin{array}{rcl}
\displaystyle\left.\frac{\mathrm{d}}{\mathrm{d}\varepsilon}\right|_{\varepsilon=0}F_w[f+\varepsilon\eta] 
   &=& \displaystyle
   \lim_{\varepsilon\rightarrow0}\frac{F_w[f+\varepsilon\eta]-F_w[f]}{\varepsilon} \\
   &=& \displaystyle 
   \lim_{\varepsilon\rightarrow0} \int\mathrm{d}x_1\int\mathrm{d}x_2\, w(x_1,x_2)\left(f(x_1)\eta(x_2) + f(x_2)\eta(x_1) + \varepsilon\eta(x_1)\eta(x_2)\right) \\
   &=& \displaystyle 
   \int\mathrm{d}x_1\int\mathrm{d}x_2\, w(x_1,x_2)\left(f(x_1)\eta(x_2)+f(x_2)\eta(x_1)\right) \\
   &=& \displaystyle 
   \int\mathrm{d}x_1\, \eta(x_1)\left(\int\mathrm{d}x_2\, w(x_1,x_2)f(x_2)\right) 
   \;+\\&& \displaystyle
   \int\mathrm{d}x_2\, \eta(x_2)\left(\int\mathrm{d}x_1\, w(x_1,x_2)f(x_1)\right) \\
   &=& \displaystyle 
   \int\mathrm{d}x_1\, \eta(x_1)\left(\int\mathrm{d}x_2\, (w(x_1,x_2)+w(x_2,x_1))f(x_2)\right)
\end{array} 
$$
by exchanging the variable names in the second integral, i.e. $x_1 \leftrightarrow x_2$, hence
$$
\frac{\delta F_w[f]}{\delta f(x_1)} = \int\mathrm{d}x_2\, (w(x_1,x_2)+w(x_2,x_1))f(x_2)
$$
by comparison with $\displaystyle \left.\frac{\mathrm{d}}{\mathrm{d}\varepsilon}\right|_{\varepsilon=0}F_w[f+\varepsilon\eta] = \int\mathrm{d}x_1\,\eta(x_1)\, \frac{\delta F_w[f]}{\delta f(x_1)}$.

Addendum. I see that your document talks about applications of variational calculus in physics. Note that this way of computing functional derivatives mainly serves as a definition (to please mathematicians =P). In practice, the function $\eta(x)$ is replaced by the "functional infinitesimal" $\delta f(x)$, such that $\frac{\delta f(x')}{\delta f(x)} = \delta(x'-x)$, where $\delta$ is the Dirac delta function, which permits to write the functional derivative as follows :
$$
\frac{\delta F[y(x')]}{\delta y(x)} = \delta(x'-x)\sum_{n=0}^\infty (-1)^n\frac{\mathrm{d}^n}{\mathrm{d}x^n} \frac{\partial^nF}{\partial y^{(n)}},
$$
which corresponds to the well-known Euler-Lagrange operator $\frac{\partial}{\partial y} - \frac{\mathrm{d}}{\mathrm{d}x}\frac{\partial}{\partial y'}$ when only first derivatives appear in $F$. See this answer of mine for more details.
