The total differential Dt[f[x,0]]
is Dt[x]f^(1,0)[x,0]
, or in InputForm
,
Dt[x]*Derivative[1, 0][f][x, 0]
The two variable function Subscript[x,y]
is being treated no differently to any other two variable function f[x,y]
. In particular, the (1,0)
superscript means 1st derivative w.r.t. first variable.
For a while I have been using the following to define subscripted (or other composite) variables that can be copy-pasted and entered in formatted form, but I'm not sure how robust this is:
FormatSymbol[var_, rep_String] := Module[{b, s1, s2},
b = ToString[FullForm[Apply[MakeBoxes, MakeExpression[rep, StandardForm]]]];
s1 = SymbolName[var] <> "/:MakeBoxes[" <> SymbolName[var] <> ",StandardForm]:=" <> b;
ToExpression[s1];
s2 = "MakeExpression[" <> b <> ",StandardForm]:=HoldComplete[" <> SymbolName[var] <> "]";
ToExpression[s2];
Column[{s1, s2}]
]
Usage example:
FormatSymbol[ x0, "xsub0" ];
where xsub0
is supposed to be typed as x
subscripted with 0
(i.e., x Ctrl_ 0
, but I can't type that here).
To clear the above formatting of symbol x0,
UnformatSymbol[ x0 ];
where
UnformatSymbol[var_] := Module[{b, s1, s2},
b = ToString[FullForm[MakeBoxes[var // DisplayForm][[1]]]];
s1 = SymbolName[var] <> "/:MakeBoxes[" <> SymbolName[var] <> ",StandardForm]=.";
ToExpression[s1];
s2 = "MakeExpression[" <> b <> ",StandardForm]=.";
ToExpression[s2];
Column[{s1, s2}]
]
The return values for the above functions are, of course, just to see what's going on.
Subscript
s. $\endgroup$