How to compute the functional derivative with respect to 'f(x)'?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
The function 'functionalDerivative' that is new in version 6.2 of the Symbolic Math Toolbox fails with the following simple input
>> u = sym('u');
>> fu = symfun(sym('f(u)'), [u]);
>> x = sym('x');
>> fx = symfun(sym('f(x)'), [x]);
>> functionalDerivative(fu, fx)
Error using symfun/privResolveArgs (line 187)
Symbolic function inputs must match.
The result I am expecting in this case is dirac shifted to x (i.e., g(s)=dirac(s - x)).
Am I not using functionalDerivative correctly, or is it not able to generate this result?
0 comentarios
Respuestas (1)
Philip Caplan
el 17 de Abr. de 2015
The error you are receiving is due to the fact that "fu" and "fx" need to be functions of the same independent variable, otherwise there is nothing to link the two functions and, hence, compute the functional derivative.
For example, assume the second argument passed to "functionalDerivative" is "f(x)" as you have it. Then, a valid first argument would be an expression of "x", "f(x)", "diff(f(x),x)", "diff(f(x),x,x)", etc. Here is an example:
>> syms f(x)
>> g(x) = f(x)^3 + diff(f(x),x,x,x)*diff(f(x), x);
>> functionalDerivative(g(x), f(x))
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Assumptions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!