Message Boards Message Boards

1
|
2847 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Shifted functions in VariationalMethods'?

Posted 3 years ago

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

POSTED BY: zep led
2 Replies
Posted 3 years ago

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.

POSTED BY: zep led

Probably VariationalD not work with functionals.

You can try:

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

 (*2 f[a + x]*)
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract