# Differentiation under an integral with respect to a function

Consider the functional $F$ defined via the integral $$F(\mu)=\int_0^\ell\int_0^\ell f(s,t)\mu(s)\mu(t)\,ds\,dt.$$ How would I differentiate this with respect to $\mu$?

I realize that this has something to do with the functional derivative, but I can't seem to put it all together here. There appear to be other questions that deal with a similar topic, but this one seems to be complicated by the fact that each factor of $\mu$ is dependent on a different variable.

For simplicity, just assume that $f$ and $\mu$ are as nice as we would need them to be.

• \begin{align} \delta F&=\int_0^{\ell}\int_0^{\ell}f(s,t)(\mu(s)+\delta\mu(s))(\mu(t)+\delta\mu(t))\,ds\,dt-\int_0^{\ell}\int_0^{\ell}f(s,t)\mu(s)\mu(t)\,ds\,dt\\\\&=\int_0^{\ell} \int_0^{\ell} f(s,t)(\mu(s)\delta\mu(t)+\mu(t)\delta\mu(s))\,ds\,dt\\\\&=\int_0^{\ell} \int_0^{\ell} f(s,t)\delta (\mu(s)\mu(t))\,ds\,dt\end{align} – Mark Viola Nov 12 '15 at 5:38
• Do you mean for the factors paired with the $\delta$ to be $\mu(t)$? Should it be some other function, say $\eta(t)$? Then would the desired derivative be given by as $$\lim_{\delta\to0}\frac{1}{\delta}\int_0^\ell\int_0^\ell f(s,t)[(\mu(s)+\delta\eta(s))(\mu(t)+\delta\eta(t))-\mu(s)\mu(t)]\,ds\,dt?$$ I'm also somewhat confused about the role of $\delta$ here. Is it a scalar? An operator? – AegisCruiser Nov 12 '15 at 5:44

Replace $\mu$ with $\mu+\eta$, thinking of $\eta$ as small perturbation. Since $F$ is just a quadratic function in $\mu$, only algebra is needed to isolate the linear term with respect to $\eta$. This term is the derivative. $$\nabla F(\mu)(\eta)=\int_0^\ell\int_0^\ell f(s,t)\nu(s)\mu(t)\,ds\,dt + \int_0^\ell\int_0^\ell f(s,t)\mu(s)\nu(t)\,ds\,dt\tag{1}$$ meaning that the derivative of $F$ at $\mu$ is the linear functional sending each $\eta$ to the right hand side of $(1)$.