What is the functional derivative of the functional
$$F[f(x)]=\int f(x')^2dx'$$
Am I correct in thinking that we can utilise the product rule and set $g(x)=f(x)^2$ so that
$$F[g(f(x))]=\int g(x')dx'$$
and the derivative becomes: $$\frac{\delta F}{\delta f}=\frac{\delta F}{\delta g}\frac{dg}{df}= \int dx' \delta(x-x')2f(x)=2f(x)$$
Is there any error in this calculation?
Usually one computes the functional variation as a directional derivative, $$ δF[f]=\lim_{s\to0^+}\frac1s(F[f+s\,δf]-F[f])=\int_I2f(x)\,δf(x)\,dx $$ and in general, for some function $g(y)$ in the integrand, $F[f]=\int_Ig(f(x))dx$ you get $$ δF[f]=\int_Ig'(f(x))\,δf(x)\,dx $$ so that one could write $$ \frac{δF[f]}{δf(x)}=\frac{dg}{dy}(f(x)) $$