I have several variables (coordinates) $x_1, x_2, x_3, x_4, z$ and a lot (21, to be precise) functions $g_i$ which are assumed to depend on $x_1, x_2,x_3, x_4$, but not on $z$. I also have a function Differentiation which uses Dt in its definition. I would like to apply Differentiation to my functions $g_i$.
I found that this question proposed giving constants the attribute "Constant". However, I cannot apply it directly, as my functions are constants only with respect to one variable.
Is there any way to do this?
Dt[x^2 y + z, x, y, Constants -> {z}]? – kglr Sep 29 '18 at 01:40Internal`InheritedBlock[{Dt}, SetOptions[Dt, Constants -> {z}]; Differentiation[x1,x2,x3,x4,z]]? – kglr Sep 29 '18 at 01:46diff[expr_, x_] := Dt[expr, x];. However,InternalInheritedBlock[{Dt}, SetOptions[Dt, Constants -> {z}]];diff[z r, z]gives the same answer asdiff[r z , z]-r + z Dt[r, z], when expected simplyr`. Did I somehow misinterpret your suggestion? – user108687 Sep 29 '18 at 01:56Constantattribute corresponds to setting all derivative of a variable to zero. And I want all the derivatives of other variables wrt this one to be set to zero. – user108687 Sep 29 '18 at 02:04ff[expr_, x_] = Dt[expr, x]; A /: Dt[A, z] = 0; ff[A B, z]returnsA Dt[B, z]. Thanks for help! – user108687 Sep 29 '18 at 02:13