Double integral of a product in calculus of variations Let's say I have an integral of the form
$$
  V(u) = \iint\limits_{[0,T]^2}f(x,y)u(x)u(y)\mathrm dx\mathrm dy
$$
which I would like to optimize over smooth functions $u$. For the variation I get
$$
  \delta V(u) \approx \iint\limits_{[0,T]^2}f(x,y)[u(x)\delta u(y) + u(y)\delta u(x)]\mathrm dx\mathrm dy
$$
since I hope the term $\delta u(x)\delta u(y)$ can be disregarded. How can I find the optimal $u$ now? In the 1d case I'd have
$$
  F(u) = \int_0^T G(x,u(x))\mathrm dx \quad \implies \quad \delta F(u) \approx \int_0^TG_u(x, u(x))\delta u(x)\mathrm dx
$$
and by fundamental lemma of calculus of variations I would get $G_u(x, u(x)) = 0$. However, I am not sure whether this passage is extendable to my case. Fwiw, my original case is a bit more complicated: I deal with an integral
$$
  W(u) = V(u) + F(u),
$$
and since I know how to variate the latter part, I hope it is enough to know how to variate the former. Would be happy to hear any suggestions. I tag it as LA, since the $V$ functional is a bilinear form, so maybe there are some results in LA known for that case.
 A: In a very formal way and assuming for simplicity that $f(x,y)=f(y,x)$, you will end up with something like
$$
2\int_{[0,T]} \left( \int_{[0,T]} f(x,y)u(x) \, dx \right) h(y)\, dy =0 \quad\hbox{for all $h$},
$$
and therefore (formally)
$$
\int_{[0,T]} f(x,y)u(x) \, dx =0 \quad\hbox{for (almost) every $y$}.
$$
This is a typical case in Choquard equations, where $f(x,y)=\tilde{f}(x-y)$, so that you can identify a convolution term
$$
\tilde{f}*u =0.
$$
A: I wanted to provide a little more detail on the answer given by Siminore.  I don't have a reference, as I worked this out on my own, but I think it is correct.
From the original problem statement, we may take the variation of $W(u)$ (I am using the more general problem), yielding
\begin{align*}
\delta W(u) &= \delta V(u) + \delta F(u) \\
&= \int_0^T\int_0^Tf(x,y)\left[ u(x)\delta u(y) + u(y)\delta u(x) \right]\ dx\ dy + \int_0^T G_u(x,u)\delta u(x)\ dx.
\end{align*}
Distribute the $f(x,y)$ to the terms in the brackets and break the integrals into two:
\begin{equation*}
\delta W(u) = \int_0^T\int_0^Tf(x,y)u(x)\delta u(y) \ dx\ dy + \int_0^T\int_0^Tf(x,y)u(y)\delta u(x) \ dx\ dy + \int_0^T G_u(x,u)\delta u(x)\ dx.
\end{equation*}
In the first set of integrals, we note that the integration variables are just dummy indices, and may be swapped [e.g., $(x,y)\rightarrow (y,x)$] without changing the result.  Furthermore, the limits of integration are the same for both integrals and are constants, and so we may arbitrarily change the order of integration.  Making use of these observations, we may write
\begin{align*}
\delta W(u) &= \int_0^T\int_0^Tf(y,x)u(y)\delta u(x) \ dx\ dy + \int_0^T\int_0^Tf(x,y)u(y)\delta u(x) \ dx\ dy \\
&\hspace{10mm}+ \int_0^T G_u(x,u)\delta u(x)\ dx \\
&= \int_0^T\int_0^T\left[f(y,x) + f(x,y)\right]u(y)\delta u(x) \ dx\ dy + \int_0^T G_u(x,u)\delta u(x)\ dx \\
&= \int_0^T\left( \int_0^T\left[f(x,y) + f(y,x)\right]u(y)\ dy + G_u(x,u) \right)\delta u(x)\ dx. \tag{1}
\end{align*}
Then, by the fundamental lemma of variational calculus you would conclude
\begin{equation*}
\int_0^T\left[f(x,y) + f(y,x)\right]u(y)\ dy + G_u(x,u) = 0,
\end{equation*}
which is an integral equation that may be solved for $u$.  If we make the additional assumption made by Siminore, i.e. that $f(x,y)=f(y,x)$, and let $G=0$ then the equation simplifies to
\begin{equation*}
\int_0^Tf(x,y)u(y)\ dy = 0,
\end{equation*}
which is what Siminore obtained.
As a special case that I was interested in, consider $f(x,y)=h(x)h(y)$ and $G=0$.  In this case we may write $W(u)=V(u)=H^2(u)$ where
\begin{equation*}
H(u) = \int_0^Th(x)u(x)\ dx.
\end{equation*}
Note that the variation of $H$ may be written as
\begin{equation*}
\delta H(u) = \int_0^Th(x)\delta u(x)\ dx.
\end{equation*}
From Eq. (1) above, we may write
\begin{align*}
\delta W(u) = \delta H^2(u) &= \int_0^T\int_0^T h(x)h(y)u(y)\delta u(x)\ dx\ dy \\
&= \int_0^Th(y)u(y)\ dy \int_0^T h(x)\delta u(x)\ dx \\
&= 2H(u)\delta H(u).
\end{align*}
Thus, the simple differentiation rule applies to these variations.
