I have complicated expression in terms of derivatives of a multivariable function F[x,y,z]
say
D[F[x,y,z],x]^2 + D[F[x,y,z],y]^2
I want to change the generic function F[x,y,z]
to another completely generic, now single-variable function G[x]
. How do I do this?
I have tried /.{F->G[x]}
,/.{F[x,y,z]->G[x]}
,/.{F->Function[x,G]}
/.{F[x,y,z]->Function[x,G]}
...
Obviously I can’t afford to individually replace the various derivatives by hand...
UPDATE: While I got some good answers, I also managed to find what I was looking for!
The rule /.{ F -> Function[{x,y,z},G[x]] }
does the trick and (for me at least) is significantly more intuitive than @lilyric and @lukaslang ’s answer
F
should be replaced by a function of three variables, not a function of one, imo. $\endgroup$