I am coming across a derivative taken with respect to a functional and I am confused by its meaning. Say I have functions $f(x)$ and $g(x)$, say from $\mathbb{R}$ to $\mathbb{R}$, if the generalization is non-trivial I am also interested in the case $\mathbb{R}^n$ to $\mathbb{R}$, and a functional $F[f]$. Does it make sense to take a derivative with respect to $F[g]$? Would it equal
$$ \frac{\delta}{\delta F[g]} F[f] \stackrel{?}{=} \int dx \, \delta(f(x)-g(x))$$ If correct how do I see this? (I reasoned by consistency of the expression and analogy with the function case.)
When in general does it make sense to take a derivative with respect to a functional. What would we get if the expression we were taking a derivative of does not only depend on $F$. Is there still some meaningful value to be assigned? Take for example the cases
$$ \frac{\delta}{\delta F[g]} (f(x') F[f]) $$
and
$$ \frac{\delta}{\delta F[g]} \frac{\delta}{\delta f(x')} F[f]$$
and $$ \frac{\delta}{\delta F[g]} \int df \frac{\delta}{\delta f(x')} F[f]$$
In the latter two would it make sense to pass $\frac{\delta}{\delta F[f']}$ through the integral and the derivative and perform it first?
I think I should be comparing against $\frac{d f(x)}{d g(x)}$ which has meaning in terms of the chain rule, but I am a bit confused in how it would work for a functional.
(I am a theoretical physicist and not a mathematician.)
Edit: previously $g(x)$ read $f'(x)$ which was interpreted as a derivative of $f(x)$ in an answer. So that an answer describes a specific case of my more general question.
I think in this context $f$ and $g$ are arbitrary $\mathbb{L^2(\mathbb{R})}$ functions and usually will all be integrated over eventually.
We usually assume $\frac{\delta f(x)}{\delta f(y)}=\delta(x-y) $. I guess I would also need to define $\frac{\delta f(x)}{\delta g(y)}$ but I don't know what it should be.
Perhaps it would be simpler to start with what would happen in a simple example. Say we take
$$ F[f] = \int df \, e^{-\int dx \, f(x)^2} $$
define the linearization of the functional $F$ by $F[f+\delta f]=F[f]+F_1\circ\delta f+{\cal O}(\delta f)^2$, where $F_1$ is a linear functional; denote the differential operator by $D$; then $\delta F[f']=F_1\circ D\circ\delta f$, $\delta F[f]=F_1\circ\delta f=F_1\circ D^{-1}\circ F_1^{-1}\circ\delta F\circ f'$, and hence $$\frac{\delta F[f]}{\delta F[f']}=F_1\circ D^{-1}\circ F_1^{-1}.$$