Functional Derivative of Fourier Transform Say I have a functional $F$ which depends on the Fourier transform of $g^{2}(x_{1},x_{2},x_{3})$: $$F[g] = \int \mathcal{F}(g^{2}) d^{3}x$$
The Fourier transform is given by: 
$$\mathcal{F}(g^{2})=\int g^{2}e^{-i\vec{k}\vec{r}} d^{3}k$$
I was wondering if the following logic was sound and mathematically legal:
$$\frac{\delta F}{\delta g} = \frac{\partial \mathcal{F}(g^{2})}{\partial g}$$ by Euler Lagrange Equation
$$\frac{\partial \mathcal{F}(g^{2})}{\partial g}=\mathcal{F}(2g)$$
$$\frac{\delta F[g]}{\delta g} = \mathcal{F}(2g)$$
 A: You have the functional
$$F[g] = \int \mathcal{F}\{g^{2}\}(k) \, d^{3}k$$
The functional derivative is a linear functional defined for some nice function $\phi$ as
$$
\left\langle \frac{\delta}{\delta g} F[g], \phi \right\rangle 
= \left. \frac{d}{d\lambda} F[g+\lambda\phi] \right|_{\lambda=0}
= \left. \frac{d}{d\lambda} \int \mathcal{F}\{(g+\lambda\phi)^{2}\}(k) \, d^{3}k \right|_{\lambda=0} \\
$$
The Fourier transform is linear, so
$$
\mathcal{F}\{(g+\lambda\phi)^{2}\}
= \mathcal{F}\{g^2 + 2\lambda g \phi + \lambda^2 \phi^2\}
= \mathcal{F}\{g^2\} + 2\lambda \mathcal{F}\{g \phi\} + \lambda^2 \mathcal{F}\{\phi^2\}
$$
and therefore
$$
\int \mathcal{F}\{(g+\lambda\phi)^{2}\}(k) \, d^{3}k
= \int \left( \mathcal{F}\{g^2\}(k) + 2\lambda \mathcal{F}\{g \phi\}(k) + \lambda^2 \mathcal{F}\{\phi^2\}(k) \right) \, d^{3}k \\
= \int \mathcal{F}\{g^2\}(k) \, d^{3}k + 2\lambda \int \mathcal{F}\{g \phi\}(k) \, d^{3}k + \lambda^2 \int \mathcal{F}\{\phi^2\}(k) \, d^{3}k
$$
Taking the derivative w.r.t. $\lambda$ and then setting $\lambda=0$ gives us
$$
\left\langle \frac{\delta}{\delta g} F[g], \phi \right\rangle 
= 2 \int \mathcal{F}\{g \phi\}(k) \, d^{3}k
$$
We insert the definition of $\mathcal F$:
$$
\left\langle \frac{\delta}{\delta g} F[g], \phi \right\rangle 
= 2 \iint (g\phi)(x) e^{-i k \cdot r} \, d^3x \, d^{3}k
= 2 \iint g(x) \phi(x) e^{-i k \cdot r} \, d^3x \, d^{3}k
$$
Swapping the integrals (who cares if we may do it?) gives
$$
\left\langle \frac{\delta}{\delta g} F[g], \phi \right\rangle 
= 2 \int g(x) \phi(x) \left( \int e^{-i k \cdot x} \, d^{3}k \right) \, d^3x \\
= 2 \int g(x) \phi(x) \, (2\pi)^3\delta(x) \, d^3x
= \langle 16 \pi^3 g(x) \delta(x), \phi(x) \rangle
$$
Thus,
$$\frac{\delta}{\delta g} F[g] = 16 \pi^3 g(x) \delta(x)$$
