Suppose $f(x) \equiv f_0(x) + \epsilon t(x)$, where $x,\epsilon \in{\mathbb{R}}$. And let $\mathcal{L}[f(x)] \equiv \int_a^b f(x')dx'$.
I want to differentiate $\mathcal{L}$ w.r.t. $\epsilon$. So I use chain rule:
$\frac{d\mathcal{L}}{d\epsilon} = \frac{\partial \mathcal{L}}{\partial f} \frac{\partial f}{\partial \epsilon} = (\int_a^b dx')t(x)$.
Is this not legit? Because
$\frac{d}{d \epsilon}[\int_a^b f_0(x') + \epsilon t(x')dx'] = \int_a^b t(x')dx' \neq (\int_a^b dx')t(x)$.
Is there something wrong in using the chain rule in this case, or more specifically with doing the partial derivative $\frac{\partial \mathcal{L}}{\partial f}$ in such a way? What exactly is wrong with it?
In the calculus of variations, the variational derivative $\tfrac{\delta\mathcal{L}}{\delta f}$ is defined in the first place by the equality $$ \int_a^b \frac{\delta\mathcal{L}[f]}{\delta f}(x) t(x) dx = \left. \frac{d}{d\epsilon}\mathcal{L}\left[f + \epsilon t\right]\right|_{\epsilon = 0},$$ where $t$ is any smooth function vanishing at the endpoints $a$ and $b$ of the relevant interval. In particular, by your computation, $$ \int_a^b \frac{\delta\mathcal{L}[f]}{\delta f}(x) t(x) dx = \left. \frac{d}{d\epsilon}\mathcal{L}\left[f + \epsilon t\right]\right|_{\epsilon = 0} = \int_a^b t(x) dx,$$ so that since $t$ is an arbitrary test function, $\tfrac{\delta\mathcal{L}[f]}{\delta f}(x) = 1$. Given this definition, then, you can make sense of chain rules computing variational derivatives of compositions like $\tfrac{\delta\mathcal{L[\rho \circ f]}}{\delta f}$ or $\tfrac{\delta\rho(\mathcal{L}[f])}{\delta f}$, as given, for instance, on the Wikipedia page. So, above all else, make sure you understand what a variational derivative actually is in the first place. In particular, if your would-be variational derivative non-trivially depends on your choice of test function, you know that something's gone horribly wrong.