Shifted functions in VariationalMethods'?

Hi,

I have to compute the variational derivative of some complicated functionals, involving not only derivatives but also finite differences (and other more exotic expressions). Thus I tried

In[1]:= Needs["VariationalMethods`"];
VariationalD[f[x + a]^2, f[x], x]

and got
Out[2]= 0, that is incorrect as I expected the answer to be: Out[2]= 2 f[x].
Similarly, with f[x+a]*f[x+b] I get 0 instead of f[x+b-a] + f[x+a-b].

For these simple peculiar examples, I can do what I want with forth-and-back changes of variables. But I have to handle must more complicated functionals that cannot be so easily handled. Hence my question:
How can I compute reliably/efficiently such variational derivatives?

Any feedback will be welcome.
Thanks.
Zep

Probably VariationalD not work with functionals.

You can try:

 << VariationalMethods`;
 VariationalD[f[z]^2, f[z], z] /. z -> x + a

 (*2 f[a + x]*)

Thanks Mariusz, but this is exactly what I said I was doing in my original post.
This works fine with this simple example, it’s more tricky with more involved
functionals.