# Derivatives and subscripts [closed]

Is there a way to declare that subscripted letters are not functions of the letter? By default, this happens:

In[5]:= D[Subscript[t, 0], t]
Out[5]= (Subscript^(1,0))[t,0]

which I can understand but is slightly eye-roll-inducing. Mathematical practice would like this t_0 to be constant.

• Point 3: "Avoid subscripted symbols." That said, try setting Attributes[Subscript] = {Constant, NHoldAll}. Jan 23 at 16:43
• Instead of using Subscript[t, 0] use t0 and format it to look like Subscript[t, 0], i.e., Format[t0] = Subscript["t", 0]; Then D[t0, t] evaluates to 0 Jan 23 at 17:55
• Does this answer your question? Solve with v9 (issues with Subscript, Overscript, Superscript etc) Jan 24 at 2:59
• This is a simple mistake? Jan 24 at 18:31

You can use a variation of the following idea where I fix a similar issue with Solve:

\$Notations = Alternatives[
Subscript, Superscript, Subsuperscript, SubPlus, SubMinus, SubStar, SuperPlus,
SuperMinus, SuperStar, SuperDagger, Overscript, Underscript, Underoverscript,
OverBar, OverVector, OverTilde, OverHat, OverDot, UnderBar
];

Unprotect[D];
D[a__] /; !FreeQ[{a}, $$Notations[__]] := Block[{CompressedData}, With[{z=Unevaluated[D[a]] /. s:$$Notations[__] :> CompressedData[Compress[s]]},
z /; !MatchQ[z,_D]
]
]
Protect[D];

Then:

D[t Subscript[t,0] + t^2, t]

2 t + Subscript[t, 0]