Differentiate an integral I study about ANOVA-HDMR theory, and I confused about some calculations.
Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a nice enough function so that integral and differentiation can change. Consider $f(x)$ as a variable and let $x'$ be another (dummy) variable. I wanna calculate
$$\frac{d}{df(x)}\int f(x')^2dx'$$
and from the paper I think it is $$\int 2f(x') \delta(x-x')dx' $$ there $\delta$ is a Dirac-delta function. Is it true that a chain-rule $\frac{d}{df(x)}=\frac{d}{df(x')}\frac{df(x')}{df(x)}$ applied here? If so, why $\frac{df(x')}{df(x)}$ is a Dirac-delta function? Thank you very much.
 A: The way this is written is a little confusing, and I don't know what paper you're talking about, but let me see if I can say something useful.
Firstly, if you are interested in the variation of some functional wrt an input function, like$$ J[f] = \int L[f(y)]\, dy = \int f(y)^2 \, dy $$
then you should use some sort of functional derivative:
$$ \frac{\delta J}{\delta f} = \frac{\partial L}{\partial f} - \frac{d}{dx}\frac{\partial L}{\partial (\partial_xf)} = \frac{\partial L}{\partial f} = 2f(x) $$
which encodes how perturbing $f$ alters $J$.
Secondly, recall these properties of delta functions.
$$ \delta(x-a) = \delta(a-x) = 0 \;\forall\;x\ne a $$ $$ \int_b^c f(x)\delta(x-a)\, dx = f(a) $$ for $b <a<c$. Indeed, by this second "sifting property", we will simply say
$$
\int 2 f(x') \delta(x -x')\,dx' = 2f(x)
$$
as above.
Intuitively, the Delta "pulls out" a single value from a function being integrated. So perhaps you can think of it as "if I change $f(x)$ slightly, how does $\int f(x)^2\,dx$ change?" Well, at $x$, its rate of change is about $2f(x)$. And this is what the functional derivative (or first variation) tells you.
Hopefully that's helpful. Sorry I have no idea what you mean by the chain rule stuff.
