1

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?

user108687
  • 283
  • 1
  • 10

1 Answers1

1

With suggestions from @kglr I arrived at the following solution for a toy problem of differentiating $AB$ with respect to $z$, assuming that $A$ doesn't depend on $z$, using A /: Dt[A, z] = 0, which sets the derivative of $A$ with respect to $z$ equal to zero:

ff[expr_, x_] = Dt[expr, x];
A /: Dt[A, z] = 0;
ff[A B, z]

returns A Dt[B, z].

user108687
  • 283
  • 1
  • 10