'
or Derivative
has the following attributes:
Attributes[Derivative]
{NHoldAll, ReadProtected}
Conspicuously absent is the Protected
attribute. This means that, unlike many other system functions, downvalues for Derivative
can be defined directly.
In this case you seem to want this definition (as suggested by wxffles in comments):
MyNorm'[{x_, y_, z_}] := Dt[MyNorm[{x, y, z}], t]
The total derivative Dt
is needed here to explicitly indicate that all variables depend on t.
Show it works:
MyNorm'[{x, y, z}]
(2 x Dt[x, t] + 2 y Dt[y, t] + 2 z Dt[z, t])/(2 Sqrt[
x^2 + y^2 + z^2])
If you clear the ReadProtected
attribute you can see the definition is indeed assigned to Derivative
:
ClearAttributes[Derivative, ReadProtected];
??Derivative
Usually you would use TagSet
or TagSetDelayed
(/: =
or /: :=
) to associate this definition with MyNorm
but in this case it would appear to deeply nested:
MyNorm /: MyNorm'[{x_, y_, z_}] := Dt[MyNorm[{x, y, z}], t]
myNorm'[{x_, y_, z_}] := Dt[myNorm[{x, y, z}], t]
? $\endgroup$